|
First you need to know either the CLSID or the ProgID of the server. If you know the CLSID then convert the CLSID to a string using StringFromCLSID. Then attempt to open the following registry key:
HKEY_CLASSES_ROOT\CLSID\"Your server's CLSID as a string"
If the key exists then the server has been installed on this machine.
If you have the ProgID, you can use CLSIDFromProgID() to get the CLSID and then proceed as indicated above.
The other option, is to use CoCreateInstance() to see if you can actually create the object and then shut it down. However, that might affect performance of your app unacceptably.
|
|
|
|
|
Call CoGetClassObject() and test to see if it fails with the REGDB_E_CLASSNOTREG error:
IClassFactory* pCF = NULL;
HRESULT hResult = CoGetClassObject(CLSID_TheObject, NULL,
CLSCTX_WHATEVER_YOU_WANT_TO_USE, (void**)&pCF);
if (FAILED(hResult))
{
if (hResult == REGDB_E_CLASSNOTREG)
{
// the server's not registered properly...
}
}
|
|
|
|
|
Hi,
I'm writing an add-in in Visual C++. I'd like to attach my own docking dialog bar and child window
to Visual C++ so it will look like an intergral part of it. I haven't been able to do that, and even though
MSDN says that you can create modeless dialogs (because they don't have their own message pump),
I HAVE seen an add-in called RadVC which similated a Visual Basic environment in Visual C++ - which
indicates that it IS possible to do what I want.
How can I do it then? Is there a specific COM interface for doing that?
Thanks.
|
|
|
|
|
Hi
I've implemented some code that adds an item to the context menu , but I need to add two subitems for that item.
Can you please help me ?
Thanks
|
|
|
|
|