作者hatasum (我很可爱)
看板C_Sharp
标题[问题] 使用DllImport c#呼叫c++的method的转换
时间Thu Jul 26 20:51:42 2012
我想把c++的dll让c#引用
其中里面有一个method
extern "C" __declspec(dllexport) BOOL One_Method_INT(ULONG szMethod, int
iArg, ULONG* pulReturnValue);
然後呼叫此方法是这样呼叫的 :
One_Method_INT('DELB', 1, &ulResult);
我在C#里面使用DllImport来直接使用
[DllImport("WMIPort.dll")]
static extern bool One_WMIMethod_INT(ulong szMethod, int iArg, UIntPtr
pulReturnValue);
但是...却卡住了
我不知道在C#要怎麽设定'DELB'为ulong..........
不知道大家有没有类似的经验??QQ
卡好久.....
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.211.38.194
1F:→ james732:这函式名称好眼熟XD 07/26 20:53