From: Giovanni Dicanio on 13 Apr 2010 07:34 "Scott Ballard" <scott.ballard(a)gmail.com> ha scritto nel messaggio news:7e021c23-b175-4082-ada4-0f5e0ae88805(a)h27g2000yqm.googlegroups.com... > [...] a COM interface that defines > the method like this in the IDL: > > HRESULT Foo([in] BSTR incoming, [out] BSTR* outgoing); > > In C# the interface is defined like this: > > void Foo([In, MarshalAs(UnmanagedType.BStr) string incoming, > [MarshalAs(UnmanagedType.BStr] out string outgoing); I would try using an IntPtr on the C# side and build the BSTR manually e.g. P/Invoking SysAllocStringByteLen. Giovanni
First
|
Prev
|
Pages: 1 2 Prev: trouble with CDC Next: AfxOleInit() and CoInitializeEx in a non-GUI thread ? |