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