Source code of Windows XP (NT5)
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.

94 lines
1.5 KiB

  1. //
  2. // Application Verifier UI
  3. // Copyright (c) Microsoft Corporation, 2001
  4. //
  5. //
  6. //
  7. // module: AVGlobal.cpp
  8. // author: DMihai
  9. // created: 02/23/2001
  10. //
  11. // Description:
  12. //
  13. // Global data and initialization code
  14. //
  15. #include "stdafx.h"
  16. #include "appverif.h"
  17. #include "AVGlobal.h"
  18. #include "AVUtil.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. //
  25. // Application name ("Application Verifier Manager")
  26. //
  27. CString g_strAppName;
  28. //
  29. // GUI mode or command line mode?
  30. //
  31. BOOL g_bCommandLineMode = FALSE;
  32. //
  33. // Exe module handle - used for loading resources
  34. //
  35. HMODULE g_hProgramModule;
  36. //
  37. // Help file name
  38. //
  39. TCHAR g_szAVHelpFile[] = _T( "appverif.hlp" );;
  40. //
  41. // Previous page IDs - used for implementing the "back"
  42. // button functionality
  43. //
  44. CDWordArray g_aPageIds;
  45. ////////////////////////////////////////////////////////////////
  46. BOOL AVInitalizeGlobalData( VOID )
  47. {
  48. BOOL bSuccess;
  49. bSuccess = FALSE;
  50. //
  51. // Exe module handle - used for loading resources
  52. //
  53. g_hProgramModule = GetModuleHandle( NULL );
  54. //
  55. // Load the app name from the resources
  56. //
  57. TRY
  58. {
  59. bSuccess = AVLoadString( IDS_APPTITLE,
  60. g_strAppName );
  61. if( TRUE != bSuccess )
  62. {
  63. AVErrorResourceFormat( IDS_CANNOT_LOAD_APP_TITLE );
  64. }
  65. }
  66. CATCH( CMemoryException, pMemException )
  67. {
  68. AVErrorResourceFormat( IDS_NOT_ENOUGH_MEMORY );
  69. }
  70. END_CATCH
  71. return bSuccess;
  72. }