Pelles C forum

C language => User contributions => Topic started by: TimoVJL on June 22, 2017, 05:27:32 pm

Title: WTypeLibList
Post by: TimoVJL on June 22, 2017, 05:27:32 pm
Updated version of WTypeLibList.
these modifications was for typelib like in a quartz.dll

test program for headers
Code: [Select]
//#include <dshow.h>
#include <ole2.h>
#include "quartz.h"
#include "qedit.h"
#pragma comment(lib, "ole32.lib")
const GUID CLSID_FilterGraph = {0xe436ebb3,0x524f,0x11ce,{0x9f,0x53,0x0,0x20,0xaf,0xb,0xa7,0x70}};
const GUID IID_IGraphBuilder = {0x56a868a9,0xad4,0x11ce,{0xb0,0x3a,0x0,0x20,0xaf,0xb,0xa7,0x70}};
const GUID IID_IMediaControl = {0x56a868b1,0xad4,0x11ce,{0xb0,0x3a,0x0,0x20,0xaf,0xb,0xa7,0x70}};
const GUID IID_IMediaEvent = {0x56a868b6,0x0ad4,0x11ce,{0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70}};

int main(void)
IGraphBuilder *pGraph = NULL;
IMediaControl *pControl = NULL;
IMediaEvent *pEvent = NULL;
// Initialize the COM library.
HRESULT hr = CoInitialize(NULL);
// Create the filter graph manager and query for interfaces.
hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (void **)&pGraph);
if (pGraph)
hr = pGraph->lpVtbl->QueryInterface(pGraph, &IID_IMediaControl, (void **)&pControl);
hr = pGraph->lpVtbl->QueryInterface(pGraph, &IID_IMediaEvent, (void **)&pEvent);
// Build the graph. IMPORTANT: Change this string to a file on your system.
hr = pGraph->lpVtbl->RenderFile(pGraph, L"video.avi", NULL);
if (SUCCEEDED(hr))
// Run the graph.
hr = pControl->lpVtbl->Run(pControl);
if (SUCCEEDED(hr))
// Wait for completion.
long evCode;
pEvent->lpVtbl->WaitForCompletion(pEvent, INFINITE, &evCode);
// Note: Do not use INFINITE in a real application, because it
// can block indefinitely.
return 0;
Title: Re: WTypeLibList
Post by: jj2007 on June 23, 2017, 02:11:22 am
What's going on, Timo? A revival of DirectShow (  ;)
Title: Re: WTypeLibList
Post by: TimoVJL on June 26, 2017, 07:46:38 pm
I just updated code again for Pelle's nice code for COM interface. (

So why download a huge SDK for a small header file, when we can have a good typelib, that gives you most of details for a header file?

I hope that people inform us about dll/ocx where we can find useful info.
Don't forget FTypeLib (

This way i give something back to Pelle to his great work.
Sure i have also given some with PayPal too ;)

qedit.h needs additional fixes:
rename _PinDirection to PIN_DIRECTION
rename _AMMediaType to AM_MEDIA_TYPE
 comment out between
Code: [Select]
typedef struct _LARGE_INTEGER {