Resolved 64-bit incompatibility in singe instance checks
This commit is contained in:
parent
df699f4088
commit
a78d55b527
@ -300,7 +300,7 @@ begin
|
|||||||
|
|
||||||
{ Attempt to create shared memory }
|
{ Attempt to create shared memory }
|
||||||
SetLastError(0);
|
SetLastError(0);
|
||||||
FFileMapping := CreateFileMapping($FFFFFFFF, nil, PAGE_READWRITE, 0,
|
FFileMapping := CreateFileMapping(INVALID_HANDLE_VALUE, nil, PAGE_READWRITE, 0,
|
||||||
SizeOf(TX2InstanceMapData),
|
SizeOf(TX2InstanceMapData),
|
||||||
PChar(ScopePrefix[Global] +
|
PChar(ScopePrefix[Global] +
|
||||||
'SingleInstance.' + ApplicationID));
|
'SingleInstance.' + ApplicationID));
|
||||||
@ -330,8 +330,7 @@ begin
|
|||||||
if FileMapData^.Window = 0 then
|
if FileMapData^.Window = 0 then
|
||||||
RaiseLastOSError();
|
RaiseLastOSError();
|
||||||
|
|
||||||
SetWindowLong(FileMapData^.Window, GWL_WNDPROC,
|
SetWindowLongPtr(FileMapData^.Window, GWL_WNDPROC, NativeInt(MakeObjectInstance(WindowProc)));
|
||||||
Integer(MakeObjectInstance(WindowProc)));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Inc(FFileMapData^.RefCount);
|
Inc(FFileMapData^.RefCount);
|
||||||
|
Loading…
Reference in New Issue
Block a user