Highlighted
Anonymous_User Absent Member.
Absent Member.
1851 views

Trouble with CoCreateInstance in Admin Objects API

I'm trying to run the C++ sample Groupwise Administrative Objects API
program, and I'm running into a bit of a problem with the CoCreateInstance
function. It's returning the code REGDB_E_CLASSNOTREG, which apparently
means that the class has to be registered somewhere. I've already
installed the groupwise client, and it works perfectly.

Here's the code that causes the error:

//Create Instance
if(FAILED(x = CoCreateInstance(CLSID_System, NULL, CLSCTX_INPROC_SERVER |
CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER, IID_IADSystem,
(void**)&pIGWSystem))) {
printf("Failed to create instancen");
if(x == REGDB_E_CLASSNOTREG) {
std::cout << "Class not registeredn";
}
return -1;
}

Any idea what might cause this or how to fix it?

Thanks,
Bart


Labels (1)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.