CoCreateInstance class not regsitered


I am pretty new to COM and I apologize for asking "may be" stupid questions. Currently, I am trying to reverse engineer an application.

The following lines of code

hr = CoCreateInstance( CLSID_SampleGrabber, NULL, CLSCTX_ALL,
IID_IBaseFilter, (LPVOID *)&mISampleFilter );

if(hr == S_OK){
logToFile("CoCreateInstance : CLSID_SampleGrabber : created successfully");
logToFile("A specified class is not registered in the registration database.");
logToFile("This class cannot be created as part of an aggregate.");
if(hr == E_NOINTERFACE){
logToFile("The specified class does not implement the requested ....");
if(hr == E_POINTER){
logToFile("The ppv parameter is NULL.");
//logToFile is my custom built logger function
"A specified class is not registered in the registration database" gets logged to the log file. I went ahead and printed the CLSID_SampleGrabber

hr = StringFromCLSID(CLSID_SampleGrabber, &wszClsid);
if (SUCCEEDED(hr)) {
logToFile ("Sample Grabber CLSID is ");
//convertToString is my custom built function
It logs "00000000-0000-0000-0000-000000000000" to the file. Its pretty obvious that it is not finding the correct CLSID for "SampleGrabber". However when I look into qedit.h file (which is included) it seems to have been defined there.
EXTERN_C const CLSID CLSID_SampleGrabber;
#ifdef __cplusplus
class DECLSPEC_UUID("C1F400A0-3F08-11d3-9F0B-006008039E37")

Why is it reading "00000000-0000-0000-0000-000000000000" when it should read it as "C1F400A0-3F08-11d3-9F0B-006008039E37". What I am missing ? To experiment, i deliberately rename qedit.h file to Xqedit.h and my project would not compile. So its clear that it is trying to include and build qedit.h. Any help will be appreciated. Thanks in advance
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!