Fix compilation of fcl-process on WinCE

packages/fcl-process/src/winall/simpleipc.inc:
  * a WndProc needs to be declared as cdecl
  * WinCE does not provide Get-/SetWindowLongPtr() as it's 32-bit only anyway, so Get-/SetWindowLong() needs to be used

git-svn-id: trunk@33019 -
This commit is contained in:
svenbarth 2016-01-29 14:37:36 +00:00
parent e15e80ab1f
commit a3871c9d30

View File

@ -190,7 +190,7 @@ end;
MsgWndProc
---------------------------------------------------------------------}
function MsgWndProc(Window: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall;
function MsgWndProc(Window: HWND; uMsg: UINT; wParam: WPARAM; lParam: LPARAM): LRESULT; {$ifdef wince}cdecl;{$else}stdcall;{$endif}
Var
Server: TWinMsgServerComm;
Msg: TMsg;
@ -202,7 +202,7 @@ begin
// Post WM_USER to wake up GetMessage call.
PostMessage(Window, WM_USER, 0, 0);
// Read message data and add to message queue.
Server:=TWinMsgServerComm(GetWindowLongPtr(Window,GWL_USERDATA));
Server:=TWinMsgServerComm({$ifdef wince}GetWindowLong{$else}GetWindowLongPtr{$endif}(Window,GWL_USERDATA));
if Assigned(Server) then
begin
Msg.Message:=uMsg;
@ -246,7 +246,7 @@ begin
PWideChar(aWindowName), WS_POPUP {!0}, 0, 0, 0, 0, 0, 0, HInstance, nil);
if (Result=0) then
Owner.DoError(SErrFailedToCreateWindow,[aWindowName]);
SetWindowLongPtr(Result,GWL_USERDATA,PtrInt(Self));
{$ifdef wince}SetWindowLong{$else}SetWindowLongPtr{$endif}(Result,GWL_USERDATA,PtrInt(Self));
end;
constructor TWinMsgServerComm.Create(AOwner: TSimpleIPCServer);