调用C ++中的C#库 [英] Call C++ library in C#

查看:195
本文介绍了调用C ++中的C#库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多用C ++编写的库。我想打电话从C#这些库,但是,我遇到过很多问题。我想知道,如果有一本书或指引,告诉我该怎么做。


解决方案

  1. 的DllImport - <一个href=\"http://msdn.microsoft.com/en-us/library/aa984739%28VS.71%29.aspx\">http://msdn.microsoft.com/en-us/library/aa984739(VS.71).aspx

  2. 包装类 - <一个href=\"http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/67cc9eea-a4fe-48bd-b8d5-f3c8051ba896\">http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/67cc9eea-a4fe-48bd-b8d5-f3c8051ba896

I have a lot of libraries written in C++. I want to call these libraries from C#, however, I have met many problems. I want to know if there is a book or guideline to tell me how to do that.

解决方案

  1. DllImport - http://msdn.microsoft.com/en-us/library/aa984739(VS.71).aspx
  2. Wrapper class - http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/67cc9eea-a4fe-48bd-b8d5-f3c8051ba896

这篇关于调用C ++中的C#库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆