I think you are right. I am better off using Managed C++. But then goes
another question. Lets say I am wrapping ISomeInterface and want my
wrapper to look something like this:

public __gc class SomeInterface
{
........
private:
CComPtr<ISomeInterface>  m_someInterface; // <--- not allowed
}

How do I make this work?



On Sat, 7 Jun 2003 17:39:25 +0100, Ian Griffiths <[EMAIL PROTECTED]>
wrote:

>What sort of problems are you having?  It would help if you would tell us
>what you have tried so far, and in what way it failed...
>
>But I'm guessing that you're having trouble with the embedded array.
>Embedded arrays seem to be, well, trouble in interop.  Your life will
>probably be easier if you can make this call using Managed C++.  Is that
an
>option for you?  It's very good at dealing with awkward Win32 data
>structures, and is often a good choice if what you're writing is a .NET
>wrapper for some non-.NET api.
>
>
>--
>Ian Griffiths
>DevelopMentor
>
>----- Original Message -----
>From: "Alex Ivanoff" <[EMAIL PROTECTED]>
>
>
>> I am creating a wrapper for Windows media and having problems
marshalling
>> WM_MEDIA_TYPE:
>> typedef struct _WMMediaType{
>>     GUID  majortype;
>>     GUID  subtype;
>>     BOOL  bFixedSizeSamples;
>>     BOOL  bTemporalCompression;
>>     ULONG  lSampleSize;
>>     GUID  formattype;
>>     IUnknown*  pUnk;
>>     ULONG  cbFormat;
>>     [size_is(cbFormat)] BYTE  *pbFormat;
>> } WM_MEDIA_TYPE;
>>
>> The method signature is:
>> IWMMediaProps::GetMediaType(WM_MEDIA_TYPE * pType, DWORD * pcbType);
>>
>> My question is: how to marshal WM_MEDIA_TYPE structure and pbFormat?
>>

Reply via email to