Click here to Skip to main content
15,885,757 members
Home / Discussions / C#
   

C#

 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 9:35
Crazy Joe Devola16-Feb-16 9:35 
GeneralRe: Named pipes: C# server, C++ client Pin
Richard Andrew x6416-Feb-16 9:46
professionalRichard Andrew x6416-Feb-16 9:46 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 10:03
Crazy Joe Devola16-Feb-16 10:03 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 10:11
Crazy Joe Devola16-Feb-16 10:11 
GeneralRe: Named pipes: C# server, C++ client Pin
Richard Andrew x6416-Feb-16 11:29
professionalRichard Andrew x6416-Feb-16 11:29 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 11:32
Crazy Joe Devola16-Feb-16 11:32 
GeneralRe: Named pipes: C# server, C++ client Pin
Richard Andrew x6416-Feb-16 11:38
professionalRichard Andrew x6416-Feb-16 11:38 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 12:03
Crazy Joe Devola16-Feb-16 12:03 
Server: C#
NamedPipeServerStream pipeServer = new NamedPipeServerStream("\\\\.\\pipe\\mypipe", PipeDirection.In, 1, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);

// Wait for a connection
pipeServer.BeginWaitForConnection(new AsyncCallback(WaitForConnectionCallBack), pipeServer);

Client: C++
hPipe=CreateFile("\\\\.\\pipe\\mypipe",
                  GENERIC_READ | GENERIC_WRITE,
                  0,
                  NULL,
                  OPEN_EXISTING,
                  0,
                  NULL) ;
 if ( hPipe!=INVALID_HANDLE_VALUE)
 {
     return 0; //Success!!!
 }

 err = GetLastError();
 if(err!=ERROR_PIPE_BUSY)
 {
     printf("Could not open pipe, GetLastError=%u\n", err);
     return -1 ;
 }

 printf("Could not open pipe, GetLastError=%u. WaitNamedPipe.\n", err);
 if(! WaitNamedPipe(pipe_name,2000))
 {
     printf("Could not open pipe\n");
     return -1 ;
 }

again:
C++ client with C++ server - works.
C# client with C# server - works.
C++ client with C# server - does not works.

Thank you.
GeneralRe: Named pipes: C# server, C++ client Pin
Richard Andrew x6416-Feb-16 12:27
professionalRichard Andrew x6416-Feb-16 12:27 
GeneralRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 12:46
Crazy Joe Devola16-Feb-16 12:46 
AnswerRe: Named pipes: C# server, C++ client Pin
Crazy Joe Devola16-Feb-16 13:12
Crazy Joe Devola16-Feb-16 13:12 
GeneralRe: Named pipes: C# server, C++ client Pin
Richard Andrew x6416-Feb-16 13:15
professionalRichard Andrew x6416-Feb-16 13:15 
QuestionHow to read and print *.plt file by C# Pin
tienich15-Feb-16 22:01
tienich15-Feb-16 22:01 
AnswerRe: How to read and print *.plt file by C# Pin
Pete O'Hanlon15-Feb-16 22:32
mvePete O'Hanlon15-Feb-16 22:32 
QuestionCopy File From Server With Progress And Completion Pin
Kevin Marois15-Feb-16 18:42
professionalKevin Marois15-Feb-16 18:42 
AnswerRe: Copy File From Server With Progress And Completion Pin
Garth J Lancaster15-Feb-16 19:26
professionalGarth J Lancaster15-Feb-16 19:26 
AnswerRe: Copy File From Server With Progress And Completion Pin
Richard Deeming16-Feb-16 2:06
mveRichard Deeming16-Feb-16 2:06 
GeneralRe: Copy File From Server With Progress And Completion Pin
Kevin Marois16-Feb-16 3:38
professionalKevin Marois16-Feb-16 3:38 
AnswerRe: Copy File From Server With Progress And Completion Pin
Pete O'Hanlon16-Feb-16 2:10
mvePete O'Hanlon16-Feb-16 2:10 
GeneralRe: Copy File From Server With Progress And Completion Pin
Kevin Marois16-Feb-16 3:36
professionalKevin Marois16-Feb-16 3:36 
QuestionIcon on "Dekstop" Pin
Member 1224802815-Feb-16 12:01
Member 1224802815-Feb-16 12:01 
QuestionRe: Icon on "Dekstop" Pin
ZurdoDev15-Feb-16 13:55
professionalZurdoDev15-Feb-16 13:55 
AnswerRe: Icon on "Dekstop" Pin
Gerry Schmitz16-Feb-16 6:05
mveGerry Schmitz16-Feb-16 6:05 
Questionsingle submit button with multiple tabs Pin
Sandy Safwat15-Feb-16 7:19
Sandy Safwat15-Feb-16 7:19 
AnswerRe: single submit button with multiple tabs Pin
Richard Deeming15-Feb-16 8:09
mveRichard Deeming15-Feb-16 8:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.