Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Nov : COM server in a service

www.cryer.info
Managed Newsgroup Archive

COM server in a service

Subject:COM server in a service
Posted by:"Arthur Hoornweg" (antispam.hoornweg@casema.nl.net)
Date:Wed, 22 Nov 2006 13:52:08

Hello all,

could someone point me to some resources about implementing a com
server inside a service?

I am running into all kinds of weird issues such as
"RegisterActiveObject" not
producing the desired result (com clients don't find the server in the
running
object table) etcetera.

I tried alternative methods of registering the COM server, but to no
avail either:


Procedure  tdatasyncapplication.Initialize;
VAR Rot:irunningObjectTable;
     Moniker : imoniker;
     hr:hresult;
begin
   rot:=Nil;
   moniker:=nil;
   fid:=0;
   hr:=Createpointermoniker(self as iunknown, Moniker);
   hr:=GetRunningObjectTable(0,Rot);
   hr:=rot.register (ROTFLAGS_ALLOWANYCLIENT, self as iUnknown,moniker,fid);
end;


--
Arthur Hoornweg

(In order to reply per e-mail, please just remove the ".net"
  from my e-mail address. Leave the rest of the address intact
  including the "antispam" part. I had to take this measure to
  counteract unsollicited mail.)

Replies:

www.cryer.info
Managed Newsgroup Archive