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.

111 lines
3.1 KiB

  1. //
  2. // Application Verifier UI
  3. // Copyright (c) Microsoft Corporation, 2001
  4. //
  5. //
  6. //
  7. // module: AVUtil.h
  8. // author: DMihai
  9. // created: 02/23/2001
  10. //
  11. // Description:
  12. //
  13. //
  14. #ifndef __APP_VERIFIER_UTIL_H__
  15. #define __APP_VERIFIER_UTIL_H__
  16. ///////////////////////////////////////////////////////////////////////////
  17. //
  18. // ARRAY_LENGTH macro
  19. //
  20. #ifndef ARRAY_LENGTH
  21. #define ARRAY_LENGTH( array ) ( sizeof( array ) / sizeof( array[ 0 ] ) )
  22. #endif //#ifndef ARRAY_LENGTH
  23. ///////////////////////////////////////////////////////////////////////////
  24. //
  25. // Report an error using a dialog box or a console message.
  26. // The message format string is loaded from the resources.
  27. //
  28. void __cdecl AVErrorResourceFormat( UINT uIdResourceFormat,
  29. ... );
  30. ///////////////////////////////////////////////////////////////////////////
  31. //
  32. // Print out a message to the console
  33. // The message string is loaded from the resources.
  34. //
  35. void __cdecl AVTPrintfResourceFormat( UINT uIdResourceFormat,
  36. ... );
  37. ///////////////////////////////////////////////////////////////////////////
  38. //
  39. // Print out a simple (non-formatted) message to the console
  40. // The message string is loaded from the resources.
  41. //
  42. void AVPrintStringFromResources( UINT uIdString );
  43. ///////////////////////////////////////////////////////////////////////////
  44. //
  45. // Report an error using a dialog box or a console message.
  46. // The message string is loaded from the resources.
  47. //
  48. void AVMesssageFromResource( UINT uIdString );
  49. ///////////////////////////////////////////////////////////////////////////
  50. //
  51. // Display a message box with a message from the resources.
  52. //
  53. INT AVMesssageBoxFromResource( UINT uIdString,
  54. UINT uMsgBoxType );
  55. ///////////////////////////////////////////////////////////////////////////
  56. //
  57. // Load a string from resources.
  58. // Return TRUE if we successfully loaded and FALSE if not.
  59. //
  60. // N.B. CString::LoadString doesn't work in cmd line mode
  61. //
  62. BOOL AVLoadString( ULONG uIdResource,
  63. TCHAR *szBuffer,
  64. ULONG uBufferLength );
  65. ///////////////////////////////////////////////////////////////////////////
  66. //
  67. // Load a string from resources.
  68. // Return TRUE if we successfully loaded and FALSE if not.
  69. //
  70. // N.B. CString::LoadString doesn't work in cmd line mode
  71. //
  72. BOOL AVLoadString( ULONG uIdResource,
  73. CString &strText );
  74. /////////////////////////////////////////////////////////////////////////////
  75. BOOL AVSetWindowText( CWnd &Wnd,
  76. ULONG uIdResourceString );
  77. /////////////////////////////////////////////////////////////////////////////
  78. BOOL
  79. AVRtlCharToInteger( LPCTSTR String,
  80. IN ULONG Base OPTIONAL,
  81. OUT PULONG Value );
  82. /////////////////////////////////////////////////////////////////////////////
  83. BOOL
  84. AVWriteStringHexValueToRegistry( HKEY hKey,
  85. LPCTSTR szValueName,
  86. DWORD dwValue );
  87. #endif //#ifndef __APP_VERIFIER_UTIL_H__