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