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.

154 lines
3.7 KiB

  1. #ifndef _PRIV_H_
  2. #define _PRIV_H_
  3. #define STRICT
  4. /* disable "non-standard extension" warnings in our code
  5. */
  6. #ifndef RC_INVOKED
  7. #pragma warning(disable:4001)
  8. #endif
  9. // Define these before including dldecl.h
  10. #define DL_OLEAUT32
  11. #define DL_OLE32
  12. #include "dldecl.h" // dldecl.h needs to go before everything else
  13. #define CC_INTERNAL // This is for some internal prshtp.h stuff
  14. //
  15. // need Wx86 definitions from ntpsapi.h
  16. //
  17. #include <nt.h>
  18. #include <ntrtl.h>
  19. #include <nturtl.h>
  20. #include <windows.h>
  21. // VariantInit is a trivial function -- avoid using OleAut32, use intrinsic
  22. // version of memset for a good size win
  23. // (it's here so that atl (in stdafx.h) gets it too)
  24. #define VariantInit(p) memset(p, 0, sizeof(*(p)))
  25. #ifdef __cplusplus
  26. // (stdafx.h must come before windowsx.h)
  27. #include "stdafx.h" // ATL header file for this component
  28. #endif
  29. #include <windowsx.h>
  30. #include <ole2.h> // to get IStream for image.c
  31. #include "..\inc\port32.h"
  32. #include <winerror.h>
  33. #include <winnlsp.h>
  34. #include <docobj.h>
  35. #include <lm.h>
  36. #include <shlobj.h>
  37. #define _SHLWAPI_
  38. #include <shlwapi.h>
  39. #include <ccstock.h>
  40. #include <crtfree.h>
  41. #define DISALLOW_Assert
  42. #include <debug.h>
  43. #include <regstr.h>
  44. #define _WIN32_MSI 110
  45. #include <msi.h> // Darwin APIs
  46. #include <msiquery.h> // Darwin Datebase Query APIs
  47. #include <wininet.h> // For INTERNET_MAX_URL_LENGTH
  48. #include "shappmgrp.h"
  49. #include "shellp.h"
  50. #include <appmgmt.h>
  51. #include "apithk.h"
  52. #include "awthunk.h"
  53. #include <uxtheme.h>
  54. #include <shfusion.h>
  55. #define STRSAFE_NO_DEPRECATE
  56. #include <strsafe.h>
  57. //
  58. // Local includes
  59. //
  60. #define StrCmpIW lstrcmpiW
  61. // This DLL needs to run correctly on Win95. CharNextW is only stubbed
  62. // on Win95, so we need to do this...
  63. #define CharNextW(x) ((x) + 1)
  64. #define CharPrevW(y, x) ((x) - 1)
  65. // This is a TCHAR export on win9x and NT4, and since we need to link to
  66. // the old shell32.nt4/shell32.w95 we #undef it here
  67. #undef ILCreateFromPath
  68. STDAPI_(LPITEMIDLIST) ILCreateFromPath(LPCTSTR pszPath);
  69. //
  70. // Trace/dump/break flags specific to shell32.
  71. // (Standard flags defined in debug.h)
  72. //
  73. // Trace flags
  74. #define TF_OBJLIFE 0x00000010 // Object lifetime
  75. #define TF_DSO 0x00000020 // Data source object
  76. #define TF_FINDAPP 0x00000040 // Find app heuristic stuff
  77. #define TF_INSTAPP 0x00000080
  78. #define TF_SLOWFIND 0x00000100
  79. #define TF_TASKS 0x00000200
  80. #define TF_CTL 0x00000400
  81. #define TF_VERBOSEDSO 0x00000800 // squirts html and stuff
  82. // Break flags
  83. #define BF_ONDLLLOAD 0x00000010
  84. // Prototype flags
  85. #define PF_NEWADDREMOVE 0x00000001
  86. #define PF_NOSECURITYCHECK 0x00000002
  87. #define PF_FAKEUNINSTALL 0x00000004
  88. // Debug functions
  89. #ifdef DEBUG
  90. #define TraceAddRef(classname, cref) TraceMsg(TF_OBJLIFE, #classname "(%#08lx) %d>", (DWORD_PTR)this, cref)
  91. #define TraceRelease(classname, cref) TraceMsg(TF_OBJLIFE, #classname "(%#08lx) %d<", (DWORD_PTR)this, cref)
  92. #else
  93. #define TraceAddRef(classname, cref)
  94. #define TraceRelease(classname, cref)
  95. #endif
  96. #define MAX_URL_STRING INTERNET_MAX_URL_LENGTH
  97. #define RECTWIDTH(rc) ((rc).right-(rc).left)
  98. #define RECTHEIGHT(rc) ((rc).bottom-(rc).top)
  99. STDAPI_(void) DllAddRef(void);
  100. STDAPI_(void) DllRelease(void);
  101. //
  102. // Info string MAX length
  103. //
  104. #define MAX_INFO_STRING MAX_PATH * 3
  105. //
  106. // Global variables
  107. //
  108. EXTERN_C HINSTANCE g_hinst;
  109. #define HINST_THISDLL g_hinst
  110. #define g_bRunOnNT TRUE
  111. #define g_bRunOnNT5 TRUE
  112. EXTERN_C BOOL g_bRunOnIE4Shell;
  113. #endif // _PRIV_H_