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.

105 lines
3.9 KiB

  1. /*
  2. * shell.h
  3. *
  4. * Header file for shell association database management functions
  5. */
  6. #include <shellapi.h> // make sure we don't conflict
  7. #include "winuserp.h"
  8. #include "wowshlp.h"
  9. #ifndef PUBLIC_ONLY
  10. // HANDLE hInstance; // hinstance of DLL
  11. #define SE_ERR_FNF 2 // ShellExec() error returns
  12. #define SE_ERR_PNF 3
  13. #define SE_ERR_OOM 8
  14. BOOL APIENTRY RegisterShellHook(HWND, BOOL);
  15. #endif // closes #ifndef PUBLIC_ONLY
  16. //****************************************************************************
  17. // THIS INFORMATION IS PUBLIC
  18. #define CP_WINDOWS 1004 // windows code page
  19. BOOL APIENTRY RegenerateUserEnvironment(PVOID *pPrevEnv,
  20. BOOL bSetCurrentEnv);
  21. int SheGetCurDrive(VOID);
  22. int SheSetCurDrive(int iDrive);
  23. int SheFullPathA(CHAR *fname, DWORD sizpath, CHAR *buf);
  24. int SheGetDirA(int iDrive, CHAR *str);
  25. int SheChangeDirA(register CHAR *newdir);
  26. int SheFullPathW(WCHAR *fname, DWORD sizpath, WCHAR *buf);
  27. int SheGetDirW(INT iDrive, WCHAR *str);
  28. int SheChangeDirW(register WCHAR *newdir);
  29. BOOL SheGetDirExW(LPWSTR lpszCurDisk, LPDWORD lpcchCurDir,LPWSTR lpszCurDir);
  30. INT SheChangeDirExW(register WCHAR *newdir);
  31. INT SheChangeDirExA(register CHAR *newdir);
  32. INT SheGetPathOffsetW(LPWSTR lpszDir);
  33. HANDLE APIENTRY InternalExtractIconListA(HANDLE hInst, LPSTR lpszExeFileName, LPINT lpnIcons);
  34. HANDLE APIENTRY InternalExtractIconListW(HANDLE hInst, LPWSTR lpszExeFileName, LPINT lpnIcons);
  35. HICON APIENTRY ExtractAssociatedIconA(HINSTANCE hInst,LPSTR lpIconPath,LPWORD lpiIcon);
  36. HICON APIENTRY ExtractAssociatedIconW(HINSTANCE hInst,LPWSTR lpIconPath,LPWORD lpiIcon);
  37. HICON APIENTRY ExtractAssociatedIconExA(HINSTANCE hInst,LPSTR lpIconPath,LPWORD lpiIconIndex, LPWORD lpiIconId);
  38. HICON APIENTRY ExtractAssociatedIconExW(HINSTANCE hInst,LPWSTR lpIconPath,LPWORD lpiIconIndex, LPWORD lpiIconId);
  39. WORD APIENTRY ExtractIconResInfoA(HANDLE hInst,LPSTR lpszFileName,WORD wIconIndex,LPWORD lpwSize,LPHANDLE lphIconRes);
  40. WORD APIENTRY ExtractIconResInfoW(HANDLE hInst,LPWSTR lpszFileName,WORD wIconIndex,LPWORD lpwSize,LPHANDLE lphIconRes);
  41. VOID APIENTRY CheckEscapesA(LPSTR lpFileA, DWORD cch);
  42. VOID APIENTRY CheckEscapesW(LPWSTR szFile, DWORD cch);
  43. LPSTR APIENTRY SheRemoveQuotesA(LPSTR sz);
  44. LPWSTR APIENTRY SheRemoveQuotesW(LPWSTR sz);
  45. BOOL APIENTRY SheShortenPathA(LPSTR pPath, BOOL bShorten);
  46. BOOL APIENTRY SheShortenPathW(LPWSTR pPath, BOOL bShorten);
  47. BOOL SheConvertPathW(LPWSTR lpApp, LPWSTR lpFile, UINT cchCmdBuf);
  48. DWORD ExtractVersionResource16W(LPCWSTR lpwstrFilename, LPHANDLE lphData);
  49. #ifndef UNICODE
  50. #define RealShellExecute RealShellExecuteA
  51. #define RealShellExecuteEx RealShellExecuteExA
  52. #define SheFullPath SheFullPathA
  53. #define SheGetDir SheGetDirA
  54. #define SheChangeDir SheChangeDirA
  55. #define InternalExtractIconList InternalExtractIconListA
  56. #define ExtractAssociatedIcon ExtractAssociatedIconA
  57. #define ExtractAssociatedIconEx ExtractAssociatedIconExA
  58. #define ExtractIconResInfo ExtractIconResInfoA
  59. #define CheckEscapes CheckEscapesA
  60. #define SheRemoveQuotes SheRemoveQuotesA
  61. #define SheShortenPath SheShortenPathA
  62. #else
  63. #define RealShellExecute RealShellExecuteW
  64. #define RealShellExecuteEx RealShellExecuteExW
  65. #define SheFullPath SheFullPathW
  66. #define SheGetDir SheGetDirW
  67. #define SheChangeDir SheChangeDirW
  68. #define InternalExtractIconList InternalExtractIconListW
  69. #define ExtractAssociatedIcon ExtractAssociatedIconW
  70. #define ExtractAssociatedIconEx ExtractAssociatedIconExW
  71. #define ExtractIconResInfo ExtractIconResInfoW
  72. #define CheckEscapes CheckEscapesW
  73. #define SheRemoveQuotes SheRemoveQuotesW
  74. #define SheShortenPath SheShortenPathW
  75. #endif //unicode
  76. #undef ExpandEnvironmentStrings
  77. #define ExpandEnvironmentStrings #error "Use SHExpandEnvironmentStrings instead"