2011/3/5 Georgi Petrov <[email protected]>:
> Hi,
>
> I have a quick question. I can't figure out something. I have the
> following COM function definition:
> STDAPI MFCreateVideoRenderer(REFIID riidRenderer, void ** ppVideoRenderer);
>
> The first parameter (riidRenderer) is Interface indentifier (IID) of a
> COM class. When calling MFCreateVideoRenderer, I want to pass a
> particular IID, for example IID_IMFMediaSink.
>
> In C++, I would write:
> MFCreateVideoRenderer(__uuidof (IID_IMFMediaSink), ...
>
> However, in C, this is not possible. The GUID of my desired interface
> (IID_IMFMediaSink) is
> 0x6ef2a660,0x47c0,0x4666,0xb1,0x3d,0xcb,0xb7,0x17,0xf2,0xfa,0x2c and I
> have defined it myself like this:
>
> DEFINE_GUID(IID_IMFMediaSink,
> 0x6ef2a660,0x47c0,0x4666,0xb1,0x3d,0xcb,0xb7,0x17,0xf2,0xfa,0x2c);
>
> Then how can I "convert" it to a suitable first parameter of
> MFCreateVideoRenderer? I've been stuck with this problem for 2 days
> and I really can't figure it out. Any help will be appreciated!
>
> Georgi

Well, pretty easy. Just pass to this function the address of the GUID.
the __uuidof keyword in fact returns a const GUID * for C (for C++ it
is a const GUID &).

Regards,
Kai

------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to