开发者

Using C++ code in C#

I had written a code snippet in VC++. However, I cannot continue rest of the application in VC++, so would want to 开发者_开发知识库move to C#.

Can I make a dll of the VC++ code and call the functions written in VC++ to work in C#?

I'm quite un-aware if this will work, but I have seen how the native code is called in C# using dll.

Can anyone please help me on this.

Thanks.


You could try compiling your C++ code as managed code using the /clr option and then use it directly or use P/Invoke to call the unmanaged functions from managed code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜