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.

65 lines
2.2 KiB

  1. //
  2. // shlexec.h
  3. // routines and macros shared between the different shell exec files
  4. //
  5. #ifndef SHLEXEC_H
  6. #define SHLEXEC_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #include <krnlcmn.h>
  11. typedef LPSTR LPSZ;
  12. #include "wowshlp.h"
  13. extern LPVOID lpfnWowShellExecCB;
  14. #define CH_GUIDFIRST TEXT('{') // '}'
  15. // These fake ERROR_ values are used to display non-winerror.h available error
  16. // messages. They are mapped to valid winerror.h values in _ShellExecuteError.
  17. #define ERROR_RESTRICTED_APP ((UINT)-1)
  18. #define SEE_MASK_CLASS (SEE_MASK_CLASSNAME|SEE_MASK_CLASSKEY)
  19. #define _UseClassName(_mask) (((_mask)&SEE_MASK_CLASS) == SEE_MASK_CLASSNAME)
  20. #define _UseClassKey(_mask) (((_mask)&SEE_MASK_CLASS) == SEE_MASK_CLASSKEY)
  21. #define _UseTitleName(_mask) (((_mask)&SEE_MASK_HASTITLE) || ((_mask)&SEE_MASK_HASLINKNAME))
  22. #define SEE_MASK_PIDL (SEE_MASK_IDLIST|SEE_MASK_INVOKEIDLIST)
  23. #define _UseIDList(_mask) (((_mask)&SEE_MASK_PIDL) == SEE_MASK_IDLIST)
  24. #define _InvokeIDList(_mask) (((_mask)&SEE_MASK_PIDL) == SEE_MASK_INVOKEIDLIST)
  25. #define _UseHooks(_mask) (!(pei->fMask & SEE_MASK_NO_HOOKS))
  26. void ActivateHandler(HWND hwnd, DWORD_PTR dwHotKey);
  27. BOOL Window_IsLFNAware(HWND hwnd);
  28. // routines that need to be moved to CShellExecute
  29. BOOL DoesAppWantUrl(LPCTSTR lpszFullPathToApp);
  30. HWND _FindPopupFromExe(LPTSTR lpExe);
  31. HINSTANCE Window_GetInstance(HWND hwnd);
  32. BOOL RestrictedApp(LPCTSTR pszApp);
  33. BOOL DisallowedApp(LPCTSTR pszApp);
  34. BOOL CheckAppCompatibility(LPCTSTR pszApp, LPCTSTR *ppszNewEnvString, BOOL fNoUI, HWND hwnd);
  35. HRESULT TryShellExecuteHooks(LPSHELLEXECUTEINFO pei);
  36. void RegGetValue(HKEY hkRoot, LPCTSTR lpKey, LPTSTR lpValue);
  37. UINT ReplaceParameters(LPTSTR lpTo, UINT cchTo, LPCTSTR lpFile,
  38. LPCTSTR lpFrom, LPCTSTR lpParms, int nShow, DWORD * pdwHotKey, BOOL fLFNAware,
  39. LPCITEMIDLIST lpID, LPITEMIDLIST *ppidlGlobal);
  40. DWORD ShellExecuteNormal(LPSHELLEXECUTEINFO pei);
  41. void _DisplayShellExecError(ULONG fMask, HWND hwnd, LPCTSTR pszFile, LPCTSTR pszTitle, DWORD dwErr);
  42. BOOL InRunDllProcess(void);
  43. // in exec2.c
  44. int FindAssociatedExe(HWND hwnd, LPTSTR lpCommand, UINT cchCommand, LPCTSTR pszDocument, HKEY hkeyProgID);
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif // SHLEXEC_H