Re: Further comment regarding misreading of post
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 07/18/04
- Next message: Alexander Nickolov: "Re: Proxy code generation is broken in latest MIDL version"
- Previous message: Alexander Nickolov: "Re: Further comment regarding misreading of post"
- In reply to: Banner: "Further comment regarding misreading of post"
- Next in thread: Banner: "Re: Further comment regarding misreading of post"
- Reply: Banner: "Re: Further comment regarding misreading of post"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 17 Jul 2004 19:43:40 -0700
Furthermore, Kim is right, and I have to read more carefully
when replying. You never registered your object in the ROT,
that's why you can't find it there. ROT is not related to the
table of registered class objects (which you can't query
through any documented APIs, other than CoGetClassObject
and CoCreateInstance[Ex]). ROT contains objects, not class
objects.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Banner" <Banner@discussions.microsoft.com> wrote in message news:FC27CF93-75CD-4D03-9F8D-AC6EE5371853@microsoft.com... > > The message ID that I reported has the define "MK_E_UNAVAILABLE", reporting that the class is not in the ROT (not that it has an invalid format for a class id). > > I just went ahead and used a named semaphore to determine whether the server is running. Yes, it only took 5 minutes, but that solution only works because I wrote the server as well as the client, and I should not have to do that; it should be easy to determine whether a class is in the ROT. It certainly appears that GetActiveObject() is returning an erroneous result. > > Thanks > > "Alexander Nickolov" wrote: > > > // > > // MessageId: CO_E_CLASSSTRING > > // > > // MessageText: > > // > > // Invalid class string > > // > > #define CO_E_CLASSSTRING _HRESULT_TYPEDEF_(0x800401F3L) > > > > Do I need to add any comment here? > > > > -- > > ===================================== > > Alexander Nickolov > > Microsoft MVP [VC], MCSD > > email: agnickolov@mvps.org > > MVP VC FAQ: http://www.mvps.org/vcfaq > > ===================================== > > "Banner" <Banner@discussions.microsoft.com> wrote in message > > news:CE365377-A32D-4F64-8B61-8AFA6C64B157@microsoft.com... > > > > > > Well, GetActiveObject() is returning 0x800401e3 even though the server > > associated with the CLSID is active. > > > > > > The server calls CComModule::RegisterClassObjects() to register the class > > id in the ROT (and an HRESULT of 0) is returned. I have checked the table > > used by CComModule::RegisterClassObjects() and there is a single class ID in > > it, the one which I am passing to GetActiveObject(). Starting multiple > > clients works fine, they all attach to the same server instance, so I > > presume that the class ID is in the ROT. > > > > > > Any suggestions? > > > Thanks > > > > > > "Volker Hilsheimer" wrote: > > > > > > > Check if GetActiveObject return S_OK. > > > > > > > > Volker > > > > > > > > "Banner" <Banner@discussions.microsoft.com> wrote in message > > > > news:58FD7C88-812B-451A-BC1F-0347E08FC5CD@microsoft.com... > > > > > This is a repost of the previous message as I didn't realize the > > premium > > > > on subject line space. > > > > > > > > > > We all know how to add a class id (GUID) into the running object > > table. > > > > We do it in every COM server that we write. However, given a class ID > > > > how can one determine whether the class is in the ROT? > > > > > > > > > > A function such as: bool bInRunningObjectTable(const CLSID& classID) > > > > > > > > > > Thanks in advance! > > > > > > > > > > > > > > > > > > > > > > >
- Next message: Alexander Nickolov: "Re: Proxy code generation is broken in latest MIDL version"
- Previous message: Alexander Nickolov: "Re: Further comment regarding misreading of post"
- In reply to: Banner: "Further comment regarding misreading of post"
- Next in thread: Banner: "Re: Further comment regarding misreading of post"
- Reply: Banner: "Re: Further comment regarding misreading of post"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|