示例#1
0
void
init_win32 (void)
{
  if (WSAStartup(0x0101, &wsa_state))
    {
      msg (M_ERR, "WSAStartup failed");
    }
  window_title_clear (&window_title);
  win32_signal_clear (&win32_signal);
  netcmd_semaphore_init ();
}
示例#2
0
文件: win32.c 项目: Low-power/openvpn
void
netcmd_semaphore_lock (void)
{
  const int timeout_seconds = 600;

  if (!netcmd_semaphore.hand)
    netcmd_semaphore_init ();

  if (!semaphore_lock (&netcmd_semaphore, timeout_seconds * 1000))
    msg (M_FATAL, "Cannot lock net command semaphore"); 
}