Wednesday, March 28, 2007

Sample application for creating a filter category in GraphEdit

#include
#include

#pragma comment(lib,"strmiids") //Load the Directshow IIDs...


// {6C93F1D6-45B7-4d28-A1D9-992D71E7150D}
DEFINE_GUID(CLSID_BDLImageProcessing,
0x6c93f1d6, 0x45b7, 0x4d28, 0xa1, 0xd9, 0x99, 0x2d, 0x71, 0xe7, 0x15, 0xd);


int main(int argc, char* argv[])
{
CoInitialize(NULL); //Initialize COM Runtime

HRESULT hr = NOERROR;

IFilterMapper2 *pMapper2= NULL;

hr = CoCreateInstance(CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
IID_IFilterMapper2, (void **)&pMapper2);

if(SUCCEEDED(hr))
{
hr =pMapper2->CreateCategory(CLSID_BDLImageProcessing,MERIT_DO_NOT_USE,L"BDL Image Processing Filters");

if(SUCCEEDED(hr))
{
printf("\n Sucesssfully created the BDL category");
}
}



CoUninitialize(); //Uninitialize COM runtime
return 0;
}

No comments: