B
Bernard Duggan
(Apologies - I posted this to the AD group before I noticed there was a GP group)
Hi all,
We're having an interesting issue with the GetGPOList() function.
Our basic little test app (which just registers a GPO watcher and
dumps GetGPOList() output to the console) works fine. When we go to
use it in our application, however, it returns FALSE, and
GetLastError() returns 262 (an error code that I can't for the life of
me find mentioned anywhere).
I've tracked the problem down to a call we make to
CoInitializeEx(NULL, COINIT_MULTITHREADED);
If I change this call to just
CoInitialize(NULL);
(which if I read the docs right, uses a single-threaded model)
everything starts working fine (except that it breaks the rest of our
product, so I'd rather not have to resort to that).
Any ideas? The GetGPOList() et al documentation doesn't seem to
contain any mention of problems with COM or its threading models.
Obviously the other option is to break this out into a separate
executable, but again, it's something I'd rather avoid if possible.
Cheers,
Bernard
Hi all,
We're having an interesting issue with the GetGPOList() function.
Our basic little test app (which just registers a GPO watcher and
dumps GetGPOList() output to the console) works fine. When we go to
use it in our application, however, it returns FALSE, and
GetLastError() returns 262 (an error code that I can't for the life of
me find mentioned anywhere).
I've tracked the problem down to a call we make to
CoInitializeEx(NULL, COINIT_MULTITHREADED);
If I change this call to just
CoInitialize(NULL);
(which if I read the docs right, uses a single-threaded model)
everything starts working fine (except that it breaks the rest of our
product, so I'd rather not have to resort to that).
Any ideas? The GetGPOList() et al documentation doesn't seem to
contain any mention of problems with COM or its threading models.
Obviously the other option is to break this out into a separate
executable, but again, it's something I'd rather avoid if possible.
Cheers,
Bernard