列表 第页
我需要通过C#字符串数组转换成C code I need to pass an array of C# strings into C code例C code void print_string_array(const char** str_array, int length){for (int i = 0; i...阅读全文
的形式访问的成员可能会导致运行时异常,因为它是一个元帅,被引用的类"Accessing a member on Form may cause aruntime exception because it is a field of a marshal-by-reference class"我知道这是什么警告,并知...阅读全文
我试图做到这一点的方法很多,但没有一个是工作。有没有人有一个正确的榜样呢?我只是想从一个函数到C#的水平移动 wchar_t的* 值。I have tried to do this in many ways, but none is working. Does anyone have a correct exampl...阅读全文
我在定义一个本地DLL中的函数如下:I have a function in a native DLL defined as follows:#include void SetPath(string path);我试图把这个微软的P /调用互操作助理,但它闷死在字符串级(我认为这是从MFC?)。...阅读全文
由于在DLL中下面的C函数:Given the following C function in a DLL:char * GetDir(char* path );你会怎样的P / Invoke这个函数到C#和元帅的char *正常。.NET似乎知道该怎么做LPCTSTR,但是当我想不出任何封送处理不会导致NotS...阅读全文