mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 02:49:21 +02:00
* 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 -
This commit is contained in:
parent
03cd0cce59
commit
aa0422b2ed
@ -946,8 +946,13 @@ implementation
|
|||||||
if printcom then
|
if printcom then
|
||||||
WriteLn('LockServer: ', fLock);
|
WriteLn('LockServer: ', fLock);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ifndef wince}
|
||||||
Result := CoLockObjectExternal(Self, fLock, True);
|
Result := CoLockObjectExternal(Self, fLock, True);
|
||||||
ComServer.CountObject(fLock);
|
ComServer.CountObject(fLock);
|
||||||
|
{$else}
|
||||||
|
RunError(217);
|
||||||
|
Result:=0;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1018,7 +1023,9 @@ implementation
|
|||||||
|
|
||||||
destructor TComObjectFactory.Destroy;
|
destructor TComObjectFactory.Destroy;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef wince}
|
||||||
if fIsRegistered <> dword(-1) then CoRevokeClassObject(fIsRegistered);
|
if fIsRegistered <> dword(-1) then CoRevokeClassObject(fIsRegistered);
|
||||||
|
{$endif}
|
||||||
ComClassManager.RemoveObjectFactory(Self);
|
ComClassManager.RemoveObjectFactory(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1050,9 +1057,13 @@ implementation
|
|||||||
if printcom then
|
if printcom then
|
||||||
WriteLn('TComObjectFactory.RegisterClassObject');
|
WriteLn('TComObjectFactory.RegisterClassObject');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ifndef wince}
|
||||||
if FInstancing <> ciInternal then
|
if FInstancing <> ciInternal then
|
||||||
OleCheck(CoRegisterClassObject(FClassID, Self, CLSCTX_LOCAL_SERVER,
|
OleCheck(CoRegisterClassObject(FClassID, Self, CLSCTX_LOCAL_SERVER,
|
||||||
reg_flags(), @FIsRegistered));
|
reg_flags(), @FIsRegistered));
|
||||||
|
{$else}
|
||||||
|
RunError(217);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user