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.

89 lines
2.5 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. #ifndef WINNT
  15. #include <w95wraps.h>
  16. #define lstrcmpiW StrCmpIW
  17. #define lstrcpyW StrCpyW
  18. #else
  19. #endif
  20. #define SAVE_OBJECTDESCRIPTOR
  21. #define FIX_ROUNDTRIP
  22. #define CCF_CACHE_GLOBAL 32
  23. #define CCF_CACHE_CLSID 32
  24. #define CCF_RENDER_CLSID 32
  25. #define CCFCACHE_TOTAL (CC_FCACHE_GLOBAL+CCF_CACHE_CLSID+CCF_RENDER_CLSID)
  26. HRESULT CScrapData_CreateInstance(LPUNKNOWN * ppunk);
  27. HRESULT CTemplateFolder_CreateInstance(LPUNKNOWN * ppunk);
  28. HRESULT CScrapExt_CreateInstance(LPUNKNOWN * ppunk);
  29. //
  30. // global variables
  31. //
  32. extern LONG g_cRefThisDll; // per-instance
  33. extern HINSTANCE g_hinst;
  34. STDAPI_(void) DllAddRef(void);
  35. STDAPI_(void) DllRelease(void);
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. extern const WCHAR c_wszContents[];
  40. extern const WCHAR c_wszDescriptor[];
  41. #ifdef __cplusplus
  42. };
  43. #endif
  44. #define HINST_THISDLL g_hinst
  45. #define CFID_EMBEDDEDOBJECT 0
  46. #define CFID_OBJECTDESCRIPTOR 1
  47. #define CFID_LINKSRCDESCRIPTOR 2
  48. #define CFID_RICHTEXT 3
  49. #define CFID_SCRAPOBJECT 4
  50. #define CFID_TARGETCLSID 5
  51. #define CFID_RTF 6
  52. #define CFID_MAX 7
  53. #define CF_EMBEDDEDOBJECT _GetClipboardFormat(CFID_EMBEDDEDOBJECT)
  54. #define CF_OBJECTDESCRIPTOR _GetClipboardFormat(CFID_OBJECTDESCRIPTOR)
  55. #define CF_LINKSRCDESCRIPTOR _GetClipboardFormat(CFID_LINKSRCDESCRIPTOR)
  56. #define CF_RICHTEXT _GetClipboardFormat(CFID_RICHTEXT)
  57. #define CF_SCRAPOBJECT _GetClipboardFormat(CFID_SCRAPOBJECT)
  58. #define CF_TARGETCLSID _GetClipboardFormat(CFID_TARGETCLSID)
  59. #define CF_RTF _GetClipboardFormat(CFID_RTF)
  60. CLIPFORMAT _GetClipboardFormat(UINT id);
  61. void DisplayError(HWND hwndOwner, HRESULT hres, UINT idsMsg, LPCTSTR szFileName);
  62. // From shole.c
  63. void CShClientSite_RegisterClass();
  64. IOleClientSite* CShClientSite_Create(HWND hwnd, LPCTSTR pszFileName);
  65. void CShClientSite_Release(IOleClientSite* pcli);
  66. // From template.cpp
  67. HRESULT _KeyNameFromCLSID(REFCLSID rclsid, LPTSTR pszKey, UINT cchMax);
  68. int _ParseIconLocation(LPTSTR pszIconFile);