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.

83 lines
2.2 KiB

  1. //Copyright (c) 1998 - 1999 Microsoft Corporation
  2. /*******************************************************************************
  3. *
  4. * common.h
  5. *
  6. * WINUTILS commmon helper function header file
  7. *
  8. * copyright notice: Copyright 1995, Citrix Systems Inc.
  9. *
  10. * $Author: butchd $ Butch Davis
  11. *
  12. * $Log: N:\NT\PRIVATE\UTILS\CITRIX\WINUTILS\COMMON\VCS\COMMON.H $
  13. *
  14. * Rev 1.10 20 Sep 1996 20:35:34 butchd
  15. * update
  16. *
  17. *******************************************************************************/
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #ifndef COMMON_H_INCLUDED
  22. #define COMMON_H_INCLUDED
  23. /*
  24. * Include files to be compatible with 'basic' NT typedefs, defines, and function
  25. * prototypes. All WINUTILS WIN16 applications which are derived from a common
  26. * WIN32 (NT) code base should include this file (common.h ) to take care of this
  27. * stuff.
  28. */
  29. #ifdef WIN16
  30. #include <stdarg.h> // for va_list, va_start, va_end definitions
  31. #include <string.h> // for strncpy and related functions
  32. #ifndef _INC_TCHAR
  33. #include <tchar.h> // for TCHAR related stuff (provided for in afxver_.h)
  34. #define TEXT _T
  35. #define LPCTSTR LPCSTR
  36. #define LPTSTR LPSTR
  37. #endif /* _INC_TCHAR */
  38. #define MAX_PATH 255
  39. typedef unsigned short USHORT;
  40. typedef unsigned long ULONG;
  41. #define BASED_DATA __based(__segname("_DATA"))
  42. #else // WIN32
  43. #define BASED_DATA
  44. #endif // WIN16
  45. /*
  46. * WINUTILS common helper function typedefs & defines
  47. */
  48. /*
  49. * WINUTILS common helper function prototypes
  50. */
  51. void ErrorMessage( int nErrorResourceID, ...);
  52. void ErrorMessageStr( LPTSTR pErrorString, int nErrorStringLen,
  53. int nErrorResourceID, ...);
  54. #ifdef WIN16
  55. void ErrorMessageWnd( HWND hWnd, int nErrorResourceID, ...);
  56. #else
  57. void ErrorMessageWndA( HWND hWnd, int nErrorResourceID, ...);
  58. void ErrorMessageWndW( HWND hWnd, int nErrorResourceID, ...);
  59. #ifdef UNICODE
  60. #define ErrorMessageWnd ErrorMessageWndW
  61. #else
  62. #define ErrorMessageWnd ErrorMessageWndA
  63. #endif // UNICODE
  64. #endif // WIN16
  65. int QuestionMessage( UINT nType, int nQuestionResourceID, ...);
  66. int QuestionMessageWnd( HWND hWnd, UINT nType, int nQuestionResourceID, ...);
  67. /*
  68. * ANSI / UNICODE function defines
  69. */
  70. #include "..\..\inc\ansiuni.h"
  71. #endif // COMMON_H_INCLUDED
  72. #ifdef __cplusplus
  73. }
  74. #endif