Windows NT 4.0 source code leak
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.

207 lines
7.5 KiB

4 years ago
  1. ;begin_both
  2. /*****************************************************************************\
  3. * *
  4. * shlwapi.h - Interface for the Windows light-weight utility APIs *
  5. * *
  6. * Version 1.0 *
  7. * *
  8. * Copyright (c) 1991-1996, Microsoft Corp. All rights reserved. *
  9. * *
  10. \*****************************************************************************/
  11. ;end_both
  12. #ifndef _INC_SHLWAPI
  13. #define _INC_SHLWAPI
  14. #ifndef _INC_SHLWAPIP ;internal
  15. #define _INC_SHLWAPIP ;internal
  16. ;begin_both
  17. #ifndef NOSHLWAPI
  18. ;end_both
  19. #include <objbase.h>
  20. //
  21. // Define API decoration for direct importing of DLL references.
  22. //
  23. #ifndef WINSHLWAPI
  24. #if !defined(_SHLWAPI_)
  25. #define LWSTDAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE
  26. #define LWSTDAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE
  27. #else
  28. #define LWSTDAPI STDAPI
  29. #define LWSTDAPI_(type) STDAPI_(type)
  30. #endif
  31. #endif // WINSHLWAPI
  32. ;begin_both
  33. #ifdef _WIN32
  34. #include <pshpack1.h>
  35. #endif
  36. #ifdef __cplusplus
  37. extern "C" {
  38. #endif
  39. ;end_both
  40. //
  41. // Users of this header may define any number of these constants to avoid
  42. // the definitions of each functional group.
  43. //
  44. // NO_SHLWAPI_STRFCNS String functions
  45. #ifndef NO_SHLWAPI_STRFCNS
  46. //
  47. //=============== String Routines ===================================
  48. //
  49. LWSTDAPI_(LPSTR) StrChrA(LPCSTR lpStart, WORD wMatch);
  50. LWSTDAPI_(LPWSTR) StrChrW(LPCWSTR lpStart, WORD wMatch);
  51. LWSTDAPI_(LPSTR) StrRChrA(LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch);
  52. LWSTDAPI_(LPWSTR) StrRChrW(LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch);
  53. LWSTDAPI_(LPSTR) StrChrIA(LPCSTR lpStart, WORD wMatch);
  54. LWSTDAPI_(LPWSTR) StrChrIW(LPCWSTR lpStart, WORD wMatch);
  55. LWSTDAPI_(LPSTR) StrRChrIA(LPCSTR lpStart, LPCSTR lpEnd, WORD wMatch);
  56. LWSTDAPI_(LPWSTR) StrRChrIW(LPCWSTR lpStart, LPCWSTR lpEnd, WORD wMatch);
  57. LWSTDAPI_(int) StrCmpNA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  58. LWSTDAPI_(int) StrCmpNW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  59. LWSTDAPI_(int) StrCmpNIA(LPCSTR lpStr1, LPCSTR lpStr2, int nChar);
  60. LWSTDAPI_(int) StrCmpNIW(LPCWSTR lpStr1, LPCWSTR lpStr2, int nChar);
  61. LWSTDAPI_(LPSTR) StrStrA(LPCSTR lpFirst, LPCSTR lpSrch);
  62. LWSTDAPI_(LPWSTR) StrStrW(LPCWSTR lpFirst, LPCWSTR lpSrch);
  63. LWSTDAPI_(int) StrCmpW(LPCWSTR psz1, LPCWSTR psz2);
  64. LWSTDAPI_(LPWSTR) StrCpyW(LPWSTR psz1, LPCWSTR psz2);
  65. LWSTDAPI_(LPSTR) StrRStr(LPCSTR lpSource, LPCSTR lpLast, LPCSTR lpSrch);
  66. LWSTDAPI_(LPSTR) StrStrIA(LPCSTR lpFirst, LPCSTR lpSrch);
  67. LWSTDAPI_(LPWSTR) StrStrIW(LPCWSTR lpFirst, LPCWSTR lpSrch);
  68. LWSTDAPI_(LPWSTR) StrDupW(LPCWSTR lpSrch);
  69. LWSTDAPI_(LPSTR) StrDupA(LPCSTR lpSrch);
  70. LWSTDAPI_(LPSTR) StrRStrIA(LPCSTR lpSource, LPCSTR lpLast, LPCSTR lpSrch);
  71. LWSTDAPI_(LPWSTR) StrRStrIW(LPCWSTR lpSource, LPCWSTR lpLast, LPCWSTR lpSrch);
  72. LWSTDAPI_(int) StrCSpnA(LPCSTR lpStr, LPCSTR lpSet);
  73. LWSTDAPI_(int) StrCSpnW(LPCWSTR lpStr, LPCWSTR lpSet);
  74. LWSTDAPI_(int) StrCSpnIA(LPCSTR lpStr, LPCSTR lpSet);
  75. LWSTDAPI_(int) StrCSpnIW(LPCWSTR lpStr, LPCWSTR lpSet);
  76. LWSTDAPI_(int) StrSpnW(LPCWSTR psz, LPCWSTR pszSet);
  77. LWSTDAPI_(int) StrSpnA(LPCSTR psz, LPCSTR pszSet);
  78. LWSTDAPI_(int) StrToIntA(LPCSTR lpSrc);
  79. LWSTDAPI_(int) StrToIntW(LPCWSTR lpSrc);
  80. LWSTDAPI_(LPSTR) StrPBrkA(LPCSTR psz, LPCSTR pszSet);
  81. LWSTDAPI_(LPWSTR) StrPBrkW(LPCWSTR psz, LPCWSTR pszSet);
  82. LWSTDAPI_(BOOL) StrToIntExA(LPCSTR pszString, DWORD dwFlags, int FAR * piRet);
  83. LWSTDAPI_(BOOL) StrToIntExW(LPCWSTR pszString, DWORD dwFlags, int FAR * piRet);
  84. LWSTDAPI_(int) StrFromTimeIntervalW(LPWSTR pwszOut, UINT cchMax, DWORD dwTimeMS, int digits);
  85. LWSTDAPI_(int) StrFromTimeIntervalA(LPSTR pszOut, UINT cchMax, DWORD dwTimeMS, int digits);
  86. LWSTDAPI_(BOOL) IntlStrEqWorkerA(BOOL fCaseSens, LPCSTR lpString1, LPCSTR lpString2, int nChar);
  87. LWSTDAPI_(BOOL) IntlStrEqWorkerW(BOOL fCaseSens, LPCWSTR lpString1, LPCWSTR lpString2, int nChar);
  88. #define IntlStrEqNA( s1, s2, nChar) IntlStrEqWorkerA( TRUE, s1, s2, nChar)
  89. #define IntlStrEqNIA(s1, s2, nChar) IntlStrEqWorkerA(FALSE, s1, s2, nChar)
  90. #define IntlStrEqNW( s1, s2, nChar) IntlStrEqWorkerW( TRUE, s1, s2, nChar)
  91. #define IntlStrEqNIW(s1, s2, nChar) IntlStrEqWorkerW(FALSE, s1, s2, nChar)
  92. // Flags for StrToIntEx
  93. #define STIF_DEFAULT 0x00000000L
  94. #define STIF_SUPPORT_HEX 0x00000001L
  95. #ifdef UNICODE
  96. #define StrSpn StrSpnW
  97. #define StrPBrk StrPBrkW
  98. #define StrToIntEx StrToIntExW
  99. #define StrToInt StrToIntW
  100. #define StrChr StrChrW
  101. #define StrRChr StrRChrW
  102. #define StrChrI StrChrIW
  103. #define StrRChrI StrRChrIW
  104. #define StrCSpn StrCSpnW
  105. #define StrCSpnI StrCSpnIW
  106. #define StrCmpN StrCmpNW
  107. #define StrCmpNI StrCmpNIW
  108. #define StrStr StrStrW
  109. #define StrStrI StrStrIW
  110. #define StrRStrI StrRStrIW
  111. #define StrDup StrDupW
  112. #define StrCmp StrCmpW
  113. #define StrFromTimeInterval StrFromTimeIntervalW
  114. #define IntlStrEqN IntlStrEqNW
  115. #define IntlStrEqNI IntlStrEqNIW
  116. #else
  117. #define StrSpn StrSpnA
  118. #define StrPBrk StrPBrkA
  119. #define StrToIntEx StrToIntExA
  120. #define StrToInt StrToIntA
  121. #define StrChr StrChrA
  122. #define StrRChr StrRChrA
  123. #define StrChrI StrChrIA
  124. #define StrRChrI StrRChrIA
  125. #define StrCSpn StrCSpnA
  126. #define StrCSpnI StrCSpnIA
  127. #define StrCmpN StrCmpNA
  128. #define StrCmpNI StrCmpNIA
  129. #define StrStr StrStrA
  130. #define StrStrI StrStrIA
  131. #define StrRStrI StrRStrIA
  132. #define StrDup StrDupA
  133. #define StrFromTimeInterval StrFromTimeIntervalA
  134. #define IntlStrEqN IntlStrEqNA
  135. #define IntlStrEqNI IntlStrEqNIA
  136. #endif
  137. #define StrToLong StrToInt
  138. #define StrNCmp StrCmpN
  139. #define StrNCmpI StrCmpNI
  140. #define StrNCpy lstrcpyn
  141. #define StrCpyN lstrcpyn
  142. #endif // NO_SHLWAPI_STRFCNS
  143. //
  144. //====== DllGetVersion =======================================================
  145. //
  146. typedef struct _DllVersionInfo
  147. {
  148. DWORD cbSize;
  149. DWORD dwMajorVersion; // Major version
  150. DWORD dwMinorVersion; // Minor version
  151. DWORD dwBuildNumber; // Build number
  152. DWORD dwPlatformID; // DLLVER_PLATFORM_*
  153. } DLLVERSIONINFO;
  154. // Platform IDs for DLLVERSIONINFO
  155. #define DLLVER_PLATFORM_WINDOWS 0x00000001 // Windows 95
  156. #define DLLVER_PLATFORM_NT 0x00000002 // Windows NT
  157. //
  158. // The caller should always GetProcAddress("DllGetVersion"), not
  159. // implicitly link to it.
  160. //
  161. typedef HRESULT (CALLBACK* DLLGETVERSIONPROC)(DLLVERSIONINFO *);
  162. ;begin_both
  163. #ifdef __cplusplus
  164. }
  165. #endif
  166. #ifdef _WIN32
  167. #include <poppack.h>
  168. #endif
  169. #endif
  170. ;end_both
  171. #endif // _INC_SHLWAPIP ;internal
  172. #endif // _INC_SHLWAPI