c# - IPC: WM_COPYDATA + serialization/deserialization -


I am currently working on 2 net applications that should communicate with each other. Simple Windows Message was selected and it works well at this time. The data sent in the message is a simple string, but now I have created a message class in which a command (enum) and a data member (string), and later possible other members are included.

When I send an example of such a message class, it is sorted into bytes and then converted to base64 string. It is sent when Windows' SendMessage () is used. On the other hand, I am doing the opposite. Finally, the original item is restored and available in another app.

Although this system works, I was thinking that it is safe to do. Indeed, there is some overhead, base 64 string is more than the original string solution (but I need to manually parsize this triangle to get the command and data portion) What is the maximum size for the message that can be sent with SendMessage is?

Besides, I want to stay away from .NET remoting for this project and want to be with SendMessage solution.

Any ideas? Use JSON to narrow the overhead?

Thank you.

Use XDMessaging (that is WM_COPYDATA Supports nominated pipe and IOStream messaging - Some offer themselves highly flexible, robust and tested solutions rather than rolling themselves.

How to use binary serialization in your class () XDMessaging Together? It will be quite compact and very easy.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -