This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int _tmain(VOID) | |
{ | |
BOOL fConnected = FALSE; | |
DWORD dwThreadId = 0; | |
HANDLE hPipe = INVALID_HANDLE_VALUE, hThread = NULL; | |
LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\mynamedpipe"); | |
// The main loop creates an instance of the named pipe and | |
// then waits for a client to connect to it. When the client | |
// connects, a thread is created to handle communications |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HANDLE CreateNewPipe(LPCWSTR lpszPipename); | |
int _tmain(VOID) | |
{ | |
BOOL fConnected = FALSE; | |
DWORD dwThreadId = 0; | |
HANDLE hPipe = INVALID_HANDLE_VALUE, hThread = NULL; | |
LPTSTR lpszPipename = TEXT("\\\\.\\pipe\\mynamedpipe"); | |
// The main loop creates an instance of the named pipe and |