Changeset 8897 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- May 16, 2008 2:06:46 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxTray.cpp
r8887 r8897 535 535 int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 536 536 { 537 dprintf(("VBoxService: WinMain\n")); 537 /* Do not use a global namespace ("Global\\") for mutex name here, will blow up NT4 compatibility! */ 538 HANDLE hMutexAppRunning = CreateMutex (NULL, FALSE, "VBoxTray"); 539 if ( (hMutexAppRunning != NULL) 540 && (GetLastError() == ERROR_ALREADY_EXISTS)) 541 { 542 /* Close the mutex for this application instance. */ 543 CloseHandle (hMutexAppRunning); 544 hMutexAppRunning = NULL; 545 return 0; 546 } 547 548 dprintf(("VBoxService: Started.\n")); 549 538 550 gInstance = hInstance; 539 551 VBoxServiceStart(); 540 552 553 dprintf(("VBoxService: Ended.\n")); 554 555 /* Release instance mutex. */ 556 if (hMutexAppRunning != NULL) { 557 CloseHandle (hMutexAppRunning); 558 hMutexAppRunning = NULL; 559 } 560 541 561 return 0; 542 562 }
Note:
See TracChangeset
for help on using the changeset viewer.