Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1993-2001 Microsoft Corporation
  3. Module Name:
  4. drwtsn32.cpp
  5. Abstract:
  6. This file implements the user interface for DRWTSN32. this includes
  7. both dialogs: the ui for the control of the options & the popup
  8. ui for application errors.
  9. Author:
  10. Wesley Witt (wesw) 1-May-1993
  11. Environment:
  12. User Mode
  13. --*/
  14. #include "pch.cpp"
  15. int
  16. __cdecl
  17. main(
  18. int argc,
  19. _TCHAR *argv[]
  20. )
  21. /*++
  22. Routine Description:
  23. This is the entry point for DRWTSN32
  24. Arguments:
  25. argc - argument count
  26. argv - array of arguments
  27. Return Value:
  28. always zero.
  29. --*/
  30. {
  31. DWORD dwPidToDebug = 0;
  32. HANDLE hEventToSignal = 0;
  33. BOOLEAN rc;
  34. // Keep Dr. Watson from recursing
  35. __try {
  36. rc = GetCommandLineArgs( &dwPidToDebug, &hEventToSignal );
  37. if (dwPidToDebug > 0) {
  38. NotifyWinMain();
  39. } else if (!rc) {
  40. DrWatsonWinMain();
  41. }
  42. } __except (EXCEPTION_EXECUTE_HANDLER) {
  43. // We suffered an error, fail gracefully
  44. return 1;
  45. }
  46. return 0;
  47. }