G
Guest
Hello everyone,
The return value of CoCreateInstance is -2146232576, which is un-documented
in MSDN.
http://msdn2.microsoft.com/en-us/library/ms686615.aspx
What does it mean? What is wrong with my code?
thanks in advance,
George
The return value of CoCreateInstance is -2146232576, which is un-documented
in MSDN.
http://msdn2.microsoft.com/en-us/library/ms686615.aspx
What does it mean? What is wrong with my code?
Code:
HRESULT hr = CoCreateInstance(CLSID_MyDriver,
NULL,
CLSCTX_INPROC_SERVER,
IID_IMyDriver,
reinterpret_cast<void**>(&driver_interface));
if (FAILED(hr))
{
if (hr == REGDB_E_CLASSNOTREG)
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
else if (hr == CLASS_E_NOAGGREGATION)
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
else if (hr == E_NOINTERFACE)
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
else if (hr == S_OK)
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
else
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
}
thanks in advance,
George