anchor.diff:    result:= sIpcExecOnMsg(peektime, sleeptime, nil, nil, nil, nil, cb);
   end; exports sIpcExecOnIntStr;
   
  -
   { returns errors:
      0: no errors
  -   1: server already created, can't create again until freed first
  -   2: threaded IPC not available on this operating system or platform
  -   3: other error
  -}
  -function sIpcCreateServer(ServerID: pchar; threaded: int32): int32; cdecl;
  +   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
  -    if assigned(ipc) then begin
  -       if assigned(ipc.srv) then ipc.srv.free;
  -       ipc.free; ipc := nil;
  -    end;
  -  end;
  -begin
  -  result := 0;
  -  if assigned(ipc) then begin
  -    // StatusLn('IPC not created, because an existing server was already created');
  -    exit(1);
  -  end;
  -  ipc := TIpc.Create;
  -  try
  -    ipc.srv := TSimpleIPCServer.Create(nil);
  -    try
  -      // StatusLn('IPC server created');
  -      ipc.srv.ServerID := ServerID;
  -      ipc.srv.global := true;
  -      case threaded of
  -        OPT_THREAD: ipc.Threaded := true;
  -        OPT_NO_THREAD: ipc.Threaded := false;
  -      else
  -        ipc.Threaded := false;
  -      end;
  -
  -      if ipc.Threaded then begin
  -       {$IFDEF windows}
  -        cleanup;
  -        exit(2);
  -       {$ELSE}
  -        // StatusLn('using threaded ipc server');
  -        ipc.srv.OnMessageQueued := @ipc.MessageQueued;
  -       {$ENDIF}
  -      end;
  -    except
  -      cleanup;
  -      exit(3);
  -    end;
  -
  -  except
  -    cleanup;
  -    exit(3);
  -  end;
  -end; exports sIpcCreateServer;
  -
  -// simple test with default server ID of 12345test
  -procedure sIpcCreateServerTest; cdecl;
  -begin
  -  sIpcCreateServer(TEST_SERVER_ID, OPT_NO_THREAD);
  -end; exports sIpcCreateServerTest;
  -
  -{ returns
  -  1: error stopping the server
  -  2: ipc variable not assigned, trying to free variable that doesn't exist
  -  3: ipc server variable not assigned, trying to free server that doesn't exist
  -  4: error freeing ipc server
  -}
  -function sIpcFreeServer: int32; cdecl;
  -
  -  procedure cleanup;
  -  begin ipc.free; ipc := nil;
  +    ipc.srv.free; ipc.srv := nil;
  +    ipc.free; ipc := nil;
     end;
   
   begin
  
positive.code: }
  function sIpcReadMsgAsString(buf: pchar): int32; cdecl;
  begin
    result := 0;
    if not assigned(ipc) then exit(3);
    if not assigned(ipc.srv) then exit(4);
    if not ipc.srv.active exit(5);
  
negative.code: begin
    srv.ReadMessage;
    // PrintMessage;
  end;
  
  { Parameters:
  