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.

76 lines
1.6 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // File: private.h
  4. //
  5. // Contents: Private header for AIMM1.2 WRAPPER project.
  6. //
  7. //----------------------------------------------------------------------------
  8. #ifndef _PRIVATE_H_
  9. #define _PRIVATE_H_
  10. #include <nt.h>
  11. #include <ntrtl.h>
  12. #include <nturtl.h>
  13. #define _OLEAUT32_
  14. #define NOIME
  15. #include <windows.h>
  16. #include <immp.h>
  17. #include <ole2.h>
  18. #include <ocidl.h>
  19. #include <olectl.h>
  20. #include <debug.h>
  21. #include "delay.h"
  22. #include <limits.h>
  23. #include "combase.h"
  24. #if 0
  25. // New NT5 header
  26. #include "immdev.h"
  27. #endif
  28. #define _IMM_
  29. #define _DDKIMM_H_
  30. #include "aimm12.h"
  31. #include "aimmex.h"
  32. #include "aimmp.h"
  33. #include "aimm.h"
  34. #include "msuimw32.h"
  35. #include "immxutil.h"
  36. #include "helpers.h"
  37. #include "osver.h"
  38. #include "mem.h"
  39. #ifndef STRSAFE_NO_DEPRECATE
  40. #define STRSAFE_NO_DEPRECATE
  41. #endif
  42. #include <strsafe.h>
  43. #ifndef ARRAY_SIZE
  44. #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x)[0])
  45. #endif
  46. #ifndef ARRAYSIZE
  47. #define ARRAYSIZE(x) ARRAY_SIZE(x)
  48. #endif
  49. //
  50. // SAFECAST(obj, type)
  51. //
  52. // This macro is extremely useful for enforcing strong typechecking on other
  53. // macros. It generates no code.
  54. //
  55. // Simply insert this macro at the beginning of an expression list for
  56. // each parameter that must be typechecked. For example, for the
  57. // definition of MYMAX(x, y), where x and y absolutely must be integers,
  58. // use:
  59. //
  60. // #define MYMAX(x, y) (SAFECAST(x, int), SAFECAST(y, int), ((x) > (y) ? (x) : (y)))
  61. //
  62. //
  63. #define SAFECAST(_obj, _type) (((_type)(_obj)==(_obj)?0:0), (_type)(_obj))
  64. #endif // _PRIVATE_H_