i am trying to figure out how to use named pipes so that i can build an interface/api for the mt4 terminal..
i used the following code to create the pipe.
i found a program that i downloaded that is called pipelist.exe that shows a dump of all "named pipes" on my system.
it gives to me the dump listing below... what the heck are these other existing pipes on my windows 10 computer?
i used the following code to create the pipe.
Inserted Code
#define PIPE_TYPE_MESSAGE 4 #define PIPE_READMODE_MESSAGE 2 #define PIPE_WAIT 0 #define PIPE_ACCESS_DUPLEX 3 #define PIPE_UNLIMITED_INSTANCES 255 #define NMPWAIT_USE_DEFAULT_WAIT 0 #define INVALID_HANDLE_VALUE -1 #define ERROR_PIPE_CONNECTED 535 #define PIPE_ACCESS_INBOUND 1 #define PIPE_ACCESS_OUTBOUND 2 #define PIPE_ACCESS_DUPLEX 3 #define PIPE_TYPE_BYTE 0 #define PIPE_TYPE_MESSAGE 4 #define PIPE_READMODE_BYTE 0 #define PIPE_READMODE_MESSAGE 2 #define PIPE_WAIT 0 #define PIPE_NOWAIT 1 #define INVALID_HANDLE_VALUE 0xffffffff #define GenericRead 0x80000000 #define GenericWrite 0x40000000 #define OPEN_EXISTING 3 extern string PipeName="MetaTrader"; int PipeHandle = INVALID_HANDLE_VALUE; int Buffer[64]; // 4 bytes/int * 64 = 256 #import "kernel32.dll" int CreateNamedPipeW(string pipeName, int openMode, int pipeMode, int maxInstances, int outBufferSize, int inBufferSize, int defaultTimeOut, int security ); int ConnectNamedPipe(int hPipe,int lpOverlapped); int WaitNamedPipeA( string lpNamedPipeName, int nTimeOut ); bool PeekNamedPipe( int pipeHandle, int& buffer[], int bufferSize, int& bytesRead[], int& totalBytesAvail[], int& bytesLeftThisMessage[] ); int CreateFileW( string name, int desiredAccess, int SharedMode, int security, int creation, int flags, int templateFile ); int WriteFile( int fileHandle, int& buffer[], int bytes, int& numOfBytes[], int overlapped ); int ReadFile( int fileHandle, int& buffer[], int bytes, int& numOfBytes[], int overlapped ); int FlushFileBuffers(int hPipe); int DisconnectNamedPipe(int hPipe); int CloseHandle( int fileHandle ); int GetError(); #import string pipename="\\\\.\\pipe\\MY_MT4_PIPE"; PipeHandle=CreateNamedPipeW( pipename, // name of the pipe PIPE_ACCESS_DUPLEX, // 2-way pipe - send & receive PIPE_TYPE_BYTE, // send data as a byte stream 1, // only allow 1 instance of this pipe 0, // no outbound buffer 0, // no inbound buffer 0, // use default wait time NULL // use default security attributes );
i found a program that i downloaded that is called pipelist.exe that shows a dump of all "named pipes" on my system.
it gives to me the dump listing below... what the heck are these other existing pipes on my windows 10 computer?
Inserted Code
Pipe Name Instances Max Instances --------- --------- ------------- InitShutdown 3 -1 lsass 4 -1 ntsvcs 3 -1 scerpc 3 -1 {641B073C-E4A8-4FC1-82CE-CEE579CD0BE6} 1 1 Winsock2\CatalogChangeListener-34c-0 1 1 epmapper 3 -1 Winsock2\CatalogChangeListener-29c-0 1 1 LSM_API_service 3 -1 atsvc 3 -1 eventlog 3 -1 Winsock2\CatalogChangeListener-650-0 1 1 Winsock2\CatalogChangeListener-570-0 1 1 spoolss 3 -1 Winsock2\CatalogChangeListener-c10-0 1 1 Winsock2\CatalogChangeListener-33c-0 1 1 wkssvc 4 -1 WiFiNetworkManagerTask 1 -1 trkwks 3 -1 srvsvc 4 -1 tapsrv 3 -1 2C7B51A6-ED37-4DC2-897D-6AF4E525BF94 1 -1 10b8fdb8-f6ed-40dd-acb6-2bef02c17daf-GraphicsProvider 1 -1 10b8fdb8-f6ed-40dd-acb6-2bef02c17daf-ThermalProvider 1 -1 Winsock2\CatalogChangeListener-31c-0 1 1 PIPE_EVENTROOT\CIMV2SCM EVENT PROVIDER 1 -1 ROUTER 3 -1 GoogleCrashServices\S-1-5-18 1 1 GoogleCrashServices\S-1-5-18-x64 1 1 MsFteWds 7 -1 SearchTextHarvester 1 -1 crashpad_6564_UVATGKNTMUPDHSAQ 2 2 mojo.6564.6896.8821047520411701653 1 1 mojo.6564.6896.11229270446830561975 1 1 mojo.6564.6896.12733794714018502107 1 1 mojo.6564.6896.10087527620045563941 1 1 mojo.6564.6568.8790591752001962304 1 1 mojo.6564.6896.15444288409694551405 1 1 mojo.6564.6896.443196626947923323 1 1 mojo.6564.6896.13014979477412909084 1 1 mojo.6564.6896.7596452105005143102 1 1 W32TIME_ALT 3 -1 mojo.6564.6568.8338274763894496598 1 1 mojo.6564.6896.4407935748943131407 1 1 mojo.6564.6896.1928423883036015558 1 1 mojo.6564.6896.16941788022505652898 1 1 mojo.6564.6568.3047580403184286237 1 1 mojo.6564.6896.18315858858806546240 1 1 mojo.6564.6896.12879608281953802989 1 1 mojo.6564.6896.17472413789963462014 1 1 mojo.6564.6568.7681889394896712319 1 1 mojo.6564.6896.14724379737126912012 1 1 mojo.6564.6568.18074304083297482752 1 1 mojo.6564.6896.18195709902920107127 1 1 mojo.6564.6896.8490183995375518524 1 1 mojo.6564.6896.14599021332245395779 1 1 mojo.6564.6568.15226089126966105695 1 1 mojo.6564.6896.6010257041981316753 1 1 mojo.6564.6896.10425005973474044199 1 1 mojo.6564.6896.15638571250444667392 1 1 mojo.6564.6568.2977306371753231680 1 1 mojo.6564.6896.6370199072290927242 1 1 mojo.6564.6568.18277180038688916135 1 1 mojo.6564.6896.13748916059762486863 1 1 mojo.6564.6568.14269598805201921502 1 1 mojo.6564.6896.7609552415173471694 1 1 mojo.6564.6568.12437285907649558449 1 1 mojo.6564.6896.12777296054415784148 1 1 mojo.6564.6568.6055451316337166414 1 1 mojo.6564.6896.14914166608504522240 1 1 mojo.6564.6568.761049246520869923 1 1 mojo.6564.6896.11879844157387536574 1 1 mojo.6564.6896.16022528293998395192 1 1 mojo.6564.6896.12384829226945081929 1 1 mojo.6564.6896.5217084782312771976 1 1 mojo.6564.6568.8324302637412867079 1 1 mojo.6564.6896.14538906650771647385 1 1 mojo.6564.6896.5039584045574235798 1 1 mojo.6564.6896.5832235538808594424 1 1 mojo.6564.6896.7836365541901914045 1 1 mojo.6564.6568.2873642497101376767 1 1 mojo.6564.6896.16699710861628648180 1 1 mojo.6564.6896.7672101679030764775 1 1 mojo.6564.6568.6820582059305753132 1 1 mojo.6564.6896.12739218638978608249 1 1 mojo.6564.6896.17008029350042786470 1 1 mojo.6564.6896.1552570629442905632 1 1 mojo.6564.6568.17497741152927689365 1 1 mojo.6564.6896.2020078874483746159 1 1 mojo.6564.6896.18221770893361244592 1 1 mojo.6564.6568.1165920555015519452 1 1 mojo.6564.6896.3368074182765497398 1 1 mojo.6564.6896.5081375456893154999 1 1 mojo.6564.6568.1484255508371590082 1 1 mojo.6564.6896.15643232641511733031 1 1 mojo.6564.6896.17927488169217446224 1 1 mojo.6564.6896.2850946840854940059 1 1 mojo.6564.6896.13864096138538691240 1 1 mojo.6564.6568.16630250479740114011 1 1 mojo.6564.6896.15385160515951919680 1 1 mojo.6564.6896.6553650397850672963 1 1 mojo.6564.6896.11040345461296331980 1 1 mojo.6564.6568.3926371664321740714 1 1 mojo.6564.6896.15322342016264588287 1 1 mojo.6564.6896.1244282692959878400 1 1 mojo.6564.6896.12905776727126005098 1 1 mojo.6564.6568.7685610486604562125 1 1 mojo.6564.6896.13246918336804925950 1 1 mojo.6564.6896.4591274729464751206 1 1 mojo.6564.6896.10161855155904396264 1 1 mojo.6564.6896.8318735298114966404 1 1 mojo.6564.6896.7849766953575020020 1 1 mojo.6564.6568.12910301169187258271 1 1 mojo.6564.6896.10883238580649449752 1 1 mojo.6564.6896.1808574325763683272 1 1 mojo.6564.6568.6705788755159279242 1 1 mojo.6564.6896.13323663119520586501 1 1 mojo.6564.6896.16896091382771654095 1 1 mojo.6564.6896.12360268791081119716 1 1 mojo.6564.6896.647149224583738654 1 1 mojo.6564.6896.7720799583759285372 1 1 mojo.6564.6896.661627865126798541 1 1 mojo.6564.6568.1833502902542025970 1 1 mojo.6564.6896.13442009628492885710 1 1 mojo.6564.6896.4544877827650413006 1 1 mojo.6564.6896.5995785508397876494 1 1 mojo.6564.6568.10316636155836243186 1 1 mojo.6564.6896.868418217467587613 1 1 mojo.6564.6896.5920150390806797948 1 1 mojo.6564.6896.14453796277182834470 1 1 mojo.6564.6896.11221041627833820648 1 1 mojo.6564.6568.15905296998166498750 1 1 mojo.6564.6896.13607883992286407095 1 1 mojo.6564.6896.13118087140205102626 1 1 mojo.6564.6896.10452234654152032619 1 1 mojo.6564.6568.12050696745209968998 1 1 mojo.6564.6896.11163360004201751108 1 1 mojo.6564.6896.10336144244983078556 1 1 mojo.6564.6896.10663904081432238030 1 1 mojo.6564.6896.7315756807962616277 1 1 MY_MT4_PIPE 1 1 mojo.6564.6568.914747729941215259 1 1 mojo.6564.6896.4181883839373910715 1 1 mojo.6564.6896.7662777304837127854 1 1 mojo.6564.6896.11627731673683552461 1 1