调用一个有ATL ,MFC的native dll ,不能Reference,只能DllImport!例如ATL 接口中的一个方法:
HRESULT F1( [n,string] BSTR a1, [out,retval] VARIANT_BOOL *bRet);
C#调用的写法怎样,具体就是返回值怎样写?
[DllImport("xxx.dll")]
public static extern [MarshalAs(UnmangedType.VariantBool)] F1 ([MarshalAs(UnmangedType.BStr) string a1)
不对啊?