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.

74 lines
2.1 KiB

  1. #pragma warning(disable:4001)
  2. #define STRICT
  3. #define CONST_VTABLE
  4. //
  5. // ATL / OLE HACKHACK
  6. //
  7. // Include <w95wraps.h> before anything else that messes with names.
  8. // Although everybody gets the wrong name, at least it's *consistently*
  9. // the wrong name, so everything links.
  10. //
  11. // NOTE: This means that while debugging you will see functions like
  12. // CWindowImplBase__DefWindowProcWrapW when you expected to see
  13. // CWindowImplBase__DefWindowProc.
  14. //
  15. #include <windows.h>
  16. #include <windowsx.h>
  17. #include <intshcut.h>
  18. #include <wininet.h>
  19. #include <shellapi.h>
  20. #include <commctrl.h>
  21. #include "shfusion.h"
  22. #include <shlobj.h>
  23. #include <ieguidp.h>
  24. #include <shlwapi.h>
  25. #include <varutil.h>
  26. #include <ccstock.h>
  27. #include <crtfree.h>
  28. #include <cfdefs.h>
  29. #include <port32.h>
  30. #include "debug.h"
  31. #include "resource.h"
  32. // gotta redirect to shlwapi, o.w. fail (quietly!) on w95
  33. #define lstrcmpW StrCmpW
  34. #define lstrcmpiW StrCmpIW
  35. #define lstrcpyW StrCpyW
  36. #define lstrcpynW StrCpyNW
  37. #define lstrcatW StrCatW
  38. // lstrlen is o.k.
  39. // constants and DLL life time manangement
  40. extern HINSTANCE g_hinst;
  41. STDAPI_(void) DllAddRef();
  42. STDAPI_(void) DllRelease();
  43. // stuff for COM objects. every object needs to have a CLSID and Create function
  44. extern const GUID CLSID_DesktopShortcut;
  45. extern CLIPFORMAT g_cfHIDA; // from sendmail.cpp
  46. #define DEFAULTICON TEXT("DefaultIcon")
  47. // in util.cpp
  48. HRESULT ShellLinkSetPath(IUnknown *punk, LPCTSTR pszPath);
  49. HRESULT ShellLinkGetPath(IUnknown *punk, LPTSTR pszPath, UINT cch);
  50. BOOL RunningOnNT();
  51. BOOL IsShortcut(LPCTSTR pszFile);
  52. HRESULT CLSIDFromExtension(LPCTSTR pszExt, CLSID *pclsid);
  53. BOOL GetShortcutTarget(LPCTSTR pszPath, LPTSTR pszTarget, UINT cch);
  54. HRESULT GetDropTargetPath(LPTSTR pszPath, int id, LPCTSTR pszExt);
  55. void CommonRegister(HKEY hkCLSID, LPCTSTR pszCLSID, LPCTSTR pszExtension, int idFileName);
  56. BOOL SHPathToAnsi(LPCTSTR pszSrc, LPSTR pszDest, int cbDest);
  57. BOOL _SHGetSpecialFolderPath(HWND hwnd, LPTSTR pszPath, int nFolder, BOOL fCreate);
  58. BOOL PathYetAnotherMakeUniqueNameT(LPTSTR pszUniqueName, LPCTSTR pszPath, LPCTSTR pszShort, LPCTSTR pszFileSpec);