anchor.diff:    except
       exit(1);
     end;
  +  result := 0;
   end; exports sIpcReadMsgAsString;
   *)
   
  
positive.code: begin
    srv.ReadMessage;
    // PrintMessage;
  end;
  
  procedure TIpc.Start;
  begin
    srv.StartServer(self.Threaded);
  end;
  
  { Parameters:
  
negative.code:   result:= sIpcExecOnMsg(peektime, sleeptime, nil, nil, nil, nil, cb);
  end; exports sIpcExecOnIntStr;
  
  { returns errors:
     0: no errors
     1: ipc variable already created, can't create again until freed first
     2: ipc server already created, can't create again until freed first }
  function sIpcCreateServer: int32; cdecl;
  begin
    if assigned(ipc) then exit(1);
    if assigned(ipc.srv) then exit(2);
    ipc := TIpc.Create;
    ipc.srv := TSimpleIPCServer.Create(nil);
    result := 0;
  end; exports sIpcCreateServer;
  
  
  { returns
    0: success
    1: error stopping the server
    2: ipc variable not assigned (is nil), can't free variable that doesn't exist
    3: ipc server variable not assigned, trying to free server that doesn't exist }
  function sIpcFreeServer: int32; cdecl;
  
    procedure cleanup;
    begin
      ipc.srv.free; ipc.srv := nil;
      ipc.free; ipc := nil;
    end;
  
  begin
  