Browse Source

--- Merging r32822 into '.':
U packages/winunits-base/src/oleserver.pp
--- Recording mergeinfo for merge of r32822 into '.':
U .

# revisions: 32822

git-svn-id: branches/fixes_3_0@33434 -

marco 9 years ago
parent
commit
f7e1b90f59
1 changed files with 10 additions and 7 deletions
  1. 10 7
      packages/winunits-base/src/oleserver.pp

+ 10 - 7
packages/winunits-base/src/oleserver.pp

@@ -46,8 +46,9 @@ type
   TOleServer = class(TComponent, IUnknown)
   TOleServer = class(TComponent, IUnknown)
   private
   private
     FRemoteMachineName: string;
     FRemoteMachineName: string;
-    FEventDispatch: TServerEventDispatch;
     FServerData: PServerData;
     FServerData: PServerData;
+    FEventDispatch:     TServerEventDispatch;
+    FEventsConnection:  DWord;
   protected
   protected
     function QueryInterface(constref IID: TGUID; out Obj): HResult; stdcall; override;
     function QueryInterface(constref IID: TGUID; out Obj): HResult; stdcall; override;
     function _AddRef: Integer; stdcall;
     function _AddRef: Integer; stdcall;
@@ -157,14 +158,16 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TOleServer.ConnectEvents(const Obj: IUnknown);
-      begin
-      end;
+procedure TOleServer.ConnectEvents(const Obj: IUnknown);
+begin
+  ComObj.InterfaceConnect(Obj, FServerData^.EventIID, FEventDispatch, FEventsConnection);
+end;
 
 
 
 
-    procedure TOleServer.DisconnectEvents(const Obj: Iunknown);
-      begin
-      end;
+procedure TOleServer.DisconnectEvents(const Obj: Iunknown);
+begin
+  ComObj.InterfaceDisconnect(Obj, FServerData^.EventIID, FEventsConnection);
+end;
 
 
 
 
     procedure TOleServer.InvokeEvent(DispID: TDispID; var Params: TVariantArray);
     procedure TOleServer.InvokeEvent(DispID: TDispID; var Params: TVariantArray);