开发者

Passing XML between .NET and native c++

开发者 https://www.devze.com 2023-03-11 12:57 出处:网络
I have a project in native c++ that currently communicates with a c# project through COM. I\'d like to replace COM wit开发者_如何学Goh a c++\\cli wrapper. Both projects use XML, and pass it back and f

I have a project in native c++ that currently communicates with a c# project through COM. I'd like to replace COM wit开发者_如何学Goh a c++\cli wrapper. Both projects use XML, and pass it back and forth using COM Variant. If I switched to a c++/cli wrapper, what could I use to pass XML between the layers?


Well, we had a similar arrangement and we switched to use a simple socket to pass the messages. In our case it was a native c/c++ app and a managed app - so two processes. Gave us the advantage to put them on separate PCs as well. If the native project is just a DLL you call into you might just want to add a SendMessage interface to pass the XML message as string through.

0

精彩评论

暂无评论...
验证码 换一张
取 消