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.

137 lines
4.3 KiB

  1. /*****************************************************************************\
  2. * *
  3. * shellapi.h - SHELL.DLL functions, types, and definitions *
  4. * *
  5. * Copyright (c) 1992-1994, Microsoft Corp. All rights reserved *
  6. * *
  7. \*****************************************************************************/
  8. #ifndef _INC_SHELLAPI
  9. #define _INC_SHELLAPI
  10. #ifndef RC_INVOKED
  11. #pragma pack(1) /* Assume byte packing throughout */
  12. #endif /* RC_INVOKED */
  13. #ifdef __cplusplus
  14. extern "C" { /* Assume C declarations for C++ */
  15. #endif /* __cplusplus */
  16. DECLARE_HANDLE(HDROP);
  17. #ifdef WIN32
  18. #ifdef UNICODE
  19. #define ShellExecute ShellExecuteW
  20. #define FindExecutable FindExecutableW
  21. #define ShellAbout ShellAboutW
  22. #define ExtractAssociatedIcon ExtractAssociatedIconW
  23. #define ExtractIcon ExtractIconW
  24. #define DragQueryFile DragQueryFileW
  25. #define InternalExtractIcon InternalExtractIconW
  26. #define DoEnvironmentSubst DoEnvironmentSubstW
  27. #define FindEnvironmentString FindEnvironmentStringW
  28. #else
  29. #define ShellExecute ShellExecuteA
  30. #define FindExecutable FindExecutableA
  31. #define ShellAbout ShellAboutA
  32. #define ExtractAssociatedIcon ExtractAssociatedIconA
  33. #define ExtractIcon ExtractIconA
  34. #define DragQueryFile DragQueryFileA
  35. #define InternalExtractIcon InternalExtractIconA
  36. #define DoEnvironmentSubst DoEnvironmentSubstA
  37. #define FindEnvironmentString FindEnvironmentStringA
  38. #endif // UNICODE
  39. #endif // WIN32
  40. UINT WINAPI DragQueryFile(HDROP, UINT, LPSTR, UINT);
  41. BOOL WINAPI DragQueryPoint(HDROP, POINT FAR*);
  42. void WINAPI DragFinish(HDROP);
  43. void WINAPI DragAcceptFiles(HWND, BOOL);
  44. #ifdef WIN32
  45. typedef struct _DRAGINFO {
  46. UINT uSize; /* init with sizeof(DRAGINFO) */
  47. POINT pt;
  48. BOOL fNC;
  49. LPSTR lpFileList;
  50. DWORD grfKeyState;
  51. } DRAGINFO, FAR* LPDRAGINFO;
  52. BOOL WINAPI DragQueryInfo(HDROP, LPDRAGINFO); /* get extra info about a drop */
  53. // AppBar stuff
  54. #define ABM_NEW 0x00000000
  55. #define ABM_REMOVE 0x00000001
  56. #define ABM_QUERYPOS 0x00000002
  57. #define ABM_SETPOS 0x00000003
  58. #define ABM_GETSTATE 0x00000004
  59. #define ABM_GETTASKBARPOS 0x00000005
  60. // these are put in the wparam of callback messages
  61. #define ABN_STATECHANGE 0x0000000
  62. #define ABN_POSCHANGED 0x0000001
  63. #define ABN_FULLSCREENAPP 0x0000002
  64. #define ABN_WINDOWARRANGE 0x0000003 // lParam == TRUE means hide
  65. // flags for get state
  66. #define ABS_AUTOHIDE 0x0000001
  67. #define ABS_ALWAYSONTOP 0x0000002
  68. #define ABE_LEFT 0
  69. #define ABE_TOP 1
  70. #define ABE_RIGHT 2
  71. #define ABE_BOTTOM 3
  72. typedef struct _AppBarData
  73. {
  74. DWORD cbSize;
  75. HWND hWnd;
  76. UINT uCallbackMessage;
  77. UINT uEdge;
  78. RECT rc;
  79. } APPBARDATA, *PAPPBARDATA;
  80. UINT WINAPI SHAppBarMessage(DWORD dwMessage, PAPPBARDATA pData);
  81. #endif
  82. HICON WINAPI ExtractIcon(HINSTANCE hInst, LPCSTR lpszFile, UINT nIconIndex);
  83. /* ShellExecute() and ShellExecuteEx() error codes */
  84. /* regular WinExec() codes */
  85. #define SE_ERR_FNF 2 // file not found
  86. #define SE_ERR_PNF 3 // path not found
  87. #define SE_ERR_OOM 8 // out of memory
  88. /* values beyond the regular WinExec() codes */
  89. #define SE_ERR_SHARE 26
  90. #define SE_ERR_ASSOCINCOMPLETE 27
  91. #define SE_ERR_DDETIMEOUT 28
  92. #define SE_ERR_DDEFAIL 29
  93. #define SE_ERR_DDEBUSY 30
  94. #define SE_ERR_NOASSOC 31
  95. #define SE_ERR_DLLNOTFOUND 32
  96. HINSTANCE WINAPI FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
  97. HINSTANCE WINAPI ShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int iShowCmd);
  98. int WINAPI ShellAbout(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
  99. DWORD WINAPI DoEnvironmentSubst(LPSTR szString, UINT cbString);
  100. LPSTR WINAPI FindEnvironmentString(LPSTR szEnvVar);
  101. #ifdef __cplusplus
  102. }
  103. #endif /* __cplusplus */
  104. #ifndef RC_INVOKED
  105. #pragma pack()
  106. #endif /* RC_INVOKED */
  107. #endif /* _INC_SHELLAPI */