有一个用 Delphi 写的导出dll方法:DllGetClassObject:function(const CLSID,IID:Tencent; var Obj):HResult; stdcall;我需要用c#写一个等价的方法作为委托。它应该是什么样子?
6qfn3psc1#
就像这样:
[UnmanagedFunctionPointer(CallingConvention.StdCall)] public delegate uint DllGetClassObjectDelegate( [MarshalAs(UnmanagedType.LPStruct)] Guid rclsid, [MarshalAs(UnmanagedType.LPStruct)] Guid riid, [MarshalAs(UnmanagedType.IUnknown, IidParameterIndex=1)] out object ppv );
字符串来源:http://blog.kutulu.org/2012/01/com-interop-part-9-custom-activations.html?m=1
1条答案
按热度按时间6qfn3psc1#
就像这样:
字符串
来源:http://blog.kutulu.org/2012/01/com-interop-part-9-custom-activations.html?m=1