【发布时间】:2011-02-03 20:03:51
【问题描述】:
我有一个要从 DLL 导入的方法,它的签名为:
BOOL GetDriveLetter(OUT char* DriveLetter)
我试过了
[DllImport("mydll.dll")]
public static extern bool GetDriveLetter(byte[] DriveLetter);
和
[DllImport("mydll.dll")]
public static extern bool GetDriveLetter(StringBuilder DriveLetter);
但在 DriveLetter 变量中都没有返回任何内容。
【问题讨论】:
标签: c# .net pinvoke marshalling dllimport