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.

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