Wrapper For C Static Library

霸气de小男生 提交于 2019-12-10 08:23:04

问题


I Have is C Static Library for Camera. Now Plan is to develop C#/WPF UI for Windows 8 which will use the C static library to capture video/Audio.

I came with the idea that there will C++/CLI wrapper for the C Static.The Wrapper will be Managed Dll.

C#/WPF UI will use this Dll to Capture the Video/Audio.

I wanted to Know whether this approach will be good.

Alternate Suggestion is welcome.Please Guys Suggest on this.


回答1:


This is indeed a very common solution to the problem. It is generally much easier to do it this way than using P/invoke.

Both approaches require you to wrap the static library. So you are almost certainly better off using C++/CLI for that wrapper since that is much easier to connect to your C# code than P/invoke.



来源:https://stackoverflow.com/questions/7821123/wrapper-for-c-static-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!