hedgewars/uFLIPC.pas
branchqmlfrontend
changeset 10898 f373838129c2
parent 10428 7c25297720f1
child 10933 f1da4126a61c
equal deleted inserted replaced
10896:5a74923120d5 10898:f373838129c2
     8 
     8 
     9 procedure initIPC;
     9 procedure initIPC;
    10 procedure freeIPC;
    10 procedure freeIPC;
    11 
    11 
    12 procedure ipcToEngine(s: shortstring);
    12 procedure ipcToEngine(s: shortstring);
       
    13 procedure ipcToEngineRaw(p: pointer; len: Longword);
    13 //function  ipcReadFromEngine: shortstring;
    14 //function  ipcReadFromEngine: shortstring;
    14 //function  ipcCheckFromEngine: boolean;
    15 //function  ipcCheckFromEngine: boolean;
    15 
    16 
    16 procedure ipcToFrontend(s: shortstring);
    17 procedure ipcToFrontend(s: shortstring);
    17 procedure ipcToFrontendRaw(p: pointer; len: Longword);
    18 procedure ipcToFrontendRaw(p: pointer; len: Longword);
    81 var msg: TIPCMessage;
    82 var msg: TIPCMessage;
    82 begin
    83 begin
    83     msg.str:= s;
    84     msg.str:= s;
    84     msg.buf:= nil;
    85     msg.buf:= nil;
    85     ipcSend(msg, msgFrontend, mutFrontend, condFrontend)
    86     ipcSend(msg, msgFrontend, mutFrontend, condFrontend)
       
    87 end;
       
    88 
       
    89 procedure ipcToEngineRaw(p: pointer; len: Longword);
       
    90 var msg: TIPCMessage;
       
    91 begin
       
    92     msg.str[0]:= #0;
       
    93     msg.len:= len;
       
    94     msg.buf:= GetMem(len);
       
    95     Move(p^, msg.buf^, len);
       
    96     ipcSend(msg, msgEngine, mutEngine, condEngine)
    86 end;
    97 end;
    87 
    98 
    88 procedure ipcToFrontendRaw(p: pointer; len: Longword);
    99 procedure ipcToFrontendRaw(p: pointer; len: Longword);
    89 var msg: TIPCMessage;
   100 var msg: TIPCMessage;
    90 begin
   101 begin