Named Pipes from VB6 to WCF

Can I use a VB6 application to connect to a named pipe with a service written in C # with a WCF endpoint?

A VB6 project that uses named pipes to communicate with a service written in C ++. I would like to convert a C ++ service to C # (preferably .NET 4.0).

The VB6 project uses a Win32 call for CallNamedPipes to send a message to the server. The message payload is a string consisting of the following structure.

 [command][data length][data if approprate to the message]

I cannot convert the VB6 side of the application at this time, but I wonder if I can rely on the CallNamedPipe function to send a message to the new WCF service, and if they play well together. I would see that the contract side of the WCF service is basically one of the methods that accepts a string that I will parse.

Also, since CallNamedPipes can receive the returned data in the outputBuffer parameter, can WCF accommodate this? Will the contract be like this ...

string DoSomething(string command)

Thank you for your help!

Brian

+3
source share
3 answers

WCF , WCF . WCF .

, # NamedPipeServerStream. , . ( NamedPipeServerStream, WCF ). , .

+1

,

++ Pipes #, PInvoke

Pinvoke.net

pinvoke WCF .

0

Why not write a ComVisible class that wraps the proxy server on the WCF client side, which your VB6 code could call, like any other component of the COM library.

0
source

Source: https://habr.com/ru/post/1765834/


All Articles