C静态库的包装器 [英] Wrapper For C Static Library

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

问题描述

我有相机的C静态库。现在计划是开发用于Windows 8的C#/ WPF UI,它将使用C静态库捕获视频/音频。

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.

我想到了将有C ++ / C包装器C包装器将被管理的Dll。

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

C#/ WPF UI将使用此Dll捕获视频/音频。

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

这种方法会很好。

替代建议是受欢迎的。请对此建议。

Alternate Suggestion is welcome.Please Guys Suggest on this.

推荐答案

这的确是一个很常见的解决方案。一般来说比使用P / invoke更容易做到这一点。

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

两种方法都需要你包装静态库。所以你几乎肯定更好地使用C ++ / CLI的封装,因为这是更容易连接到你的C#代码比P /调用。

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.

这篇关于C静态库的包装器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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