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?
>