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.

81 lines
2.4 KiB

  1. //Prevent windows.h from pulling in OLE 1
  2. #define _INC_OLE
  3. #include <windows.h>
  4. #include <stdlib.h>
  5. #include <shlwapi.h> // must be before commctrl.h and shlobj.h
  6. #include <shlobj.h> // ;Internal
  7. #include <shellapi.h> // ;Internal
  8. #include <shsemip.h>
  9. #include <ole2ver.h>
  10. #include <shellp.h> // in shell\inc
  11. #include <debug.h> // in shell\inc
  12. #include <shguidp.h> // in shell\inc
  13. #include <shlwapip.h> // for string helper functions
  14. #define SAVE_OBJECTDESCRIPTOR
  15. #define FIX_ROUNDTRIP
  16. #define CCF_CACHE_GLOBAL 32
  17. #define CCF_CACHE_CLSID 32
  18. #define CCF_RENDER_CLSID 32
  19. #define CCFCACHE_TOTAL (CC_FCACHE_GLOBAL+CCF_CACHE_CLSID+CCF_RENDER_CLSID)
  20. HRESULT CScrapData_CreateInstance(LPUNKNOWN * ppunk);
  21. HRESULT CTemplateFolder_CreateInstance(LPUNKNOWN * ppunk);
  22. HRESULT CScrapExt_CreateInstance(LPUNKNOWN * ppunk);
  23. //
  24. // global variables
  25. //
  26. extern LONG g_cRefThisDll; // per-instance
  27. extern HINSTANCE g_hinst;
  28. STDAPI_(void) DllAddRef(void);
  29. STDAPI_(void) DllRelease(void);
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. extern const WCHAR c_wszContents[];
  34. extern const WCHAR c_wszDescriptor[];
  35. #ifdef __cplusplus
  36. };
  37. #endif
  38. #define HINST_THISDLL g_hinst
  39. #define CFID_EMBEDDEDOBJECT 0
  40. #define CFID_OBJECTDESCRIPTOR 1
  41. #define CFID_LINKSRCDESCRIPTOR 2
  42. #define CFID_RICHTEXT 3
  43. #define CFID_SCRAPOBJECT 4
  44. #define CFID_TARGETCLSID 5
  45. #define CFID_RTF 6
  46. #define CFID_MAX 7
  47. #define CF_EMBEDDEDOBJECT _GetClipboardFormat(CFID_EMBEDDEDOBJECT)
  48. #define CF_OBJECTDESCRIPTOR _GetClipboardFormat(CFID_OBJECTDESCRIPTOR)
  49. #define CF_LINKSRCDESCRIPTOR _GetClipboardFormat(CFID_LINKSRCDESCRIPTOR)
  50. #define CF_RICHTEXT _GetClipboardFormat(CFID_RICHTEXT)
  51. #define CF_SCRAPOBJECT _GetClipboardFormat(CFID_SCRAPOBJECT)
  52. #define CF_TARGETCLSID _GetClipboardFormat(CFID_TARGETCLSID)
  53. #define CF_RTF _GetClipboardFormat(CFID_RTF)
  54. CLIPFORMAT _GetClipboardFormat(UINT id);
  55. void DisplayError(HWND hwndOwner, HRESULT hres, UINT idsMsg, LPCTSTR szFileName);
  56. // From shole.c
  57. void CShClientSite_RegisterClass();
  58. IOleClientSite* CShClientSite_Create(HWND hwnd, LPCTSTR pszFileName);
  59. void CShClientSite_Release(IOleClientSite* pcli);
  60. // From template.cpp
  61. HRESULT _KeyNameFromCLSID(REFCLSID rclsid, LPTSTR pszKey, UINT cchMax);
  62. int _ParseIconLocation(LPTSTR pszIconFile);