开发者

PInvoke signiture BSTR FAR*

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜