home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c083 / 14.ddi / GENINC.PAK / SHELLAPI.H < prev    next >
Encoding:
C/C++ Source or Header  |  1993-12-02  |  5.4 KB  |  168 lines

  1. /*****************************************************************************\
  2. *                                                                             *
  3. * shellapi.h -  SHELL.DLL functions, types, and definitions                   *
  4. *                                                                             *
  5. \*****************************************************************************/
  6.  
  7. /*
  8.  *      C/C++ Run Time Library - Version 6.0
  9.  *
  10.  *      Copyright (c) 1987, 1993 by Borland International
  11.  *      All Rights Reserved.
  12.  *
  13.  */
  14.  
  15. #ifndef __SHELLAPI_H    /* prevent multiple includes */
  16. #define __SHELLAPI_H
  17.  
  18. #ifndef __WINDOWS_H
  19. #include <windows.h>    /* <windows.h> must be included */
  20. #endif  /* __WINDOWS_H */
  21.  
  22. #ifndef RC_INVOKED
  23. #pragma option -a-      /* Assume byte packing throughout */
  24. #endif  /* RC_INVOKED */
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {            /* Assume C declarations for C++ */
  28. #endif  /* __cplusplus */
  29.  
  30. #if !defined(__FLAT__)
  31.  
  32. /* If included with the 3.0 windows.h, define compatible aliases */
  33. #if !defined(WINVER) || (WINVER < 0x030a)
  34. #define HDROP       HANDLE
  35. #define HINSTANCE   HANDLE
  36. #define WINAPI      FAR PASCAL
  37. #define LPCSTR      LPSTR
  38. #define UINT        WORD
  39. #else
  40. DECLARE_HANDLE(HDROP);
  41. #endif  /* WIN3.0 */
  42.  
  43. /* return codes from Registration functions */
  44. #define ERROR_SUCCESS           0L
  45. #define ERROR_BADDB             1L
  46. #define ERROR_BADKEY            2L
  47. #define ERROR_CANTOPEN          3L
  48. #define ERROR_CANTREAD          4L
  49. #define ERROR_CANTWRITE         5L
  50. #define ERROR_OUTOFMEMORY       6L
  51. #define ERROR_INVALID_PARAMETER 7L
  52. #define ERROR_ACCESS_DENIED     8L
  53.  
  54. #define REG_SZ                  1           /* string type */
  55.  
  56. #define HKEY_CLASSES_ROOT       1
  57.  
  58. typedef DWORD HKEY;
  59. typedef HKEY FAR* PHKEY;
  60.  
  61. LONG WINAPI RegOpenKey(HKEY, LPCSTR, HKEY FAR*);
  62. LONG WINAPI RegCreateKey(HKEY, LPCSTR, HKEY FAR*);
  63. LONG WINAPI RegCloseKey(HKEY);
  64. LONG WINAPI RegDeleteKey(HKEY, LPCSTR);
  65. LONG WINAPI RegSetValue(HKEY, LPCSTR, DWORD, LPCSTR, DWORD);
  66. LONG WINAPI RegQueryValue(HKEY, LPCSTR, LPSTR, LONG FAR*);
  67. LONG WINAPI RegEnumKey(HKEY, DWORD, LPSTR, DWORD);
  68.  
  69. UINT WINAPI DragQueryFile(HDROP, UINT, LPSTR, UINT);
  70. BOOL WINAPI DragQueryPoint(HDROP, POINT FAR*);
  71. void WINAPI DragFinish(HDROP);
  72. void WINAPI DragAcceptFiles(HWND, BOOL);
  73.  
  74. HICON WINAPI ExtractIcon(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
  75.  
  76. /* error values for ShellExecute() beyond the regular WinExec() codes */
  77. #define SE_ERR_SHARE            26
  78. #define SE_ERR_ASSOCINCOMPLETE  27
  79. #define SE_ERR_DDETIMEOUT       28
  80. #define SE_ERR_DDEFAIL          29
  81. #define SE_ERR_DDEBUSY          30
  82. #define SE_ERR_NOASSOC          31
  83.  
  84. HINSTANCE WINAPI ShellExecute(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPCSTR lpParameters, LPCSTR lpDirectory, int iShowCmd);
  85. HINSTANCE WINAPI FindExecutable(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
  86.  
  87. #else    /* defined __FLAT__ */
  88.  
  89.  
  90. /* API exports from the library
  91.  */
  92.  
  93. DECLARE_HANDLE(HDROP);
  94.  
  95. UINT APIENTRY DragQueryFileW(HDROP,UINT,LPWSTR,UINT);
  96. UINT APIENTRY DragQueryFileA(HDROP,UINT,LPSTR,UINT);
  97.  
  98. #ifdef UNICODE
  99. #define DragQueryFile DragQueryFileW
  100. #else
  101. #define DragQueryFile DragQueryFileA
  102. #endif
  103.  
  104. BOOL APIENTRY DragQueryPoint(HDROP,LPPOINT);
  105. VOID APIENTRY DragFinish(HDROP);
  106.  
  107. VOID APIENTRY DragAcceptFiles(HWND,BOOL);
  108.  
  109. HICON  APIENTRY ExtractIconW(HINSTANCE hInst, LPCWSTR lpszExeFileName, UINT nIconIndex);
  110. HICON  APIENTRY ExtractIconA(HINSTANCE hInst, LPCSTR lpszExeFileName, UINT nIconIndex);
  111.  
  112. #ifdef UNICODE
  113. #define ExtractIcon ExtractIconW
  114. #else
  115. #define ExtractIcon ExtractIconA
  116. #endif
  117.  
  118. /* error values for ShellExecute() beyond the regular WinExec() codes */
  119. #define SE_ERR_SHARE                    26
  120. #define SE_ERR_ASSOCINCOMPLETE  27
  121. #define SE_ERR_DDETIMEOUT               28
  122. #define SE_ERR_DDEFAIL                  29
  123. #define SE_ERR_DDEBUSY                  30
  124. #define SE_ERR_NOASSOC                  31
  125.  
  126. HINSTANCE APIENTRY ShellExecuteA(HWND hwnd, LPCSTR lpOperation, LPCSTR lpFile, LPSTR lpParameters, LPCSTR lpDirectory, INT nShowCmd);
  127. HINSTANCE APIENTRY ShellExecuteW(HWND hwnd, LPCWSTR lpOperation, LPCWSTR lpFile, LPWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd);
  128.  
  129. HINSTANCE APIENTRY FindExecutableA(LPCSTR lpFile, LPCSTR lpDirectory, LPSTR lpResult);
  130. HINSTANCE APIENTRY FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpResult);
  131.  
  132. INT   APIENTRY ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon);
  133. INT   APIENTRY ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon);
  134.  
  135. #ifndef UNICODE
  136. #define ShellExecute ShellExecuteA
  137. #define FindExecutable FindExecutableA
  138. #define ShellAbout ShellAboutA
  139. #else
  140. #define ShellExecute ShellExecuteW
  141. #define FindExecutable FindExecutableW
  142. #define ShellAbout ShellAboutW
  143. #endif
  144.  
  145. HICON APIENTRY DuplicateIcon(HINSTANCE hInst, HICON hIcon);                                /* ;Internal */
  146. HICON APIENTRY ExtractAssociatedIconA(HINSTANCE hInst, LPSTR lpIconPath, LPWORD lpiIcon);   /* ;Internal */
  147. HICON APIENTRY ExtractAssociatedIconW(HINSTANCE hInst, LPWSTR lpIconPath, LPWORD lpiIcon);   /* ;Internal */
  148.  
  149. #ifndef UNICODE
  150. #define ExtractAssociatedIcon ExtractAssociatedIconA
  151. #else
  152. #define ExtractAssociatedIcon ExtractAssociatedIconW
  153. #endif
  154.  
  155.  
  156. #endif  /* __FLAT__ */
  157.  
  158. #ifdef __cplusplus
  159. }
  160. #endif
  161.  
  162. #ifndef RC_INVOKED
  163. #pragma option -a.      /* Revert to default packing */
  164. #endif  /* RC_INVOKED */
  165.  
  166. #endif  /* __SHELLAPI_H */
  167.  
  168.