فهرست منبع

* fix for Mantis #35964: reestablish pre r42594 behavior for WinCE as at least Windows Mobile does not support the required COM functions

Note: in theory Windows CE *can* support these functions, but it dependends on the provider whether they're indeed supported (e.g. Windows Mobile does not). Probably this should be revisited once we support the "delayed" directive.

git-svn-id: trunk@42696 -
svenbarth 6 سال پیش
والد
کامیت
aa0422b2ed
1فایلهای تغییر یافته به همراه11 افزوده شده و 0 حذف شده
  1. 11 0
      packages/winunits-base/src/comobj.pp

+ 11 - 0
packages/winunits-base/src/comobj.pp

@@ -946,8 +946,13 @@ implementation
          if printcom then 
         WriteLn('LockServer: ', fLock);
 {$endif}
+{$ifndef wince}
           Result := CoLockObjectExternal(Self, fLock, True);
           ComServer.CountObject(fLock);
+{$else}
+          RunError(217);
+          Result:=0;
+{$endif}
       end;
 
 
@@ -1018,7 +1023,9 @@ implementation
 
     destructor TComObjectFactory.Destroy;
       begin
+{$ifndef wince}
         if fIsRegistered <> dword(-1) then CoRevokeClassObject(fIsRegistered);
+{$endif}
         ComClassManager.RemoveObjectFactory(Self);
       end;
 
@@ -1050,9 +1057,13 @@ implementation
          if printcom then 
         WriteLn('TComObjectFactory.RegisterClassObject');
       {$endif}
+{$ifndef wince}
       if FInstancing <> ciInternal then
       OleCheck(CoRegisterClassObject(FClassID, Self, CLSCTX_LOCAL_SERVER,
          reg_flags(), @FIsRegistered));
+{$else}
+      RunError(217);
+{$endif}
     end;