On 30-Sep-07, at 9:26 PM, E. Tejkowski wrote:
> I don't have a Win32 C compiler handy at the moment, otherwise I
> could check this stuff myself… but I need a little help translating a
> Win32 struct to an RB struct.
>
> 1. In the struct below, how should I handle the GUID type? (e.g. how
> many bytes is it?)
> 2. Is the BOOL type equivalent to RB's Boolean type?
> 3. And, what does the gobbledy-gook in front of "BYTE
> *pbFormat" (i.e. [size_is(cbFormat)]) mean?
>
> typedef struct _MediaType {
> GUID majortype;
> GUID subtype;
> BOOL bFixedSizeSamples;
> BOOL bTemporalCompression;
> ULONG lSampleSize;
> GUID formattype;
> IUnknown *pUnk;
> ULONG cbFormat;
> [size_is(cbFormat)] BYTE *pbFormat;
> } AM_MEDIA_TYPE;
>
1) GUID's are 16 bytes (128 bits)
2) it's been a while but I believe they should be an int (16 or 32
bits I don't recall)
3) you'd have to look up what size_is does but I expect it's a
compile time macro that expands out to get you some specific kind of
pointer based on architecture
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|