Re: Further comment regarding misreading of post

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 07/18/04


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!
> > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Relevant Pages

  • Re: GetActiveObject() does not work
    ... Microsoft MVP, MCSD ... > The server calls CComModule::RegisterClassObjectsto register the class ... id in the ROT is returned. ... the one which I am passing to GetActiveObject(). ...
    (microsoft.public.win32.programmer.ole)
  • Re: Registering in ROT with ROTFLAGS_ALLOWANYCLIENT
    ... Reconsider your design. ... Microsoft MVP, MCSD ... then our call to register in the ROT works fine. ...
    (microsoft.public.win32.programmer.ole)
  • Re: RunningObjectTable problem
    ... communicating with the SNMP Agent is kind of a router, ... It's not clear from your post why you need to register a COM ... object in ROT from an SNMP extension DLL. ...
    (microsoft.public.vc.atl)
  • Re: Check if a DCOM Server is already running
    ... Yes I was guessing since I've always been using the ATL Framework and ... registering the DCOM server correctly within the ROT. ... > coded to instantiate an object explicitly and register it in the ROT, ... >> instanciate the interface if it's running then lets instanciate it. ...
    (microsoft.public.win32.programmer.ole)
  • Re: RunningObjectTable problem
    ... "A server registered as either LocalService or RunAs can set the ... ROTFLAGS_ALLOWANYCLIENT flag in its call to Register to allow any client to ... ROT, the object should be accesible to usermode applications ... Have you register the object with the ROTFLAGS_ALLOWANYCLIENT flag set? ...
    (microsoft.public.dotnet.languages.vc)