此函数的C#签名应该是什么?(适用于pInvoke)
DWORD GetVatAccount(COleDateTime dtDateTime, BSTR FAR* strResult)发布于 2010-07-05 17:21:44
[DllImport("test.dll")]
private static extern int GetVatAccount(
double dtDateTime,
StringBuilder strResult
);或者:
[DllImport("test.dll")]
private static extern int GetVatAccount(
double dtDateTime,
[MarshalAs(UnmanagedType.BStr)]ref string strResult
);dates和double之间的转换可以使用DateTime.FromOADate和DateTime.ToOADate方法完成。
https://stackoverflow.com/questions/3178355
复制相似问题