示例#1
0
// Init Live Tracker services, if available
void LiveTrackerInit()
{
  if (LiveTrackerInterval == 0) {
    // If livetracker is not enabled at startup, we do nothing, 
    // but in this case LK must be restarted, if user enables it!
    #if TESTBENCH
    StartupStore(TEXT(". LiveTracker disabled.%s"), NEWLINE);
    #endif
    return;
  }
  //Init winsock if available
  if (InitWinsock()) {
    _ws_inited = true;

    // Create a thread for sending data to the server
    _Thread.start(_ThreadTarget);
    _Thread.setPriority(Poco::Thread::PRIO_NORMAL);
    TCHAR2ascii(LiveTrackersrv_Config, _server_name, SERVERNAME_MAX);
    _server_name[SERVERNAME_MAX-1]=0;
    _server_port=LiveTrackerport_Config;
    StartupStore(TEXT(". LiveTracker will use server %s if available.%s"), LiveTrackersrv_Config, NEWLINE);
    _inited = true;
  }
  if (!_inited) StartupStore(TEXT(". LiveTracker init failed.%s"),NEWLINE);
}
示例#2
0
void MapWindow::CreateDrawingThread(void)
{
  Initialize();

  CLOSETHREAD = FALSE;
  THREADEXIT = FALSE;

#ifndef ENABLE_OPENGL
  MapWindowThread.start(MapWindowThreadRun);
  MapWindowThread.setPriority(Poco::Thread::PRIO_NORMAL);
#endif
}