DotNet - What is int*?

前端 未结 3 1856
执念已碎
执念已碎 2021-01-11 14:56

simple question, I import a DLL function and the parameter are int*. When I try to enter Method(0), I get an error which says: \"int and int* can not convert\".

What

3条回答
  •  醉梦人生
    2021-01-11 15:24

    It's a pointer to an int. Generally best avoided in managed code. You might want to post your imported method declaration. An IntPtr is usually sufficient for this kind of interop.

提交回复
热议问题