Board index » delphi » Enumerating ROT problem

Enumerating ROT problem

Hi,

I'm trying to enumerate the ROT thru IRunningObjectTable API.

I've two problems:

1/ Registering an object using IRunningObjectTable.Register. My code is:

  OleCheck(GetRunningObjectTable(0,FRot));
  OleCheck(CreatePointerMoniker(IUnknown(self),Moniker));
  OleCheck(FRot.Register(0,IUnknown(self),IMoniker(Moniker),pwdRegister));

the last line raises the exception "not implemented" <g>.

2/ Registering the server thru RegisterActiveObject() API (OK). and
iterating thru the ROT using:

  OleCheck(GetRunningObjectTable(0,FRot));
  OleCheck(FRot.EnumRunning(FEnumMoniker));
  OleCheck(FEnumMoniker.Reset);

  while     OleCheck(FEnumMoniker.Next(1,FMoniker,@NB)) = S_OK do
  begin

    OleCheck(FMoniker.GetClassId(classId));
    try
      ClassIdToProgId(classId);
      if ClassIdToProgId(classId) = 'FrlTierInt.Session' then
      begin
            .................
      end;
    except
    end;

  end;

With this code I never find my server registerated with
RegisterActiveObject.

I need a clue. thanks.

Gilles

 

Re:Enumerating ROT problem


Quote

>  OleCheck(GetRunningObjectTable(0,FRot));
>  OleCheck(CreatePointerMoniker(IUnknown(self),Moniker));

.......try.....OleCheck(CreatePointerMoniker(self as IUnknown,Moniker));
Quote
>  OleCheck(FRot.Register(0,IUnknown(self),IMoniker(Moniker),pwdRegister));

.......and...OleCheck(FRot.Register(0, self as IUnknown, Moniker as
IUnknown, pwdRegister)

Other Threads