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.

79 lines
2.4 KiB

  1. #ifndef _pch_h
  2. #define _pch_h
  3. #if defined(DBG) || defined(DEBUG)
  4. #ifndef DEBUG
  5. #define DEBUG 1
  6. #endif
  7. #else
  8. #undef DEBUG
  9. #endif
  10. #define STRICT_TYPED_ITEMIDS
  11. #include <windows.h>
  12. #include <windowsx.h>
  13. #include <debug.h>
  14. #include <shlobj.h>
  15. #include <shlwapi.h>
  16. #include <ccstock.h>
  17. #include <port32.h>
  18. #include <shsemip.h>
  19. #include <shlwapip.h>
  20. #include <shlapip.h>
  21. #include <shlobjp.h> // for shellp.h
  22. #include <shellp.h> // SHFOLDERCUSTOMSETTINGS
  23. #include <cfdefs.h> // CClassFactory, LPOBJECTINFO
  24. #include <comctrlp.h>
  25. #include <shfusion.h>
  26. #include <msginaexports.h>
  27. //
  28. // The new strict ITEMID types were added to the Lab06 Longhorn branch, but
  29. // this timewarp UI is being checked into Lab03 for .NET Server, which won't
  30. // have the Lab06 changes until after server ships.
  31. //
  32. // This block is temporary and can be removed from Lab06.
  33. //
  34. #ifndef PIDLIST_ABSOLUTE
  35. #define PIDLIST_ABSOLUTE LPITEMIDLIST
  36. #define PCIDLIST_ABSOLUTE LPCITEMIDLIST
  37. #define PIDLIST_RELATIVE LPITEMIDLIST
  38. #define PCUIDLIST_RELATIVE LPCITEMIDLIST
  39. #define PITEMID_CHILD LPITEMIDLIST
  40. #define PCUITEMID_CHILD LPCITEMIDLIST
  41. #define PCUITEMID_CHILD_ARRAY LPCITEMIDLIST*
  42. #define PCUIDLIST_RELATIVE_ARRAY LPCITEMIDLIST*
  43. #define SHILCloneFull SHILClone
  44. __inline HRESULT SHILCloneFirst(PCUIDLIST_RELATIVE pidl, PITEMID_CHILD *ppidlOut)
  45. {
  46. *ppidlOut = ILCloneFirst(pidl);
  47. return *ppidlOut ? S_OK : E_OUTOFMEMORY;
  48. }
  49. #define ILIsChild(pidl) ((pidl) == ILFindLastID(pidl))
  50. #define ILMAKECHILD(pidl) (LPITEMIDLIST)(pidl)
  51. #define ILMAKEFULL(pidl) (LPITEMIDLIST)(pidl)
  52. #define IDA_GetPIDLFolder(pida) ILMAKEFULL(((LPBYTE)pida)+(pida)->aoffset[0])
  53. #define IDA_GetPIDLItem(pida, i) (PCUITEMID_CHILD)(((LPBYTE)pida)+(pida)->aoffset[i+1])
  54. #endif
  55. STDAPI_(void) DllAddRef(void);
  56. STDAPI_(void) DllRelease(void);
  57. extern HINSTANCE g_hInstance;
  58. #define TF_TWREGFOLDER 0x00000100
  59. #define TF_TWFOLDER 0x00000200
  60. #define TF_TWPROP 0x00000400
  61. //
  62. // Avoid bringing in C runtime code for NO reason
  63. //
  64. #if defined(__cplusplus)
  65. inline void * __cdecl operator new(size_t size) { return (void *)LocalAlloc(LPTR, size); }
  66. inline void __cdecl operator delete(void *ptr) { LocalFree(ptr); }
  67. extern "C" inline __cdecl _purecall(void) { return 0; }
  68. #endif // __cplusplus
  69. #endif