What should be the C# signiture for this function? (for pInvoke)
DWORD GetVatAccount(COleDat开发者_如何学JAVAeTime dtDateTime, BSTR FAR* strResult)
[DllImport("test.dll")]
private static extern int GetVatAccount(
double dtDateTime,
StringBuilder strResult
);
or:
[DllImport("test.dll")]
private static extern int GetVatAccount(
double dtDateTime,
[MarshalAs(UnmanagedType.BStr)]ref string strResult
);
The conversions between the dates and double could be done with DateTime.FromOADate and DateTime.ToOADate methods.
精彩评论