开发者

How can I use a void pointer as a parameter, of a function, in C#?

How can I use a void point开发者_如何学JAVAer as a parameter, of a function, in C#?


Provided your C function looks like this:

int Foo(void* p, DWORD dwVal);

and you just rewriting it in C# then for most of the time all you need is something like this:

int Foo(object obj, uint val);

But if you are doing Interops then use P/Invoke as suggested above. A good place to start in this case is http://www.pinvoke.net/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜