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.

3137 lines
97 KiB

  1. /*****************************************************************************\
  2. * *
  3. * Athena16.h *
  4. * *
  5. \*****************************************************************************/
  6. #ifndef ATHENA16_H
  7. #define ATHENA16_H
  8. #define SECURITY_WIN16
  9. /*----------------------------------------------------------------------------
  10. * Note that we don't want to use a single line comment before the warning is
  11. * disabled.
  12. *
  13. * Microsoft Windows
  14. * Copyright (C) Microsoft Corporation, 1992 - 1994.
  15. *
  16. * File: w4warn.h
  17. *
  18. * Contents: #pragmas to adjust warning levels.
  19. *
  20. *---------------------------------------------------------------------------*/
  21. /*
  22. * Level 4 warnings to suppress.
  23. */
  24. #ifdef __WATCOMC__
  25. #pragma warning 442 9
  26. #pragma warning 604 9
  27. #pragma warning 583 9
  28. #pragma warning 594 9
  29. #pragma warning 379 9 // 'delete' expression will invoke a non-virtual destructor
  30. #pragma warning 387 9 // expression is useful only for its side effects
  31. #pragma warning 354 4 // unsigned or pointer expression is always >= 0
  32. #pragma warning 389 4 // integral value may be truncated during assignment
  33. #pragma warning 4 4 // base class XXX does not have a virtual destructor
  34. #pragma warning 13 4 // unreachable code
  35. #pragma warning 628 4 // expression is not meaningful
  36. #pragma warning 627 9 // text following pre-processor directive (comment after endif)
  37. #pragma warning 188 5 // base class is inherited with private access. basically means base
  38. // class access hasn't been specified on the class definiton.
  39. #pragma off(unreferenced)
  40. #endif
  41. #include "x16menu.h"
  42. #ifndef WIN16_INETCOMM
  43. #define _IMNXPORT_
  44. #define _IMNACCT_
  45. #define _MIMEOLE_
  46. #endif // WIN16_INETCOM
  47. #ifdef __cplusplus
  48. extern "C"{
  49. #endif
  50. /*****************************************************************************\
  51. * *
  52. * From rpc.h(INC16) - It should be in "ocidl.h" of the INC16.
  53. * *
  54. \*****************************************************************************/
  55. #ifdef __WATCOMC__
  56. #define __RPC_FAR __far
  57. #define __RPC_API __far __pascal
  58. #define __RPC_USER __pascal
  59. #define __RPC_STUB __far __pascal
  60. #define RPC_ENTRY __pascal __far
  61. typedef void __near * I_RPC_HANDLE;
  62. #else
  63. #define __RPC_FAR __far
  64. #define __RPC_API __far __pascal
  65. #define __RPC_USER __far __pascal __export
  66. #define __RPC_STUB __far __pascal __export
  67. #define RPC_ENTRY __pascal __export __far
  68. typedef void _near * I_RPC_HANDLE;
  69. #endif
  70. /*****************************************************************************\
  71. * *
  72. * From Winver.h(INC32)
  73. * *
  74. \*****************************************************************************/
  75. #if 0
  76. /* Returns size of version info in bytes */
  77. DWORD
  78. APIENTRY
  79. GetFileVersionInfoSizeA(
  80. LPSTR lptstrFilename, /* Filename of version stamped file */
  81. LPDWORD lpdwHandle
  82. ); /* Information for use by GetFileVersionInfo */
  83. #define GetFileVersionInfoSize GetFileVersionInfoSizeA
  84. /* Read version info into buffer */
  85. BOOL
  86. APIENTRY
  87. GetFileVersionInfoA(
  88. LPSTR lptstrFilename, /* Filename of version stamped file */
  89. DWORD dwHandle, /* Information from GetFileVersionSize */
  90. DWORD dwLen, /* Length of buffer for info */
  91. LPVOID lpData
  92. ); /* Buffer to place the data structure */
  93. #define GetFileVersionInfo GetFileVersionInfoA
  94. BOOL
  95. APIENTRY
  96. VerQueryValueA(
  97. const LPVOID pBlock,
  98. LPSTR lpSubBlock,
  99. LPVOID * lplpBuffer,
  100. PUINT puLen
  101. );
  102. #define VerQueryValue VerQueryValueA
  103. #endif
  104. /*****************************************************************************\
  105. * *
  106. * From winbase.h (INC32)
  107. * *
  108. \*****************************************************************************/
  109. typedef struct _SYSTEM_INFO {
  110. union {
  111. DWORD dwOemId; // Obsolete field...do not use
  112. struct {
  113. WORD wProcessorArchitecture;
  114. WORD wReserved;
  115. };
  116. };
  117. DWORD dwPageSize;
  118. LPVOID lpMinimumApplicationAddress;
  119. LPVOID lpMaximumApplicationAddress;
  120. DWORD dwActiveProcessorMask;
  121. DWORD dwNumberOfProcessors;
  122. DWORD dwProcessorType;
  123. DWORD dwAllocationGranularity;
  124. WORD wProcessorLevel;
  125. WORD wProcessorRevision;
  126. } SYSTEM_INFO, *LPSYSTEM_INFO;
  127. LPVOID
  128. WINAPI
  129. VirtualAlloc(
  130. LPVOID lpAddress,
  131. DWORD dwSize,
  132. DWORD flAllocationType,
  133. DWORD flProtect
  134. );
  135. BOOL
  136. WINAPI
  137. VirtualFree(
  138. LPVOID lpAddress,
  139. DWORD dwSize,
  140. DWORD dwFreeType
  141. );
  142. VOID
  143. WINAPI
  144. GetSystemInfo(
  145. LPSYSTEM_INFO lpSystemInfo
  146. );
  147. #if 0 // Now WIN16 has this
  148. typedef struct _WIN32_FIND_DATAA {
  149. DWORD dwFileAttributes;
  150. FILETIME ftCreationTime;
  151. FILETIME ftLastAccessTime;
  152. FILETIME ftLastWriteTime;
  153. DWORD nFileSizeHigh;
  154. DWORD nFileSizeLow;
  155. DWORD dwReserved0;
  156. DWORD dwReserved1;
  157. CHAR cFileName[ MAX_PATH ];
  158. CHAR cAlternateFileName[ 14 ];
  159. } WIN32_FIND_DATAA, *PWIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
  160. #endif //0
  161. #define FILE_FLAG_DELETE_ON_CLOSE 0x04000000
  162. typedef struct _PROCESS_INFORMATION {
  163. HANDLE hProcess;
  164. HANDLE hThread;
  165. DWORD dwProcessId;
  166. DWORD dwThreadId;
  167. } PROCESS_INFORMATION, *PPROCESS_INFORMATION, *LPPROCESS_INFORMATION;
  168. //
  169. // dwCreationFlag values
  170. //
  171. #define CREATE_DEFAULT_ERROR_MODE 0x04000000
  172. // File attributes.
  173. BOOL
  174. WINAPI
  175. SetFileAttributesA(
  176. LPCSTR lpFileName,
  177. DWORD dwFileAttributes
  178. );
  179. BOOL
  180. WINAPI
  181. SetFileAttributesW(
  182. LPCWSTR lpFileName,
  183. DWORD dwFileAttributes
  184. );
  185. #ifdef UNICODE
  186. #define SetFileAttributes SetFileAttributesW
  187. #else
  188. #define SetFileAttributes SetFileAttributesA
  189. #endif // !UNICODE
  190. ///////////////////////////////////////////////////////////////
  191. // //
  192. // Win Certificate API and Structures //
  193. // //
  194. ///////////////////////////////////////////////////////////////
  195. //
  196. // Structures
  197. //
  198. #ifndef ANYSIZE_ARRAY
  199. #define ANYSIZE_ARRAY 1
  200. #endif
  201. #if 0 // Now BASETYPS has this
  202. typedef struct _WIN_CERTIFICATE {
  203. DWORD dwLength;
  204. WORD wRevision;
  205. WORD wCertificateType; // WIN_CERT_TYPE_xxx
  206. BYTE bCertificate[ANYSIZE_ARRAY];
  207. } WIN_CERTIFICATE, *LPWIN_CERTIFICATE;
  208. #endif
  209. /* Heap related APIs.
  210. *
  211. * HeapCreate and HeapDestroy does nothing.
  212. * HeapAlloc and HeapFree use GlobalAlloc, GlobalLock and GlobalFree.
  213. *
  214. */
  215. #define HeapCreate(a,b,c) ((HANDLE)1)
  216. #define HeapDestroy(a) ((BOOL)1)
  217. #define HeapAlloc OE16HeapAlloc
  218. #define HeapFree OE16HeapFree
  219. LPVOID
  220. WINAPI
  221. OE16HeapAlloc(
  222. HANDLE hHeap,
  223. DWORD dwFlags,
  224. DWORD dwBytes
  225. );
  226. LPVOID
  227. WINAPI
  228. HeapReAlloc(
  229. HANDLE hHeap,
  230. DWORD dwFlags,
  231. LPVOID lpMem,
  232. DWORD dwBytes
  233. );
  234. BOOL
  235. WINAPI
  236. OE16HeapFree(
  237. HANDLE hHeap,
  238. DWORD dwFlags,
  239. LPVOID lpMem
  240. );
  241. DWORD
  242. WINAPI
  243. HeapSize(
  244. HANDLE hHeap,
  245. DWORD dwFlags,
  246. LPCVOID lpMem
  247. );
  248. DWORD
  249. WINAPI
  250. GetShortPathNameA(
  251. LPCSTR lpszLongPath,
  252. LPSTR lpszShortPath,
  253. DWORD cchBuffer
  254. );
  255. #define GetShortPathName GetShortPathNameA
  256. VOID
  257. WINAPI
  258. SetLastError(
  259. DWORD dwErrCode
  260. );
  261. #ifdef RUN16_WIN16X
  262. LONG
  263. WINAPI
  264. CompareFileTime(
  265. CONST FILETIME *lpFileTime1,
  266. CONST FILETIME *lpFileTime2
  267. );
  268. #endif //RUN16_WIN16X
  269. typedef struct _STARTUPINFOA {
  270. DWORD cb;
  271. LPSTR lpReserved;
  272. LPSTR lpDesktop;
  273. LPSTR lpTitle;
  274. DWORD dwX;
  275. DWORD dwY;
  276. DWORD dwXSize;
  277. DWORD dwYSize;
  278. DWORD dwXCountChars;
  279. DWORD dwYCountChars;
  280. DWORD dwFillAttribute;
  281. DWORD dwFlags;
  282. WORD wShowWindow;
  283. WORD cbReserved2;
  284. LPBYTE lpReserved2;
  285. HANDLE hStdInput;
  286. HANDLE hStdOutput;
  287. HANDLE hStdError;
  288. } STARTUPINFOA, *LPSTARTUPINFOA;
  289. typedef STARTUPINFOA STARTUPINFO;
  290. UINT
  291. WINAPI
  292. GetDriveTypeA(
  293. LPCSTR lpRootPathName
  294. );
  295. #define GetDriveType GetDriveTypeA
  296. BOOL
  297. WINAPI
  298. CreateDirectoryA(
  299. LPCSTR lpPathName,
  300. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  301. );
  302. #define CreateDirectory CreateDirectoryA
  303. DWORD
  304. WINAPI
  305. GetEnvironmentVariableA(
  306. LPCSTR lpName,
  307. LPSTR lpBuffer,
  308. DWORD nSize
  309. );
  310. #define GetEnvironmentVariable GetEnvironmentVariableA
  311. /* DUP???
  312. BOOL
  313. WINAPI
  314. CreateDirectoryA(
  315. LPCSTR lpPathName,
  316. LPSECURITY_ATTRIBUTES lpSecurityAttributes
  317. );
  318. #define CreateDirectory CreateDirectoryA
  319. */
  320. BOOL
  321. WINAPI
  322. GetComputerNameA (
  323. LPSTR lpBuffer,
  324. LPDWORD nSize
  325. );
  326. #define GetComputerName GetComputerNameA
  327. BOOL
  328. WINAPI
  329. GetUserNameA (
  330. LPSTR lpBuffer,
  331. LPDWORD nSize
  332. );
  333. #define GetUserName GetUserNameA
  334. typedef OSVERSIONINFOA OSVERSIONINFO;
  335. HANDLE
  336. WINAPI
  337. CreateFileMappingA(
  338. HANDLE hFile,
  339. LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
  340. DWORD flProtect,
  341. DWORD dwMaximumSizeHigh,
  342. DWORD dwMaximumSizeLow,
  343. LPCSTR lpName
  344. );
  345. #define CreateFileMapping CreateFileMappingA
  346. // flProtect -- defined in sdk\inc\winnt.h
  347. #define PAGE_READONLY 0x02
  348. #define PAGE_READWRITE 0x04
  349. LPVOID
  350. WINAPI
  351. MapViewOfFile(
  352. HANDLE hFileMappingObject,
  353. DWORD dwDesiredAccess,
  354. DWORD dwFileOffsetHigh,
  355. DWORD dwFileOffsetLow,
  356. DWORD dwNumberOfBytesToMap
  357. );
  358. // dwDesiredAccess -- defined in sdk\inc\winnt.h
  359. #define SECTION_MAP_WRITE 0x0002
  360. #define SECTION_MAP_READ 0x0004
  361. #define FILE_MAP_WRITE SECTION_MAP_WRITE
  362. #define FILE_MAP_READ SECTION_MAP_READ
  363. BOOL
  364. WINAPI
  365. UnmapViewOfFile(
  366. LPCVOID lpBaseAddress
  367. );
  368. /*****************************************************************************\
  369. * *
  370. * OE16 File mapping object related function prototype
  371. * *
  372. \*****************************************************************************/
  373. LPVOID
  374. WINAPI
  375. OE16CreateFileMapping(
  376. HANDLE hFile,
  377. LPSECURITY_ATTRIBUTES lpFileMappingAttributes,
  378. DWORD flProtect,
  379. DWORD dwMaximumSizeHigh,
  380. DWORD dwMaximumSizeLow,
  381. LPCSTR lpName
  382. );
  383. LPVOID
  384. WINAPI
  385. OE16MapViewOfFile(
  386. HANDLE hFileMappingObject,
  387. DWORD dwDesiredAccess,
  388. DWORD dwFileOffsetHigh,
  389. DWORD dwFileOffsetLow,
  390. DWORD dwNumberOfBytesToMap
  391. );
  392. BOOL
  393. WINAPI
  394. OE16UnmapViewOfFile(
  395. LPCVOID lpBaseAddress
  396. );
  397. BOOL
  398. WINAPI
  399. OE16CloseFileMapping(
  400. LPVOID lpObject
  401. );
  402. /*****************************************************************************\
  403. * *
  404. * ???
  405. * *
  406. \*****************************************************************************/
  407. BOOL
  408. WINAPI
  409. GetDiskFreeSpaceA(
  410. LPCSTR lpRootPathName,
  411. LPDWORD lpSectorsPerCluster,
  412. LPDWORD lpBytesPerSector,
  413. LPDWORD lpNumberOfFreeClusters,
  414. LPDWORD lpTotalNumberOfClusters
  415. );
  416. #define GetDiskFreeSpace GetDiskFreeSpaceA
  417. #define TIME_ZONE_ID_UNKNOWN 0
  418. #define TIME_ZONE_ID_STANDARD 1
  419. #define TIME_ZONE_ID_DAYLIGHT 2
  420. typedef struct _TIME_ZONE_INFORMATION {
  421. LONG Bias;
  422. WCHAR StandardName[ 32 ];
  423. SYSTEMTIME StandardDate;
  424. LONG StandardBias;
  425. WCHAR DaylightName[ 32 ];
  426. SYSTEMTIME DaylightDate;
  427. LONG DaylightBias;
  428. } TIME_ZONE_INFORMATION, *PTIME_ZONE_INFORMATION, FAR* LPTIME_ZONE_INFORMATION;
  429. DWORD
  430. WINAPI
  431. GetTimeZoneInformation(
  432. LPTIME_ZONE_INFORMATION lpTimeZoneInformation
  433. );
  434. BOOL
  435. WINAPI
  436. IsTextUnicode(
  437. CONST LPVOID lpBuffer,
  438. int cb,
  439. LPINT lpi
  440. );
  441. VOID
  442. WINAPI
  443. GetSystemTimeAsFileTime(
  444. LPFILETIME lpSystemTimeAsFileTime
  445. );
  446. DWORD
  447. WINAPI
  448. ExpandEnvironmentStrings(
  449. LPCSTR lpSrc,
  450. LPSTR lpDst,
  451. DWORD nSize
  452. );
  453. /*****************************************************************************\
  454. * *
  455. * OE16 Thread related function prototype and re-define
  456. * *
  457. \*****************************************************************************/
  458. // We don't support following APIs in Win16
  459. #undef CreateSemaphore
  460. #undef CreateSemaphoreA
  461. #undef ReleaseSemaphore
  462. #undef CreateMutex
  463. #undef CreateMutexA
  464. #undef WaitForMultipleObjects
  465. #define CreateSemaphore(a,b,c,d) ((HANDLE)1)
  466. #define CreateSemaphoreA(a,b,c,d) ((HANDLE)1)
  467. #define ReleaseSemaphore(a,b,c) ((BOOL)1)
  468. #define CreateMutex(a,b,c) ((HANDLE)1)
  469. #define CreateMutexA(a,b,c) ((HANDLE)1)
  470. #define WaitForMultipleObjects(a,b,c,d) ((DWORD)WAIT_OBJECT_0)
  471. // Because of the following line in sdk\inc\objidl.h,
  472. // we can't use "#define ReleaseMutex(a), ((BOOL)1)".
  473. //
  474. // virtual HRESULT STDMETHODCALLTYPE ReleaseMutex( void) = 0;
  475. //
  476. #undef ReleaseMutex
  477. #define ReleaseMutex OE16ReleaseMutex
  478. BOOL
  479. WINAPI
  480. OE16ReleaseMutex(
  481. HANDLE hMutex
  482. );
  483. // We don't need following APIs in Win16
  484. #undef InitializeCriticalSection
  485. #undef EnterCriticalSection
  486. #undef LeaveCriticalSection
  487. #undef DeleteCriticalSection
  488. #define InitializeCriticalSection(a)
  489. #define EnterCriticalSection(a)
  490. #define LeaveCriticalSection(a)
  491. #define DeleteCriticalSection(a)
  492. // We support following Event APIs in Win16.
  493. //CreateEvent, SetEvent, ResetEvent, PulseEvent
  494. // We suppot WFSO for event and Thread. Since OE32 has a call
  495. // for Mutex and Semaphore, we will have private WFSO in OE16.
  496. #undef WaitForSingleObject
  497. #define WaitForSingleObject(a,b) ((DWORD)WAIT_OBJECT_0)
  498. // We have a define in common.h
  499. //#define WaitForSingleObject_16 w16WaitForSingleObject
  500. // WIN16FF - Should we ignore process APIs as well??? - WJPark
  501. BOOL
  502. WINAPI
  503. CreateProcessA(
  504. LPCSTR lpApplicationName,
  505. LPSTR lpCommandLine,
  506. LPSECURITY_ATTRIBUTES lpProcessAttributes,
  507. LPSECURITY_ATTRIBUTES lpThreadAttributes,
  508. BOOL bInheritHandles,
  509. DWORD dwCreationFlags,
  510. LPVOID lpEnvironment,
  511. LPCSTR lpCurrentDirectory,
  512. LPSTARTUPINFOA lpStartupInfo,
  513. LPPROCESS_INFORMATION lpProcessInformation
  514. );
  515. #define CreateProcess CreateProcessA
  516. #if 0
  517. /*****************************************************************************\
  518. * *
  519. * From sspi.h(INC32)
  520. * *
  521. \*****************************************************************************/
  522. typedef HRESULT SECURITY_STATUS;
  523. //
  524. // Okay, security specific types:
  525. //
  526. typedef struct _SecHandle
  527. {
  528. unsigned long dwLower;
  529. unsigned long dwUpper;
  530. } SecHandle, __far * PSecHandle;
  531. typedef SecHandle CredHandle;
  532. typedef PSecHandle PCredHandle;
  533. typedef SecHandle CtxtHandle;
  534. typedef PSecHandle PCtxtHandle;
  535. //
  536. // InitializeSecurityContext Requirement and return flags:
  537. //
  538. #define ISC_REQ_DELEGATE 0x00000001
  539. #define ISC_REQ_MUTUAL_AUTH 0x00000002
  540. #define ISC_REQ_REPLAY_DETECT 0x00000004
  541. #define ISC_REQ_SEQUENCE_DETECT 0x00000008
  542. #define ISC_REQ_CONFIDENTIALITY 0x00000010
  543. #define ISC_REQ_USE_SESSION_KEY 0x00000020
  544. #define ISC_REQ_PROMPT_FOR_CREDS 0x00000040
  545. #define ISC_REQ_USE_SUPPLIED_CREDS 0x00000080
  546. #define ISC_REQ_ALLOCATE_MEMORY 0x00000100
  547. #define ISC_REQ_USE_DCE_STYLE 0x00000200
  548. #define ISC_REQ_DATAGRAM 0x00000400
  549. #define ISC_REQ_CONNECTION 0x00000800
  550. #define ISC_REQ_CALL_LEVEL 0x00001000
  551. #define ISC_REQ_EXTENDED_ERROR 0x00004000
  552. #define ISC_REQ_STREAM 0x00008000
  553. #define ISC_REQ_INTEGRITY 0x00010000
  554. #define ISC_REQ_IDENTIFY 0x00020000
  555. #define ISC_RET_DELEGATE 0x00000001
  556. #define ISC_RET_MUTUAL_AUTH 0x00000002
  557. #define ISC_RET_REPLAY_DETECT 0x00000004
  558. #define ISC_RET_SEQUENCE_DETECT 0x00000008
  559. #define ISC_RET_CONFIDENTIALITY 0x00000010
  560. #define ISC_RET_USE_SESSION_KEY 0x00000020
  561. #define ISC_RET_USED_COLLECTED_CREDS 0x00000040
  562. #define ISC_RET_USED_SUPPLIED_CREDS 0x00000080
  563. #define ISC_RET_ALLOCATED_MEMORY 0x00000100
  564. #define ISC_RET_USED_DCE_STYLE 0x00000200
  565. #define ISC_RET_DATAGRAM 0x00000400
  566. #define ISC_RET_CONNECTION 0x00000800
  567. #define ISC_RET_INTERMEDIATE_RETURN 0x00001000
  568. #define ISC_RET_CALL_LEVEL 0x00002000
  569. #define ISC_RET_EXTENDED_ERROR 0x00004000
  570. #define ISC_RET_STREAM 0x00008000
  571. #define ISC_RET_INTEGRITY 0x00010000
  572. #define ISC_RET_IDENTIFY 0x00020000
  573. #define ASC_REQ_DELEGATE 0x00000001
  574. #define ASC_REQ_MUTUAL_AUTH 0x00000002
  575. #define ASC_REQ_REPLAY_DETECT 0x00000004
  576. #define ASC_REQ_SEQUENCE_DETECT 0x00000008
  577. #define ASC_REQ_CONFIDENTIALITY 0x00000010
  578. #define ASC_REQ_USE_SESSION_KEY 0x00000020
  579. #define ASC_REQ_ALLOCATE_MEMORY 0x00000100
  580. #define ASC_REQ_USE_DCE_STYLE 0x00000200
  581. #define ASC_REQ_DATAGRAM 0x00000400
  582. #define ASC_REQ_CONNECTION 0x00000800
  583. #define ASC_REQ_CALL_LEVEL 0x00001000
  584. #define ASC_REQ_EXTENDED_ERROR 0x00008000
  585. #define ASC_REQ_STREAM 0x00010000
  586. #define ASC_REQ_INTEGRITY 0x00020000
  587. #define ASC_REQ_LICENSING 0x00040000
  588. #define ASC_RET_DELEGATE 0x00000001
  589. #define ASC_RET_MUTUAL_AUTH 0x00000002
  590. #define ASC_RET_REPLAY_DETECT 0x00000004
  591. #define ASC_RET_SEQUENCE_DETECT 0x00000008
  592. #define ASC_RET_CONFIDENTIALITY 0x00000010
  593. #define ASC_RET_USE_SESSION_KEY 0x00000020
  594. #define ASC_RET_ALLOCATED_MEMORY 0x00000100
  595. #define ASC_RET_USED_DCE_STYLE 0x00000200
  596. #define ASC_RET_DATAGRAM 0x00000400
  597. #define ASC_RET_CONNECTION 0x00000800
  598. #define ASC_RET_CALL_LEVEL 0x00002000 // skipped 1000 to be like ISC_
  599. #define ASC_RET_THIRD_LEG_FAILED 0x00004000
  600. #define ASC_RET_EXTENDED_ERROR 0x00008000
  601. #define ASC_RET_STREAM 0x00010000
  602. #define ASC_RET_INTEGRITY 0x00020000
  603. #define ASC_RET_LICENSING 0x00040000
  604. #endif
  605. /*****************************************************************************\
  606. * *
  607. * From shlobj.h(INC32)
  608. * *
  609. \*****************************************************************************/
  610. #ifdef _SHLOBJ_H_
  611. #ifndef INITGUID
  612. #include <shlguid.h>
  613. #endif /* !INITGUID */
  614. //===========================================================================
  615. //
  616. // IShellLink Interface
  617. //
  618. //===========================================================================
  619. #if 0 // Now SHLOBJ has this
  620. #define IShellLink IShellLinkA
  621. // IShellLink::Resolve fFlags
  622. typedef enum {
  623. SLR_NO_UI = 0x0001,
  624. SLR_ANY_MATCH = 0x0002,
  625. SLR_UPDATE = 0x0004,
  626. } SLR_FLAGS;
  627. // IShellLink::GetPath fFlags
  628. typedef enum {
  629. SLGP_SHORTPATH = 0x0001,
  630. SLGP_UNCPRIORITY = 0x0002,
  631. SLGP_RAWPATH = 0x0004,
  632. } SLGP_FLAGS;
  633. #undef INTERFACE
  634. #define INTERFACE IShellLinkA
  635. DECLARE_INTERFACE_(IShellLinkA, IUnknown) // sl
  636. {
  637. // *** IUnknown methods ***
  638. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  639. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  640. STDMETHOD_(ULONG,Release) (THIS) PURE;
  641. STDMETHOD(GetPath)(THIS_ LPSTR pszFile, int cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) PURE;
  642. STDMETHOD(GetIDList)(THIS_ LPITEMIDLIST * ppidl) PURE;
  643. STDMETHOD(SetIDList)(THIS_ LPCITEMIDLIST pidl) PURE;
  644. STDMETHOD(GetDescription)(THIS_ LPSTR pszName, int cchMaxName) PURE;
  645. STDMETHOD(SetDescription)(THIS_ LPCSTR pszName) PURE;
  646. STDMETHOD(GetWorkingDirectory)(THIS_ LPSTR pszDir, int cchMaxPath) PURE;
  647. STDMETHOD(SetWorkingDirectory)(THIS_ LPCSTR pszDir) PURE;
  648. STDMETHOD(GetArguments)(THIS_ LPSTR pszArgs, int cchMaxPath) PURE;
  649. STDMETHOD(SetArguments)(THIS_ LPCSTR pszArgs) PURE;
  650. STDMETHOD(GetHotkey)(THIS_ WORD *pwHotkey) PURE;
  651. STDMETHOD(SetHotkey)(THIS_ WORD wHotkey) PURE;
  652. STDMETHOD(GetShowCmd)(THIS_ int *piShowCmd) PURE;
  653. STDMETHOD(SetShowCmd)(THIS_ int iShowCmd) PURE;
  654. STDMETHOD(GetIconLocation)(THIS_ LPSTR pszIconPath, int cchIconPath, int *piIcon) PURE;
  655. STDMETHOD(SetIconLocation)(THIS_ LPCSTR pszIconPath, int iIcon) PURE;
  656. STDMETHOD(SetRelativePath)(THIS_ LPCSTR pszPathRel, DWORD dwReserved) PURE;
  657. STDMETHOD(Resolve)(THIS_ HWND hwnd, DWORD fFlags) PURE;
  658. STDMETHOD(SetPath)(THIS_ LPCSTR pszFile) PURE;
  659. };
  660. #endif //0
  661. //-------------------------------------------------------------------------
  662. //
  663. // SHGetPathFromIDList
  664. //
  665. // This function assumes the size of the buffer (MAX_PATH). The pidl
  666. // should point to a file system object.
  667. //
  668. //-------------------------------------------------------------------------
  669. BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl, LPSTR pszPath);
  670. #define SHGetPathFromIDList SHGetPathFromIDListA
  671. #if 0 // Now SHLOBJ has this
  672. typedef int (CALLBACK* BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
  673. typedef struct _browseinfoA {
  674. HWND hwndOwner;
  675. LPCITEMIDLIST pidlRoot;
  676. LPSTR pszDisplayName;// Return display name of item selected.
  677. LPCSTR lpszTitle; // text to go in the banner over the tree.
  678. UINT ulFlags; // Flags that control the return stuff
  679. BFFCALLBACK lpfn;
  680. LPARAM lParam; // extra info that's passed back in callbacks
  681. int iImage; // output var: where to return the Image index.
  682. } BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
  683. #define BROWSEINFO BROWSEINFOA
  684. // Browsing for directory.
  685. #define BIF_RETURNONLYFSDIRS 0x0001 // For finding a folder to start document searching
  686. #define BIF_DONTGOBELOWDOMAIN 0x0002 // For starting the Find Computer
  687. #define BIF_STATUSTEXT 0x0004
  688. #define BIF_RETURNFSANCESTORS 0x0008
  689. #define BIF_EDITBOX 0x0010
  690. // message from browser
  691. #define BFFM_INITIALIZED 1
  692. #define BFFM_SELCHANGED 2
  693. // messages to browser
  694. #define BFFM_ENABLEOK (WM_USER + 101)
  695. #define BFFM_SETSELECTIONA (WM_USER + 102)
  696. #define BFFM_SETSELECTION BFFM_SETSELECTIONA
  697. #endif //0
  698. //
  699. // format of CF_HDROP and CF_PRINTERS, in the HDROP case the data that follows
  700. // is a double null terinated list of file names, for printers they are printer
  701. // friendly names
  702. //
  703. #if 0 // Now SHLOBJ has this
  704. typedef struct _DROPFILES {
  705. DWORD pFiles; // offset of file list
  706. POINT pt; // drop point (client coords)
  707. BOOL fNC; // is it on NonClient area
  708. // and pt is in screen coords
  709. BOOL fWide; // WIDE character switch
  710. } DROPFILES, FAR * LPDROPFILES;
  711. #endif //0
  712. #undef INTERFACE
  713. #define INTERFACE IShellToolbarSite
  714. DECLARE_INTERFACE_(IShellToolbarSite, IOleWindow)
  715. {
  716. // *** IUnknown methods ***
  717. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  718. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  719. STDMETHOD_(ULONG,Release) (THIS) PURE;
  720. // *** IOleWindow methods ***
  721. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  722. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  723. // *** IShellToolbarSite methods ***
  724. STDMETHOD(GetBorderST) (THIS_ IUnknown* punkSrc, LPRECT prcBorder) PURE;
  725. STDMETHOD(RequestBorderSpaceST) (THIS_ IUnknown* punkSrc, LPCBORDERWIDTHS pbw) PURE;
  726. STDMETHOD(SetBorderSpaceST) (THIS_ IUnknown* punkSrc, LPCBORDERWIDTHS pbw) PURE;
  727. STDMETHOD(OnFocusChangeST) (THIS_ IUnknown* punkSrc, BOOL fSetFocus) PURE;
  728. };
  729. #undef INTERFACE
  730. #define INTERFACE IShellToolbarFrame
  731. #define STFRF_NORMAL 0x0000
  732. #define STFRF_DELETECONFIGDATA 0x0001
  733. DECLARE_INTERFACE_(IShellToolbarFrame, IOleWindow)
  734. {
  735. // *** IUnknown methods ***
  736. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  737. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  738. STDMETHOD_(ULONG,Release) (THIS) PURE;
  739. // *** IOleWindow methods ***
  740. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  741. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  742. // *** IShellToolbarFrame methods ***
  743. STDMETHOD(AddToolbar) (THIS_ IUnknown* punkSrc, LPCWSTR pwszItem, DWORD dwReserved) PURE;
  744. STDMETHOD(RemoveToolbar) (THIS_ IUnknown* punkSrc, DWORD dwRemoveFlags) PURE;
  745. STDMETHOD(FindToolbar) (THIS_ LPCWSTR pwszItem, REFIID riid, LPVOID* ppvObj) PURE;
  746. };
  747. #undef INTERFACE
  748. #define INTERFACE IShellToolbar
  749. DECLARE_INTERFACE_(IShellToolbar, IOleWindow)
  750. {
  751. // *** IUnknown methods ***
  752. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  753. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  754. STDMETHOD_(ULONG,Release) (THIS) PURE;
  755. // *** IOleWindow methods ***
  756. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  757. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  758. // *** IShellToolbar methods ***
  759. STDMETHOD(SetToolbarSite) (THIS_ IUnknown* punkSite) PURE;
  760. STDMETHOD(ShowST) (THIS_ BOOL fShow) PURE;
  761. STDMETHOD(CloseST) (THIS_ DWORD dwReserved) PURE;
  762. STDMETHOD(ResizeBorderST) (THIS_ LPCRECT prcBorder,
  763. IUnknown* punkToolbarSite,
  764. BOOL fReserved) PURE;
  765. STDMETHOD(TranslateAcceleratorST) (THIS_ LPMSG lpmsg) PURE;
  766. STDMETHOD(HasFocus) (THIS) PURE;
  767. };
  768. #if 0 // Now SHLOBJ has this
  769. // GetIconLocation() input flags
  770. #define GIL_OPENICON 0x0001 // allows containers to specify an "open" look
  771. #define GIL_FORSHELL 0x0002 // icon is to be displayed in a ShellFolder
  772. #define GIL_ASYNC 0x0020 // this is an async extract, return E_ASYNC
  773. // GetIconLocation() return flags
  774. #define GIL_SIMULATEDOC 0x0001 // simulate this document icon for this
  775. #define GIL_PERINSTANCE 0x0002 // icons from this class are per instance (each file has its own)
  776. #define GIL_PERCLASS 0x0004 // icons from this class per class (shared for all files of this type)
  777. #define GIL_NOTFILENAME 0x0008 // location is not a filename, must call ::ExtractIcon
  778. #define GIL_DONTCACHE 0x0010 // this icon should not be cached
  779. #undef INTERFACE
  780. #define INTERFACE IExtractIconA
  781. DECLARE_INTERFACE_(IExtractIconA, IUnknown) // exic
  782. {
  783. // *** IUnknown methods ***
  784. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  785. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  786. STDMETHOD_(ULONG,Release) (THIS) PURE;
  787. // *** IExtractIcon methods ***
  788. STDMETHOD(GetIconLocation)(THIS_
  789. UINT uFlags,
  790. LPSTR szIconFile,
  791. UINT cchMax,
  792. int * piIndex,
  793. UINT * pwFlags) PURE;
  794. STDMETHOD(Extract)(THIS_
  795. LPCSTR pszFile,
  796. UINT nIconIndex,
  797. HICON *phiconLarge,
  798. HICON *phiconSmall,
  799. UINT nIconSize) PURE;
  800. };
  801. typedef IExtractIconA * LPEXTRACTICONA;
  802. #undef INTERFACE
  803. #define INTERFACE IExtractIconW
  804. DECLARE_INTERFACE_(IExtractIconW, IUnknown) // exic
  805. {
  806. // *** IUnknown methods ***
  807. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  808. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  809. STDMETHOD_(ULONG,Release) (THIS) PURE;
  810. // *** IExtractIcon methods ***
  811. STDMETHOD(GetIconLocation)(THIS_
  812. UINT uFlags,
  813. LPWSTR szIconFile,
  814. UINT cchMax,
  815. int * piIndex,
  816. UINT * pwFlags) PURE;
  817. STDMETHOD(Extract)(THIS_
  818. LPCWSTR pszFile,
  819. UINT nIconIndex,
  820. HICON *phiconLarge,
  821. HICON *phiconSmall,
  822. UINT nIconSize) PURE;
  823. };
  824. typedef IExtractIconW * LPEXTRACTICONW;
  825. #ifdef UNICODE
  826. #define IExtractIcon IExtractIconW
  827. #define IExtractIconVtbl IExtractIconWVtbl
  828. #define LPEXTRACTICON LPEXTRACTICONW
  829. #else
  830. #define IExtractIcon IExtractIconA
  831. #define IExtractIconVtbl IExtractIconAVtbl
  832. #define LPEXTRACTICON LPEXTRACTICONA
  833. #endif
  834. #endif //0
  835. #if 0 // Now SHLOBJ has this
  836. //==========================================================================
  837. //
  838. // IShellBrowser/IShellView/IShellFolder interface
  839. //
  840. // These three interfaces are used when the shell communicates with
  841. // name space extensions. The shell (explorer) provides IShellBrowser
  842. // interface, and extensions implements IShellFolder and IShellView
  843. // interfaces.
  844. //
  845. //==========================================================================
  846. //--------------------------------------------------------------------------
  847. //
  848. // Command/menuitem IDs
  849. //
  850. // The explorer dispatches WM_COMMAND messages based on the range of
  851. // command/menuitem IDs. All the IDs of menuitems that the view (right
  852. // pane) inserts must be in FCIDM_SHVIEWFIRST/LAST (otherwise, the explorer
  853. // won't dispatch them). The view should not deal with any menuitems
  854. // in FCIDM_BROWSERFIRST/LAST (otherwise, it won't work with the future
  855. // version of the shell).
  856. //
  857. // FCIDM_SHVIEWFIRST/LAST for the right pane (IShellView)
  858. // FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
  859. // FCIDM_GLOBAL/LAST for the explorer's submenu IDs
  860. //
  861. //--------------------------------------------------------------------------
  862. #define FCIDM_SHVIEWFIRST 0x0000
  863. #define FCIDM_SHVIEWLAST 0x7fff
  864. #define FCIDM_BROWSERFIRST 0xa000
  865. #define FCIDM_BROWSERLAST 0xbf00
  866. #define FCIDM_GLOBALFIRST 0x8000
  867. #define FCIDM_GLOBALLAST 0x9fff
  868. //
  869. // Global submenu IDs and separator IDs
  870. //
  871. #define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
  872. #define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
  873. #define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
  874. #define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
  875. #define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
  876. #define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
  877. #define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
  878. #define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
  879. #define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
  880. #define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
  881. //--------------------------------------------------------------------------
  882. // control IDs known to the view
  883. //--------------------------------------------------------------------------
  884. #define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
  885. #define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
  886. //--------------------------------------------------------------------------
  887. //
  888. // FOLDERSETTINGS
  889. //
  890. // FOLDERSETTINGS is a data structure that explorer passes from one folder
  891. // view to another, when the user is browsing. It calls ISV::GetCurrentInfo
  892. // member to get the current settings and pass it to ISV::CreateViewWindow
  893. // to allow the next folder view "inherit" it. These settings assumes a
  894. // particular UI (which the shell's folder view has), and shell extensions
  895. // may or may not use those settings.
  896. //
  897. //--------------------------------------------------------------------------
  898. typedef LPBYTE LPVIEWSETTINGS;
  899. // NB Bitfields.
  900. // FWF_DESKTOP implies FWF_TRANSPARENT/NOCLIENTEDGE/NOSCROLL
  901. typedef enum
  902. {
  903. FWF_AUTOARRANGE = 0x0001,
  904. FWF_ABBREVIATEDNAMES = 0x0002,
  905. FWF_SNAPTOGRID = 0x0004,
  906. FWF_OWNERDATA = 0x0008,
  907. FWF_BESTFITWINDOW = 0x0010,
  908. FWF_DESKTOP = 0x0020,
  909. FWF_SINGLESEL = 0x0040,
  910. FWF_NOSUBFOLDERS = 0x0080,
  911. FWF_TRANSPARENT = 0x0100,
  912. FWF_NOCLIENTEDGE = 0x0200,
  913. FWF_NOSCROLL = 0x0400,
  914. FWF_ALIGNLEFT = 0x0800,
  915. FWF_NOICONS = 0x1000,
  916. FWF_SINGLECLICKACTIVATE=0x8000 // TEMPORARY -- NO UI FOR THIS
  917. } FOLDERFLAGS;
  918. typedef enum
  919. {
  920. FVM_ICON = 1,
  921. FVM_SMALLICON = 2,
  922. FVM_LIST = 3,
  923. FVM_DETAILS = 4,
  924. } FOLDERVIEWMODE;
  925. typedef struct
  926. {
  927. UINT ViewMode; // View mode (FOLDERVIEWMODE values)
  928. UINT fFlags; // View options (FOLDERFLAGS bits)
  929. } FOLDERSETTINGS, *LPFOLDERSETTINGS;
  930. typedef const FOLDERSETTINGS * LPCFOLDERSETTINGS;
  931. //--------------------------------------------------------------------------
  932. //
  933. // Interface: IShellBrowser
  934. //
  935. // IShellBrowser interface is the interface that is provided by the shell
  936. // explorer/folder frame window. When it creates the "contents pane" of
  937. // a shell folder (which provides IShellFolder interface), it calls its
  938. // CreateViewObject member function to create an IShellView object. Then,
  939. // it calls its CreateViewWindow member to create the "contents pane"
  940. // window. The pointer to the IShellBrowser interface is passed to
  941. // the IShellView object as a parameter to this CreateViewWindow member
  942. // function call.
  943. //
  944. // +--------------------------+ <-- Explorer window
  945. // | [] Explorer |
  946. // |--------------------------+ IShellBrowser
  947. // | File Edit View .. |
  948. // |--------------------------|
  949. // | | |
  950. // | | <-------- Content pane
  951. // | | |
  952. // | | | IShellView
  953. // | | |
  954. // | | |
  955. // +--------------------------+
  956. //
  957. //
  958. //
  959. // [Member functions]
  960. //
  961. //
  962. // IShellBrowser::GetWindow(phwnd)
  963. //
  964. // Inherited from IOleWindow::GetWindow.
  965. //
  966. //
  967. // IShellBrowser::ContextSensitiveHelp(fEnterMode)
  968. //
  969. // Inherited from IOleWindow::ContextSensitiveHelp.
  970. //
  971. //
  972. // IShellBrowser::InsertMenusSB(hmenuShared, lpMenuWidths)
  973. //
  974. // Similar to the IOleInPlaceFrame::InsertMenus. The explorer will put
  975. // "File" and "Edit" pulldown in the File menu group, "View" and "Tools"
  976. // in the Container menu group and "Help" in the Window menu group. Each
  977. // pulldown menu will have a uniqu ID, FCIDM_MENU_FILE/EDIT/VIEW/TOOLS/HELP.
  978. // The view is allowed to insert menuitems into those sub-menus by those
  979. // IDs must be between FCIDM_SHVIEWFIRST and FCIDM_SHVIEWLAST.
  980. //
  981. //
  982. // IShellBrowser::SetMenuSB(hmenuShared, holemenu, hwndActiveObject)
  983. //
  984. // Similar to the IOleInPlaceFrame::SetMenu. The explorer ignores the
  985. // holemenu parameter (reserved for future enhancement) and performs
  986. // menu-dispatch based on the menuitem IDs (see the description above).
  987. // It is important to note that the explorer will add different
  988. // set of menuitems depending on whether the view has a focus or not.
  989. // Therefore, it is very important to call ISB::OnViewWindowActivate
  990. // whenever the view window (or its children) gets the focus.
  991. //
  992. //
  993. // IShellBrowser::RemoveMenusSB(hmenuShared)
  994. //
  995. // Same as the IOleInPlaceFrame::RemoveMenus.
  996. //
  997. //
  998. // IShellBrowser::SetStatusTextSB(lpszStatusText)
  999. //
  1000. // Same as the IOleInPlaceFrame::SetStatusText. It is also possible to
  1001. // send messages directly to the status window via SendControlMsg.
  1002. //
  1003. //
  1004. // IShellBrowser::EnableModelessSB(fEnable)
  1005. //
  1006. // Same as the IOleInPlaceFrame::EnableModeless.
  1007. //
  1008. //
  1009. // IShellBrowser::TranslateAcceleratorSB(lpmsg, wID)
  1010. //
  1011. // Same as the IOleInPlaceFrame::TranslateAccelerator, but will be
  1012. // never called because we don't support EXEs (i.e., the explorer has
  1013. // the message loop). This member function is defined here for possible
  1014. // future enhancement.
  1015. //
  1016. //
  1017. // IShellBrowser::BrowseObject(pidl, wFlags)
  1018. //
  1019. // The view calls this member to let shell explorer browse to another
  1020. // folder. The pidl and wFlags specifies the folder to be browsed.
  1021. //
  1022. // Following three flags specifies whether it creates another window or not.
  1023. // SBSP_SAMEBROWSER -- Browse to another folder with the same window.
  1024. // SBSP_NEWBROWSER -- Creates another window for the specified folder.
  1025. // SBSP_DEFBROWSER -- Default behavior (respects the view option).
  1026. //
  1027. // Following three flags specifies open, explore, or default mode. These .
  1028. // are ignored if SBSP_SAMEBROWSER or (SBSP_DEFBROWSER && (single window .
  1029. // browser || explorer)). .
  1030. // SBSP_OPENMODE -- Use a normal folder window
  1031. // SBSP_EXPLOREMODE -- Use an explorer window
  1032. // SBSP_DEFMODE -- Use the same as the current window
  1033. //
  1034. // Following three flags specifies the pidl.
  1035. // SBSP_ABSOLUTE -- pidl is an absolute pidl (relative from desktop)
  1036. // SBSP_RELATIVE -- pidl is relative from the current folder.
  1037. // SBSP_PARENT -- Browse the parent folder (ignores the pidl)
  1038. // SBSP_NAVIGATEBACK -- Navigate back (ignores the pidl)
  1039. // SBSP_NAVIGATEFORWARD -- Navigate forward (ignores the pidl)
  1040. //
  1041. //
  1042. // IShellBrowser::GetViewStateStream(grfMode, ppstm)
  1043. //
  1044. // The browser returns an IStream interface as the storage for view
  1045. // specific state information.
  1046. //
  1047. // grfMode -- Specifies the read/write access (STGM_READ/WRITE/READWRITE)
  1048. // ppstm -- Specifies the LPSTREAM variable to be filled.
  1049. //
  1050. //
  1051. // IShellBrowser::GetControlWindow(id, phwnd)
  1052. //
  1053. // The shell view may call this member function to get the window handle
  1054. // of Explorer controls (toolbar or status winodw -- FCW_TOOLBAR or
  1055. // FCW_STATUS).
  1056. //
  1057. //
  1058. // IShellBrowser::SendControlMsg(id, uMsg, wParam, lParam, pret)
  1059. //
  1060. // The shell view calls this member function to send control messages to
  1061. // one of Explorer controls (toolbar or status window -- FCW_TOOLBAR or
  1062. // FCW_STATUS).
  1063. //
  1064. //
  1065. // IShellBrowser::QueryActiveShellView(IShellView * ppshv)
  1066. //
  1067. // This member returns currently activated (displayed) shellview object.
  1068. // A shellview never need to call this member function.
  1069. //
  1070. //
  1071. // IShellBrowser::OnViewWindowActive(pshv)
  1072. //
  1073. // The shell view window calls this member function when the view window
  1074. // (or one of its children) got the focus. It MUST call this member before
  1075. // calling IShellBrowser::InsertMenus, because it will insert different
  1076. // set of menu items depending on whether the view has the focus or not.
  1077. //
  1078. //
  1079. // IShellBrowser::SetToolbarItems(lpButtons, nButtons, uFlags)
  1080. //
  1081. // The view calls this function to add toolbar items to the exporer's
  1082. // toolbar. "lpButtons" and "nButtons" specifies the array of toolbar
  1083. // items. "uFlags" must be one of FCT_MERGE, FCT_CONFIGABLE, FCT_ADDTOEND.
  1084. //
  1085. //-------------------------------------------------------------------------
  1086. #undef INTERFACE
  1087. #define INTERFACE IShellBrowser
  1088. //
  1089. // Values for wFlags parameter of ISB::BrowseObject() member.
  1090. //
  1091. #define SBSP_DEFBROWSER 0x0000
  1092. #define SBSP_SAMEBROWSER 0x0001
  1093. #define SBSP_NEWBROWSER 0x0002
  1094. #define SBSP_DEFMODE 0x0000
  1095. #define SBSP_OPENMODE 0x0010
  1096. #define SBSP_EXPLOREMODE 0x0020
  1097. #define SBSP_ABSOLUTE 0x0000
  1098. #define SBSP_RELATIVE 0x1000
  1099. #define SBSP_PARENT 0x2000
  1100. #define SBSP_NAVIGATEBACK 0x4000
  1101. #define SBSP_NAVIGATEFORWARD 0x8000
  1102. #define SBSP_ALLOW_AUTONAVIGATE 0x10000
  1103. #define SBSP_INITIATEDBYHLINKFRAME 0x80000000
  1104. #define SBSP_REDIRECT 0x40000000
  1105. //
  1106. // Values for id parameter of ISB::GetWindow/SendControlMsg members.
  1107. //
  1108. // WARNING:
  1109. // Any shell extensions which sends messages to those control windows
  1110. // might not work in the future version of windows. If you really need
  1111. // to send messages to them, (1) don't assume that those control window
  1112. // always exist (i.e. GetControlWindow may fail) and (2) verify the window
  1113. // class of the window before sending any messages.
  1114. //
  1115. #define FCW_STATUS 0x0001
  1116. #define FCW_TOOLBAR 0x0002
  1117. #define FCW_TREE 0x0003
  1118. #define FCW_INTERNETBAR 0x0006
  1119. //
  1120. // Values for uFlags paremeter of ISB::SetToolbarItems member.
  1121. //
  1122. #define FCT_MERGE 0x0001
  1123. #define FCT_CONFIGABLE 0x0002
  1124. #define FCT_ADDTOEND 0x0004
  1125. DECLARE_INTERFACE_(IShellBrowser, IOleWindow)
  1126. {
  1127. // *** IUnknown methods ***
  1128. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1129. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1130. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1131. // *** IOleWindow methods ***
  1132. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  1133. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  1134. // *** IShellBrowser methods *** (same as IOleInPlaceFrame)
  1135. STDMETHOD(InsertMenusSB) (THIS_ HMENU hmenuShared,
  1136. LPOLEMENUGROUPWIDTHS lpMenuWidths) PURE;
  1137. STDMETHOD(SetMenuSB) (THIS_ HMENU hmenuShared, HOLEMENU holemenuReserved,
  1138. HWND hwndActiveObject) PURE;
  1139. STDMETHOD(RemoveMenusSB) (THIS_ HMENU hmenuShared) PURE;
  1140. STDMETHOD(SetStatusTextSB) (THIS_ LPCOLESTR lpszStatusText) PURE;
  1141. STDMETHOD(EnableModelessSB) (THIS_ BOOL fEnable) PURE;
  1142. STDMETHOD(TranslateAcceleratorSB) (THIS_ LPMSG lpmsg, WORD wID) PURE;
  1143. // *** IShellBrowser methods ***
  1144. STDMETHOD(BrowseObject)(THIS_ LPCITEMIDLIST pidl, UINT wFlags) PURE;
  1145. STDMETHOD(GetViewStateStream)(THIS_ DWORD grfMode,
  1146. LPSTREAM *ppStrm) PURE;
  1147. STDMETHOD(GetControlWindow)(THIS_ UINT id, HWND * lphwnd) PURE;
  1148. STDMETHOD(SendControlMsg)(THIS_ UINT id, UINT uMsg, WPARAM wParam,
  1149. LPARAM lParam, LRESULT * pret) PURE;
  1150. STDMETHOD(QueryActiveShellView)(THIS_ struct IShellView ** ppshv) PURE;
  1151. STDMETHOD(OnViewWindowActive)(THIS_ struct IShellView * ppshv) PURE;
  1152. STDMETHOD(SetToolbarItems)(THIS_ LPTBBUTTON lpButtons, UINT nButtons,
  1153. UINT uFlags) PURE;
  1154. };
  1155. #define __IShellBrowser_INTERFACE_DEFINED__
  1156. typedef IShellBrowser * LPSHELLBROWSER;
  1157. enum {
  1158. SBSC_HIDE = 0,
  1159. SBSC_SHOW = 1,
  1160. SBSC_TOGGLE = 2,
  1161. SBSC_QUERY = 3
  1162. };
  1163. enum {
  1164. SBO_DEFAULT = 0 ,
  1165. SBO_NOBROWSERPAGES = 1
  1166. };
  1167. #endif //0
  1168. #if 0 // Now SHLOBJP has this
  1169. // CGID_Explorer Command Target IDs
  1170. enum {
  1171. SBCMDID_ENABLESHOWTREE = 0,
  1172. SBCMDID_SHOWCONTROL = 1, // variant vt_i4 = loword = FCW_ * hiword = SBSC_*
  1173. SBCMDID_CANCELNAVIGATION = 2, // cancel last navigation
  1174. SBCMDID_MAYSAVECHANGES = 3, // about to close and may save changes
  1175. SBCMDID_SETHLINKFRAME = 4, // variant vt_i4 = phlinkframe
  1176. SBCMDID_ENABLESTOP = 5, // variant vt_bool = fEnable
  1177. SBCMDID_OPTIONS = 6, // the view.options page
  1178. SBCMDID_EXPLORER = 7, // are you explorer.exe?
  1179. SBCMDID_ADDTOFAVORITES = 8,
  1180. SBCMDID_ACTIVEOBJECTMENUS = 9,
  1181. SBCMDID_MAYSAVEVIEWSTATE = 10, // Should we save view stream
  1182. SBCMDID_DOFAVORITESMENU = 11, // popup the favorites menu
  1183. SBCMDID_DOMAILMENU = 12, // popup the mail menu
  1184. SBCMDID_GETADDRESSBARTEXT = 13, // get user-typed text
  1185. SBCMDID_ASYNCNAVIGATION = 14, // do an async navigation
  1186. SBCMDID_SEARCHBAR = 15, // toggle SearchBar browserbar
  1187. SBCMDID_FLUSHOBJECTCACHE = 16, // flush object cache
  1188. SBCMDID_CREATESHORTCUT = 17, // create a shortcut
  1189. };
  1190. #endif
  1191. #if 0 // Now SHLOBJ has this
  1192. //
  1193. // uState values for IShellView::UIActivate
  1194. //
  1195. typedef enum {
  1196. SVUIA_DEACTIVATE = 0,
  1197. SVUIA_ACTIVATE_NOFOCUS = 1,
  1198. SVUIA_ACTIVATE_FOCUS = 2,
  1199. SVUIA_INPLACEACTIVATE = 3 // new flag for IShellView2
  1200. } SVUIA_STATUS;
  1201. DECLARE_INTERFACE_(IShellView, IOleWindow)
  1202. {
  1203. // *** IUnknown methods ***
  1204. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  1205. STDMETHOD_(ULONG,AddRef) (THIS) PURE;
  1206. STDMETHOD_(ULONG,Release) (THIS) PURE;
  1207. // *** IOleWindow methods ***
  1208. STDMETHOD(GetWindow) (THIS_ HWND * lphwnd) PURE;
  1209. STDMETHOD(ContextSensitiveHelp) (THIS_ BOOL fEnterMode) PURE;
  1210. // *** IShellView methods ***
  1211. STDMETHOD(TranslateAccelerator) (THIS_ LPMSG lpmsg) PURE;
  1212. #ifdef _FIX_ENABLEMODELESS_CONFLICT
  1213. STDMETHOD(EnableModelessSV) (THIS_ BOOL fEnable) PURE;
  1214. #else
  1215. STDMETHOD(EnableModeless) (THIS_ BOOL fEnable) PURE;
  1216. #endif
  1217. STDMETHOD(UIActivate) (THIS_ UINT uState) PURE;
  1218. STDMETHOD(Refresh) (THIS) PURE;
  1219. STDMETHOD(CreateViewWindow)(THIS_ IShellView *lpPrevView,
  1220. LPCFOLDERSETTINGS lpfs, IShellBrowser * psb,
  1221. RECT * prcView, HWND *phWnd) PURE;
  1222. STDMETHOD(DestroyViewWindow)(THIS) PURE;
  1223. STDMETHOD(GetCurrentInfo)(THIS_ LPFOLDERSETTINGS lpfs) PURE;
  1224. STDMETHOD(AddPropertySheetPages)(THIS_ DWORD dwReserved,
  1225. LPFNADDPROPSHEETPAGE lpfn, LPARAM lparam) PURE;
  1226. STDMETHOD(SaveViewState)(THIS) PURE;
  1227. STDMETHOD(SelectItem)(THIS_ LPCITEMIDLIST pidlItem, UINT uFlags) PURE;
  1228. STDMETHOD(GetItemObject)(THIS_ UINT uItem, REFIID riid,
  1229. LPVOID *ppv) PURE;
  1230. };
  1231. typedef IShellView * LPSHELLVIEW;
  1232. #endif //0
  1233. #define CFSTR_FILEDESCRIPTORA TEXT("FileGroupDescriptor") // CF_FILEGROUPDESCRIPTORA
  1234. #define CFSTR_FILECONTENTS TEXT("FileContents") // CF_FILECONTENTS
  1235. #if 0 // Now SHLOBJ has this
  1236. //
  1237. // FILEDESCRIPTOR.dwFlags field indicate which fields are to be used
  1238. //
  1239. typedef enum {
  1240. FD_CLSID = 0x0001,
  1241. FD_SIZEPOINT = 0x0002,
  1242. FD_ATTRIBUTES = 0x0004,
  1243. FD_CREATETIME = 0x0008,
  1244. FD_ACCESSTIME = 0x0010,
  1245. FD_WRITESTIME = 0x0020,
  1246. FD_FILESIZE = 0x0040,
  1247. FD_LINKUI = 0x8000, // 'link' UI is prefered
  1248. } FD_FLAGS;
  1249. typedef struct _FILEDESCRIPTORA { // fod
  1250. DWORD dwFlags;
  1251. CLSID clsid;
  1252. SIZEL sizel;
  1253. POINTL pointl;
  1254. DWORD dwFileAttributes;
  1255. FILETIME ftCreationTime;
  1256. FILETIME ftLastAccessTime;
  1257. FILETIME ftLastWriteTime;
  1258. DWORD nFileSizeHigh;
  1259. DWORD nFileSizeLow;
  1260. CHAR cFileName[ MAX_PATH ];
  1261. } FILEDESCRIPTORA, *LPFILEDESCRIPTORA;
  1262. #define FILEDESCRIPTOR FILEDESCRIPTORA
  1263. #define LPFILEDESCRIPTOR LPFILEDESCRIPTORA
  1264. //
  1265. // format of CF_FILEGROUPDESCRIPTOR
  1266. //
  1267. typedef struct _FILEGROUPDESCRIPTORA { // fgd
  1268. UINT cItems;
  1269. FILEDESCRIPTORA fgd[1];
  1270. } FILEGROUPDESCRIPTORA, * LPFILEGROUPDESCRIPTORA;
  1271. #define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORA
  1272. #define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORA
  1273. #endif //0
  1274. #endif //_SHLOBJ_H_
  1275. /*****************************************************************************\
  1276. * *
  1277. * From shlobjp.h(private\windows\inc)
  1278. * *
  1279. \*****************************************************************************/
  1280. #if 0 // Now SHLOBJP has this
  1281. void WINAPI SHFree(LPVOID pv);
  1282. #endif
  1283. /*****************************************************************************
  1284. *
  1285. * From wtypes.h(INC16)
  1286. *
  1287. *****************************************************************************/
  1288. typedef unsigned short VARTYPE;
  1289. typedef LONG SCODE;
  1290. /* 0 == FALSE, -1 == TRUE */
  1291. typedef short VARIANT_BOOL;
  1292. #ifndef _LPCOLORREF_DEFINED
  1293. #define _LPCOLORREF_DEFINED
  1294. typedef DWORD __RPC_FAR *LPCOLORREF;
  1295. #endif // !_LPCOLORREF_DEFINED
  1296. /*****************************************************************************\
  1297. *
  1298. * From objidl.h(INC32) and it should be added into "objidl.h"(INC16) file.
  1299. *
  1300. \*****************************************************************************/
  1301. //#ifdef __objidl_h__
  1302. /*****************************************************************************\
  1303. * *
  1304. * From imm.h(INC32)
  1305. * *
  1306. \*****************************************************************************/
  1307. typedef UINT FAR *LPUINT;
  1308. /*****************************************************************************\
  1309. * *
  1310. * From comctlie.h - It should be in the INC16
  1311. * *
  1312. \*****************************************************************************/
  1313. #ifdef _INC_COMCTLIE
  1314. #define EM_SETLIMITTEXT EM_LIMITTEXT
  1315. // From winuser.h
  1316. #define IMAGE_BITMAP 0
  1317. #define IMAGE_ICON 1
  1318. #define IMAGE_CURSOR 2
  1319. #define ImageList_LoadBitmap(hi, lpbmp, cx, cGrow, crMask) ImageList_LoadImage(hi, lpbmp, cx, cGrow, crMask, IMAGE_BITMAP, 0)
  1320. #if 0 // Now COMCTLIE has this
  1321. typedef struct {
  1322. HKEY hkr;
  1323. LPCSTR pszSubKey;
  1324. LPCSTR pszValueName;
  1325. } TBSAVEPARAMS;
  1326. #endif
  1327. #define PNM_FINDITEM LPNMLVFINDITEM
  1328. #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
  1329. #ifndef SNDMSG
  1330. #ifdef __cplusplus
  1331. #define SNDMSG ::SendMessage
  1332. #else
  1333. #define SNDMSG SendMessage
  1334. #endif
  1335. #endif // ifndef SNDMSG
  1336. #define ACM_OPENA (WM_USER+100)
  1337. #define ACM_OPEN ACM_OPENA
  1338. #define ACM_PLAY (WM_USER+101)
  1339. #define ACM_STOP (WM_USER+102)
  1340. #define ACN_START 1
  1341. #define ACN_STOP 2
  1342. #define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
  1343. #define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(UINT)(rep), (LPARAM)MAKELONG(from, to))
  1344. #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
  1345. #define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
  1346. #if 0 // Now COMCTLIE has this
  1347. #define CBEN_FIRST (0U-800U) // combo box ex
  1348. #define CBEN_LAST (0U-830U)
  1349. //////////////////// ComboBoxEx ////////////////////////////////
  1350. #define WC_COMBOBOXEXW L"ComboBoxEx32"
  1351. #define WC_COMBOBOXEXA "ComboBoxEx32"
  1352. #ifdef UNICODE
  1353. #define WC_COMBOBOXEX WC_COMBOBOXEXW
  1354. #else
  1355. #define WC_COMBOBOXEX WC_COMBOBOXEXA
  1356. #endif
  1357. #define CBEIF_TEXT 0x00000001
  1358. #define CBEIF_IMAGE 0x00000002
  1359. #define CBEIF_SELECTEDIMAGE 0x00000004
  1360. #define CBEIF_OVERLAY 0x00000008
  1361. #define CBEIF_INDENT 0x00000010
  1362. #define CBEIF_LPARAM 0x00000020
  1363. #define CBEIF_DI_SETITEM 0x10000000
  1364. typedef struct tagCOMBOBOXEXITEMA
  1365. {
  1366. UINT mask;
  1367. int iItem;
  1368. LPSTR pszText;
  1369. int cchTextMax;
  1370. int iImage;
  1371. int iSelectedImage;
  1372. int iOverlay;
  1373. int iIndent;
  1374. LPARAM lParam;
  1375. } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
  1376. typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
  1377. typedef struct tagCOMBOBOXEXITEMW
  1378. {
  1379. UINT mask;
  1380. int iItem;
  1381. LPWSTR pszText;
  1382. int cchTextMax;
  1383. int iImage;
  1384. int iSelectedImage;
  1385. int iOverlay;
  1386. int iIndent;
  1387. LPARAM lParam;
  1388. } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
  1389. typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
  1390. #ifdef UNICODE
  1391. #define COMBOBOXEXITEM COMBOBOXEXITEMW
  1392. #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW
  1393. #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW
  1394. #else
  1395. #define COMBOBOXEXITEM COMBOBOXEXITEMA
  1396. #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA
  1397. #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA
  1398. #endif
  1399. #define CBEM_INSERTITEMA (WM_USER + 1)
  1400. #define CBEM_SETIMAGELIST (WM_USER + 2)
  1401. #define CBEM_GETIMAGELIST (WM_USER + 3)
  1402. #define CBEM_GETITEMA (WM_USER + 4)
  1403. #define CBEM_SETITEMA (WM_USER + 5)
  1404. #define CBEM_DELETEITEM CB_DELETESTRING
  1405. #define CBEM_GETCOMBOCONTROL (WM_USER + 6)
  1406. #define CBEM_GETEDITCONTROL (WM_USER + 7)
  1407. #if (_WIN32_IE >= 0x0400)
  1408. #define CBEM_SETEXSTYLE (WM_USER + 8) // use SETEXTENDEDSTYLE instead
  1409. #define CBEM_SETEXTENDEDSTYLE (WM_USER + 14) // lparam == new style, wParam (optional) == mask
  1410. #define CBEM_GETEXSTYLE (WM_USER + 9) // use GETEXTENDEDSTYLE instead
  1411. #define CBEM_GETEXTENDEDSTYLE (WM_USER + 9)
  1412. #else
  1413. #define CBEM_SETEXSTYLE (WM_USER + 8)
  1414. #define CBEM_GETEXSTYLE (WM_USER + 9)
  1415. #endif
  1416. #define CBEM_HASEDITCHANGED (WM_USER + 10)
  1417. #define CBEM_INSERTITEMW (WM_USER + 11)
  1418. #define CBEM_SETITEMW (WM_USER + 12)
  1419. #define CBEM_GETITEMW (WM_USER + 13)
  1420. #ifdef UNICODE
  1421. #define CBEM_INSERTITEM CBEM_INSERTITEMW
  1422. #define CBEM_SETITEM CBEM_SETITEMW
  1423. #define CBEM_GETITEM CBEM_GETITEMW
  1424. #else
  1425. #define CBEM_INSERTITEM CBEM_INSERTITEMA
  1426. #define CBEM_SETITEM CBEM_SETITEMA
  1427. #define CBEM_GETITEM CBEM_GETITEMA
  1428. #endif
  1429. #define CBES_EX_NOEDITIMAGE 0x00000001
  1430. #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
  1431. #define CBES_EX_PATHWORDBREAKPROC 0x00000004
  1432. #if (_WIN32_IE >= 0x0400)
  1433. #define CBES_EX_NOSIZELIMIT 0x00000008
  1434. #define CBES_EX_CASESENSITIVE 0x00000010
  1435. typedef struct {
  1436. NMHDR hdr;
  1437. COMBOBOXEXITEMA ceItem;
  1438. } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
  1439. typedef struct {
  1440. NMHDR hdr;
  1441. COMBOBOXEXITEMW ceItem;
  1442. } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
  1443. #ifdef UNICODE
  1444. #define NMCOMBOBOXEX NMCOMBOBOXEXW
  1445. #define PNMCOMBOBOXEX PNMCOMBOBOXEXW
  1446. #define CBEN_GETDISPINFO CBEN_GETDISPINFOW
  1447. #else
  1448. #define NMCOMBOBOXEX NMCOMBOBOXEXA
  1449. #define PNMCOMBOBOXEX PNMCOMBOBOXEXA
  1450. #define CBEN_GETDISPINFO CBEN_GETDISPINFOA
  1451. #endif
  1452. #else
  1453. typedef struct {
  1454. NMHDR hdr;
  1455. COMBOBOXEXITEM ceItem;
  1456. } NMCOMBOBOXEX, *PNMCOMBOBOXEX;
  1457. #define CBEN_GETDISPINFO (CBEN_FIRST - 0)
  1458. #endif // _WIN32_IE
  1459. #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
  1460. #define CBEN_INSERTITEM (CBEN_FIRST - 1)
  1461. #define CBEN_DELETEITEM (CBEN_FIRST - 2)
  1462. #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
  1463. #define CBEN_ENDEDITA (CBEN_FIRST - 5)
  1464. #define CBEN_ENDEDITW (CBEN_FIRST - 6)
  1465. #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
  1466. // lParam specifies why the endedit is happening
  1467. #ifdef UNICODE
  1468. #define CBEN_ENDEDIT CBEN_ENDEDITW
  1469. #else
  1470. #define CBEN_ENDEDIT CBEN_ENDEDITA
  1471. #endif
  1472. #define CBENF_KILLFOCUS 1
  1473. #define CBENF_RETURN 2
  1474. #define CBENF_ESCAPE 3
  1475. #define CBENF_DROPDOWN 4
  1476. #define CBEMAXSTRLEN 260
  1477. #endif //0
  1478. #if 0
  1479. #define TTN_NEEDTEXTW TTN_NEEDTEXT
  1480. #endif
  1481. // Copied from ..\inc\commctrl.h
  1482. #ifndef SNDMSG
  1483. #ifdef __cplusplus
  1484. #define SNDMSG ::SendMessage
  1485. #else
  1486. #define SNDMSG SendMessage
  1487. #endif
  1488. #endif // ifndef SNDMSG
  1489. #if 0 // Now COMCTLIE has this
  1490. #define DTN_FIRST (0U-760U) // datetimepick
  1491. #define DTN_LAST (0U-799U)
  1492. #define DTN_DATETIMECHANGE (DTN_FIRST + 1) // the systemtime has changed
  1493. typedef struct tagNMDATETIMECHANGE
  1494. {
  1495. NMHDR nmhdr;
  1496. DWORD dwFlags; // GDT_VALID or GDT_NONE
  1497. SYSTEMTIME st; // valid iff dwFlags==GDT_VALID
  1498. } NMDATETIMECHANGE, FAR * LPNMDATETIMECHANGE;
  1499. #define GDT_ERROR -1
  1500. #define GDT_VALID 0
  1501. #define GDT_NONE 1
  1502. #define DTM_FIRST 0x1000
  1503. #define DTM_GETSYSTEMTIME (DTM_FIRST + 1)
  1504. #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))
  1505. #define DTM_SETSYSTEMTIME (DTM_FIRST + 2)
  1506. #define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
  1507. #endif //0
  1508. #define TCS_BOTTOM 0 // 0x0002 - Not supported in Win16
  1509. #endif //_INC_COMCTLIE
  1510. /*****************************************************************************\
  1511. * *
  1512. * From wingdi.h(INC32)
  1513. * *
  1514. \*****************************************************************************/
  1515. #define GB2312_CHARSET 134
  1516. #define JOHAB_CHARSET 130
  1517. #define HEBREW_CHARSET 177
  1518. #define ARABIC_CHARSET 178
  1519. #define GREEK_CHARSET 161
  1520. #define TURKISH_CHARSET 162
  1521. #define VIETNAMESE_CHARSET 163
  1522. #define THAI_CHARSET 222
  1523. #define EASTEUROPE_CHARSET 238
  1524. #define RUSSIAN_CHARSET 204
  1525. #define MAC_CHARSET 77
  1526. #define BALTIC_CHARSET 186
  1527. //LOGFONGA is defined as LOGFONT in Win16x.h
  1528. #undef LOGFONTA
  1529. typedef struct tagLOGFONTA
  1530. {
  1531. LONG lfHeight;
  1532. LONG lfWidth;
  1533. LONG lfEscapement;
  1534. LONG lfOrientation;
  1535. LONG lfWeight;
  1536. BYTE lfItalic;
  1537. BYTE lfUnderline;
  1538. BYTE lfStrikeOut;
  1539. BYTE lfCharSet;
  1540. BYTE lfOutPrecision;
  1541. BYTE lfClipPrecision;
  1542. BYTE lfQuality;
  1543. BYTE lfPitchAndFamily;
  1544. CHAR lfFaceName[LF_FACESIZE];
  1545. } LOGFONTA, *PLOGFONTA, NEAR *NPLOGFONTA, FAR *LPLOGFONTA;
  1546. typedef struct tagENUMLOGFONTEXA
  1547. {
  1548. LOGFONTA elfLogFont;
  1549. BYTE elfFullName[LF_FULLFACESIZE];
  1550. BYTE elfStyle[LF_FACESIZE];
  1551. BYTE elfScript[LF_FACESIZE];
  1552. } ENUMLOGFONTEXA, FAR *LPENUMLOGFONTEXA;
  1553. typedef ENUMLOGFONTEXA ENUMLOGFONTEX;
  1554. typedef LPENUMLOGFONTEXA LPENUMLOGFONTEX;
  1555. typedef struct tagNEWTEXTMETRICA
  1556. {
  1557. LONG tmHeight;
  1558. LONG tmAscent;
  1559. LONG tmDescent;
  1560. LONG tmInternalLeading;
  1561. LONG tmExternalLeading;
  1562. LONG tmAveCharWidth;
  1563. LONG tmMaxCharWidth;
  1564. LONG tmWeight;
  1565. LONG tmOverhang;
  1566. LONG tmDigitizedAspectX;
  1567. LONG tmDigitizedAspectY;
  1568. BYTE tmFirstChar;
  1569. BYTE tmLastChar;
  1570. BYTE tmDefaultChar;
  1571. BYTE tmBreakChar;
  1572. BYTE tmItalic;
  1573. BYTE tmUnderlined;
  1574. BYTE tmStruckOut;
  1575. BYTE tmPitchAndFamily;
  1576. BYTE tmCharSet;
  1577. DWORD ntmFlags;
  1578. UINT ntmSizeEM;
  1579. UINT ntmCellHeight;
  1580. UINT ntmAvgWidth;
  1581. } NEWTEXTMETRICA, *PNEWTEXTMETRICA, NEAR *NPNEWTEXTMETRICA, FAR *LPNEWTEXTMETRICA;
  1582. typedef struct tagFONTSIGNATURE
  1583. {
  1584. DWORD fsUsb[4];
  1585. DWORD fsCsb[2];
  1586. } FONTSIGNATURE, *PFONTSIGNATURE,FAR *LPFONTSIGNATURE;
  1587. typedef struct tagNEWTEXTMETRICEXA
  1588. {
  1589. NEWTEXTMETRICA ntmTm;
  1590. FONTSIGNATURE ntmFontSig;
  1591. }NEWTEXTMETRICEXA;
  1592. typedef NEWTEXTMETRICEXA NEWTEXTMETRICEX;
  1593. typedef struct tagCHARSETINFO
  1594. {
  1595. UINT ciCharset;
  1596. UINT ciACP;
  1597. FONTSIGNATURE fs;
  1598. } CHARSETINFO, *PCHARSETINFO, NEAR *NPCHARSETINFO, FAR *LPCHARSETINFO;
  1599. #define TCI_SRCCHARSET 1
  1600. #define TCI_SRCCODEPAGE 2
  1601. #define TCI_SRCFONTSIG 3
  1602. BOOL WINAPI TranslateCharsetInfo( DWORD FAR *lpSrc, LPCHARSETINFO lpCs, DWORD dwFlags);
  1603. #ifdef GetObject
  1604. #undef GetObject
  1605. #undef DeleteObject
  1606. #undef StretchBlt
  1607. #endif
  1608. #define GetTextExtentPoint32 GetTextExtentPoint
  1609. /*****************************************************************************\
  1610. * *
  1611. * From winuser.h - It should be in the (win16x.h)INC16
  1612. * *
  1613. \*****************************************************************************/
  1614. /*
  1615. * lParam of WM_COPYDATA message points to...
  1616. */
  1617. typedef struct tagCOPYDATASTRUCT {
  1618. DWORD dwData;
  1619. DWORD cbData;
  1620. PVOID lpData;
  1621. } COPYDATASTRUCT, *PCOPYDATASTRUCT;
  1622. #define WM_COPYDATA 0x004A
  1623. #define WM_HELP 0x0053
  1624. #define WM_CTLCOLORSTATIC 0x0138
  1625. #define RegisterWindowMessageA RegisterWindowMessage
  1626. #define SendDlgItemMessageA SendDlgItemMessage
  1627. /*
  1628. * WM_SETICON / WM_GETICON Type Codes
  1629. */
  1630. #define ICON_SMALL 0
  1631. #define ICON_BIG 1
  1632. /*
  1633. * Predefined Clipboard Formats
  1634. */
  1635. #define CF_HDROP 15
  1636. //#define WS_EX_CONTROLPARENT 0x00010000L
  1637. #define WS_EX_CONTROLPARENT 0x00000000L // this is not valid on Win16
  1638. #define WM_GETICON 0x007F
  1639. #define WM_SETICON 0x0080
  1640. #define WM_WININICHANGE 0x001A
  1641. #define WM_SETTINGCHANGE WM_WININICHANGE
  1642. #define SM_CXEDGE 45
  1643. #define SM_CYEDGE 46
  1644. #define LR_DEFAULTCOLOR 0x0000
  1645. #define LR_LOADFROMFILE 0x0010
  1646. #define LR_LOADTRANSPARENT 0x0020
  1647. #define LR_DEFAULTSIZE 0x0040
  1648. #define LR_LOADMAP3DCOLORS 0x1000
  1649. #define LR_CREATEDIBSECTION 0x2000
  1650. BOOL
  1651. WINAPI
  1652. EnumThreadWindows(
  1653. DWORD dwThreadId,
  1654. WNDENUMPROC lpfn,
  1655. LPARAM lParam);
  1656. typedef struct tagNONCLIENTMETRICSA
  1657. {
  1658. UINT cbSize;
  1659. int iBorderWidth;
  1660. int iScrollWidth;
  1661. int iScrollHeight;
  1662. int iCaptionWidth;
  1663. int iCaptionHeight;
  1664. LOGFONT lfCaptionFont;
  1665. int iSmCaptionWidth;
  1666. int iSmCaptionHeight;
  1667. LOGFONT lfSmCaptionFont;
  1668. int iMenuWidth;
  1669. int iMenuHeight;
  1670. LOGFONT lfMenuFont;
  1671. LOGFONT lfStatusFont;
  1672. LOGFONT lfMessageFont;
  1673. } NONCLIENTMETRICSA, *PNONCLIENTMETRICSA, FAR* LPNONCLIENTMETRICSA;
  1674. typedef NONCLIENTMETRICSA NONCLIENTMETRICS;
  1675. int
  1676. WINAPI
  1677. DrawTextEx(
  1678. HDC hdc,
  1679. LPCSTR lpsz,
  1680. int cb,
  1681. LPRECT lprc,
  1682. UINT fuFormat,
  1683. LPVOID lpDTP );
  1684. #define DI_MASK 0x0001
  1685. #define DI_IMAGE 0x0002
  1686. #define DI_NORMAL 0x0003
  1687. #define DI_DEFAULTSIZE 0x0008
  1688. BOOL
  1689. WINAPI
  1690. DrawIconEx(
  1691. HDC hdc,
  1692. int xLeft,
  1693. int yTop,
  1694. HICON hIcon,
  1695. int cxWidth,
  1696. int cyWidth,
  1697. UINT istepIfAniCur,
  1698. HBRUSH hbrFlickerFreeDraw,
  1699. UINT diFlags );
  1700. HANDLE
  1701. WINAPI
  1702. LoadImageA(
  1703. HINSTANCE,
  1704. LPCSTR,
  1705. UINT,
  1706. int,
  1707. int,
  1708. UINT);
  1709. #define LoadImage LoadImageA
  1710. BOOL
  1711. WINAPI
  1712. PostThreadMessageA(
  1713. DWORD idThread,
  1714. UINT Msg,
  1715. WPARAM wParam,
  1716. LPARAM lParam);
  1717. #define PostThreadMessage PostThreadMessageA
  1718. #define BN_SETFOCUS 6
  1719. #define BN_KILLFOCUS 7
  1720. #define BM_GETIMAGE 0x00F6
  1721. #define BM_SETIMAGE 0x00F7
  1722. #define BST_UNCHECKED 0x0000
  1723. //#define BST_CHECKED 0x0001 // defined in WIN16X
  1724. #define BST_INDETERMINATE 0x0002
  1725. #define BST_PUSHED 0x0004
  1726. #define BST_FOCUS 0x0008
  1727. typedef struct tagTPMPARAMS
  1728. {
  1729. UINT cbSize; /* Size of structure */
  1730. RECT rcExclude; /* Screen coordinates of rectangle to exclude when positioning */
  1731. } TPMPARAMS;
  1732. typedef TPMPARAMS FAR *LPTPMPARAMS;
  1733. BOOL
  1734. WINAPI
  1735. TrackPopupMenuEx(
  1736. HMENU hMenu,
  1737. UINT fuFlags,
  1738. int x,
  1739. int y,
  1740. HWND hwnd,
  1741. LPTPMPARAMS lptpm);
  1742. /*
  1743. * Flags for TrackPopupMenu
  1744. */
  1745. #define MB_SETFOREGROUND 0 // 0x00010000L - Not supported in Win16
  1746. #define MB_DEFAULT_DESKTOP_ONLY 0x00020000L
  1747. #define TPM_TOPALIGN 0x0000L
  1748. #define TPM_VCENTERALIGN 0x0010L
  1749. #define TPM_BOTTOMALIGN 0x0020L
  1750. #define TPM_HORIZONTAL 0x0000L /* Horz alignment matters more */
  1751. #define TPM_VERTICAL 0x0040L /* Vert alignment matters more */
  1752. #define TPM_NONOTIFY 0x0080L /* Don't send any notification msgs */
  1753. #define TPM_RETURNCMD 0x0100L
  1754. #define DS_SETFOREGROUND 0x0200L // Not supported in Win16
  1755. #define DS_3DLOOK 0x0004L // Not supported in Win16
  1756. #define DS_CONTROL 0x0400L // Not supported in Win16
  1757. #define DS_CENTER 0x0800L // Not supported in Win16
  1758. #define DS_CONTEXTHELP 0x2000L // Not supported in Win16
  1759. #define SS_BITMAP 0x0000000EL // Not supported in Win16
  1760. #define SS_ETCHEDHORZ 0x00000010L // Not supported in Win16
  1761. #define SS_NOTIFY 0x00000100L // Not supported in Win16
  1762. #define SS_CENTERIMAGE 0x00000200L // Not supported in Win16
  1763. #define SS_REALSIZEIMAGE 0x00000800L // Not supported in Win16
  1764. #define SS_SUNKEN 0x00001000L // Not supported in Win16
  1765. #define BS_ICON 0 // 0x00000040L - Not supported in Win16
  1766. #define BS_PUSHLIKE 0 // 0x00001000L - Not supported in Win16
  1767. #define BS_MULTILINE 0 // 0x00002000L - Not supported in Win16
  1768. #define ES_NUMBER 0 // 0x2000L - Not supported in Win16
  1769. #ifndef NOWINMESSAGES
  1770. /*
  1771. * Static Control Mesages
  1772. */
  1773. // #define STM_SETICON 0x0170
  1774. // #define STM_GETICON 0x0171
  1775. #if(WINVER >= 0x0400)
  1776. #define STM_SETIMAGE 0x0172
  1777. #define STM_GETIMAGE 0x0173
  1778. #define STN_CLICKED 0
  1779. #define STN_DBLCLK 1
  1780. #define STN_ENABLE 2
  1781. #define STN_DISABLE 3
  1782. #endif /* WINVER >= 0x0400 */
  1783. #define STM_MSGMAX 0x0174
  1784. #endif /* !NOWINMESSAGES */
  1785. #define HELP_FINDER 0x000b
  1786. #ifndef NOWINSTYLES
  1787. // begin_r_winuser
  1788. /*
  1789. * Scroll Bar Styles
  1790. */
  1791. #define SBS_HORZ 0x0000L
  1792. #define SBS_VERT 0x0001L
  1793. #define SBS_TOPALIGN 0x0002L
  1794. #define SBS_LEFTALIGN 0x0002L
  1795. #define SBS_BOTTOMALIGN 0x0004L
  1796. #define SBS_RIGHTALIGN 0x0004L
  1797. #define SBS_SIZEBOXTOPLEFTALIGN 0x0002L
  1798. #define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x0004L
  1799. #define SBS_SIZEBOX 0x0008L
  1800. #define SBS_SIZEGRIP 0x0010L
  1801. // end_r_winuser
  1802. //#define CharNextA AnsiNext // defined in WIN16X
  1803. #define CharNextW AnsiNext
  1804. #endif /* !NOWINSTYLES */
  1805. /*****************************************************************************\
  1806. * *
  1807. * From winnls.h(INC32) - It should be in the (win16x.h)INC16
  1808. * *
  1809. \*****************************************************************************/
  1810. //
  1811. // String Length Maximums.
  1812. //
  1813. #define MAX_LEADBYTES 12 // 5 ranges, 2 bytes ea., 0 term.
  1814. #define MAX_DEFAULTCHAR 2 // single or double byte
  1815. #define GetDateFormat GetDateFormatA
  1816. #define GetTimeFormat GetTimeFormatA
  1817. //
  1818. // CP Info.
  1819. //
  1820. typedef struct _cpinfo {
  1821. UINT MaxCharSize; // max length (in bytes) of a char
  1822. BYTE DefaultChar[MAX_DEFAULTCHAR]; // default character
  1823. BYTE LeadByte[MAX_LEADBYTES]; // lead byte ranges
  1824. } CPINFO, *LPCPINFO;
  1825. BOOL
  1826. WINAPI
  1827. IsValidCodePage(
  1828. UINT CodePage);
  1829. BOOL
  1830. WINAPI
  1831. GetCPInfo(
  1832. UINT CodePage,
  1833. LPCPINFO lpCPInfo);
  1834. BOOL
  1835. WINAPI
  1836. IsDBCSLeadByteEx(
  1837. UINT CodePage,
  1838. BYTE TestChar);
  1839. //
  1840. // MBCS and Unicode Translation Flags.
  1841. //
  1842. #define MB_PRECOMPOSED 0x00000001 // use precomposed chars
  1843. #define MB_COMPOSITE 0x00000002 // use composite chars
  1844. #define MB_USEGLYPHCHARS 0x00000004 // use glyph chars, not ctrl chars
  1845. #define MB_ERR_INVALID_CHARS 0x00000008 // error for invalid chars
  1846. #define WC_COMPOSITECHECK 0x00000200 // convert composite to precomposed
  1847. #define WC_DISCARDNS 0x00000010 // discard non-spacing chars
  1848. #define WC_SEPCHARS 0x00000020 // generate separate chars
  1849. #define WC_DEFAULTCHAR 0x00000040 // replace w/ default char
  1850. /*****************************************************************************\
  1851. * *
  1852. * From wincrypt.h(INC32)
  1853. * *
  1854. \*****************************************************************************/
  1855. #define _WIN32_WINNT 0x0400 // temp until we got 16bit wincrypt.h
  1856. #define WINADVAPI // temp until we got 16bit wincrypt.h
  1857. #define _CRYPT32_
  1858. #include "wincrypt.h"
  1859. /*****************************************************************************\
  1860. * *
  1861. * From icwcfg.h(INC32)
  1862. * *
  1863. \*****************************************************************************/
  1864. //
  1865. // defines
  1866. //
  1867. // ICW registry settings
  1868. // HKEY_CURRENT_USER
  1869. #define ICW_REGPATHSETTINGS "Software\\Microsoft\\Internet Connection Wizard"
  1870. #define ICW_REGKEYCOMPLETED "Completed"
  1871. // Maximum field lengths
  1872. #define ICW_MAX_ACCTNAME 256
  1873. #define ICW_MAX_PASSWORD 256 // PWLEN
  1874. #define ICW_MAX_LOGONNAME 256 // UNLEN
  1875. #define ICW_MAX_SERVERNAME 64
  1876. #define ICW_MAX_RASNAME 256 // RAS_MaxEntryName
  1877. #define ICW_MAX_EMAILNAME 64
  1878. #define ICW_MAX_EMAILADDR 128
  1879. // Bit-mapped flags
  1880. // CheckConnectionWizard input flags
  1881. #define ICW_CHECKSTATUS 0x0001
  1882. #define ICW_LAUNCHFULL 0x0100
  1883. #define ICW_LAUNCHMANUAL 0x0200
  1884. // CheckConnectionWizard output flags
  1885. #define ICW_FULLPRESENT 0x0001
  1886. #define ICW_MANUALPRESENT 0x0002
  1887. #define ICW_ALREADYRUN 0x0004
  1888. #define ICW_LAUNCHEDFULL 0x0100
  1889. #define ICW_LAUNCHEDMANUAL 0x0200
  1890. // InetCreateMailNewsAccount input flags
  1891. #define ICW_USEDEFAULTS 0x0001
  1892. #ifdef __cplusplus
  1893. extern "C"
  1894. {
  1895. #endif // __cplusplus
  1896. //
  1897. // type definitions
  1898. //
  1899. typedef enum tagICW_ACCTTYPE
  1900. {
  1901. ICW_ACCTMAIL = 0,
  1902. ICW_ACCTNEWS = ICW_ACCTMAIL + 1
  1903. } ICW_ACCTTYPE;
  1904. typedef struct tagIMNACCTINFO
  1905. {
  1906. DWORD dwSize; // sizeof(MAILNEWSINFO) for versioning
  1907. CHAR szAccountName[ICW_MAX_ACCTNAME + 1]; // Name of Account
  1908. DWORD dwConnectionType; // RAS Connection Type
  1909. // 0 = LAN Connection
  1910. // 1 = Manual Connection
  1911. // 2 = RAS Dialup Connect
  1912. CHAR szPassword[ICW_MAX_PASSWORD + 1]; // Password
  1913. CHAR szUserName[ICW_MAX_LOGONNAME + 1]; // User name (name of logged-on user, if any)
  1914. BOOL fUseSicily; // Use sicily authentication (FALSE)
  1915. CHAR szNNTPServer[ICW_MAX_SERVERNAME + 1]; // NNTP server name
  1916. CHAR szPOP3Server[ICW_MAX_SERVERNAME + 1]; // POP3 server name
  1917. CHAR szSMTPServer[ICW_MAX_SERVERNAME + 1]; // SMTP server name
  1918. CHAR szIMAPServer[ICW_MAX_SERVERNAME + 1]; // IMAP server name
  1919. CHAR szConnectoid[ICW_MAX_RASNAME + 1]; // RAS Connection Name
  1920. CHAR szDisplayName[ICW_MAX_EMAILNAME + 1]; // User�s display name used for sending mail
  1921. CHAR szEmailAddress[ICW_MAX_EMAILADDR + 1]; // User�s email address
  1922. } IMNACCTINFO;
  1923. //
  1924. // external function typedefs
  1925. //
  1926. //typedef HRESULT (WINAPI *PFNCHECKCONNECTIONWIZARD) (DWORD, LPDWORD);
  1927. typedef HRESULT (WINAPI *PFNINETCREATEMAILNEWSACCOUNT) (HWND, ICW_ACCTTYPE, IMNACCTINFO*, DWORD);
  1928. #ifdef __cplusplus
  1929. }
  1930. #endif // __cplusplus
  1931. /*****************************************************************************\
  1932. * *
  1933. * From winerror.h(INC16) - winerror.h file should be included from INC16.
  1934. * *
  1935. \*****************************************************************************/
  1936. #ifdef RC_INVOKED
  1937. #define _HRESULT_TYPEDEF_(_sc) _sc
  1938. #else // RC_INVOKED
  1939. #define _HRESULT_TYPEDEF_(_sc) ((HRESULT)_sc)
  1940. #endif // RC_INVOKED
  1941. //
  1942. // MessageId: ERROR_PATH_NOT_FOUND
  1943. //
  1944. // MessageText:
  1945. //
  1946. // The system cannot find the path specified.
  1947. //
  1948. #define ERROR_PATH_NOT_FOUND 3L
  1949. //
  1950. // MessageId: ERROR_INVALID_DATA
  1951. //
  1952. // MessageText:
  1953. //
  1954. // The data is invalid.
  1955. //
  1956. #define ERROR_INVALID_DATA 13L
  1957. //
  1958. // MessageId: ERROR_TOO_MANY_NAMES
  1959. //
  1960. // MessageText:
  1961. //
  1962. // The name limit for the local computer network
  1963. // adapter card was exceeded.
  1964. //
  1965. #define ERROR_TOO_MANY_NAMES 68L
  1966. //
  1967. // MessageId: ERROR_FILE_EXISTS
  1968. //
  1969. // MessageText:
  1970. //
  1971. // The file exists.
  1972. //
  1973. #define ERROR_FILE_EXISTS 80L
  1974. //
  1975. // MessageId: ERROR_DISK_FULL
  1976. //
  1977. // MessageText:
  1978. //
  1979. // There is not enough space on the disk.
  1980. //
  1981. #define ERROR_DISK_FULL 112L
  1982. //
  1983. // MessageId: ERROR_ALREADY_EXISTS
  1984. //
  1985. // MessageText:
  1986. //
  1987. // Cannot create a file when that file already exists.
  1988. //
  1989. #define ERROR_ALREADY_EXISTS 183L
  1990. //
  1991. // MessageId: ERROR_MORE_DATA
  1992. //
  1993. // MessageText:
  1994. //
  1995. // More data is available.
  1996. //
  1997. #define ERROR_MORE_DATA 234L // dderror
  1998. //
  1999. // MessageId: ERROR_INVALID_FLAGS
  2000. //
  2001. // MessageText:
  2002. //
  2003. // Invalid flags.
  2004. //
  2005. #define ERROR_INVALID_FLAGS 1004L
  2006. //
  2007. // MessageId: ERROR_NO_UNICODE_TRANSLATION
  2008. //
  2009. // MessageText:
  2010. //
  2011. // No mapping for the Unicode character exists in the target multi-byte code page.
  2012. //
  2013. #define ERROR_NO_UNICODE_TRANSLATION 1113L
  2014. //
  2015. // MessageId: ERROR_CLASS_ALREADY_EXISTS
  2016. //
  2017. // MessageText:
  2018. //
  2019. // Class already exists.
  2020. //
  2021. #define ERROR_CLASS_ALREADY_EXISTS 1410L
  2022. //
  2023. // MessageId: NTE_BAD_DATA
  2024. //
  2025. // MessageText:
  2026. //
  2027. // Bad Data.
  2028. //
  2029. #define NTE_BAD_DATA _HRESULT_TYPEDEF_(0x80090005L)
  2030. //
  2031. // MessageId: NTE_BAD_SIGNATURE
  2032. //
  2033. // MessageText:
  2034. //
  2035. // Invalid Signature.
  2036. //
  2037. #define NTE_BAD_SIGNATURE _HRESULT_TYPEDEF_(0x80090006L)
  2038. //
  2039. // MessageId: NTE_BAD_ALGID
  2040. //
  2041. // MessageText:
  2042. //
  2043. // Invalid algorithm specified.
  2044. //
  2045. #define NTE_BAD_ALGID _HRESULT_TYPEDEF_(0x80090008L)
  2046. //
  2047. // MessageId: NTE_EXISTS
  2048. //
  2049. // MessageText:
  2050. //
  2051. // Object already exists.
  2052. //
  2053. #define NTE_EXISTS _HRESULT_TYPEDEF_(0x8009000FL)
  2054. //
  2055. // MessageId: NTE_FAIL
  2056. //
  2057. // MessageText:
  2058. //
  2059. // An internal error occurred.
  2060. //
  2061. #define NTE_FAIL _HRESULT_TYPEDEF_(0x80090020L)
  2062. //
  2063. // MessageId: CRYPT_E_MSG_ERROR
  2064. //
  2065. // MessageText:
  2066. //
  2067. // An error was encountered doing a cryptographic message operation.
  2068. //
  2069. #define CRYPT_E_MSG_ERROR _HRESULT_TYPEDEF_(0x80091001L)
  2070. //
  2071. // MessageId: CRYPT_E_HASH_VALUE
  2072. //
  2073. // MessageText:
  2074. //
  2075. // The hash value is not correct.
  2076. //
  2077. #define CRYPT_E_HASH_VALUE _HRESULT_TYPEDEF_(0x80091007L)
  2078. //
  2079. // MessageId: CRYPT_E_SIGNER_NOT_FOUND
  2080. //
  2081. // MessageText:
  2082. //
  2083. // The original signer is not found.
  2084. //
  2085. #define CRYPT_E_SIGNER_NOT_FOUND _HRESULT_TYPEDEF_(0x8009100EL)
  2086. //
  2087. // MessageId: CRYPT_E_STREAM_MSG_NOT_READY
  2088. //
  2089. // MessageText:
  2090. //
  2091. // The steamed message is note yet able to return the requested data.
  2092. //
  2093. #define CRYPT_E_STREAM_MSG_NOT_READY _HRESULT_TYPEDEF_(0x80091010L)
  2094. //
  2095. // MessageId: CRYPT_E_NOT_FOUND
  2096. //
  2097. // MessageText:
  2098. //
  2099. // The object or property wasn't found
  2100. //
  2101. #define CRYPT_E_NOT_FOUND _HRESULT_TYPEDEF_(0x80092004L)
  2102. // MessageId: CRYPT_E_EXISTS
  2103. //
  2104. // MessageText:
  2105. //
  2106. // The object or property already exists
  2107. //
  2108. #define CRYPT_E_EXISTS _HRESULT_TYPEDEF_(0x80092005L)
  2109. //
  2110. // MessageId: CRYPT_E_SELF_SIGNED
  2111. //
  2112. // MessageText:
  2113. //
  2114. // The specified certificate is self signed.
  2115. //
  2116. #define CRYPT_E_SELF_SIGNED _HRESULT_TYPEDEF_(0x80092007L)
  2117. //
  2118. //
  2119. // MessageId: CRYPT_E_NO_KEY_PROPERTY
  2120. //
  2121. // MessageText:
  2122. //
  2123. // The certificate doesn't have a private key property
  2124. //
  2125. #define CRYPT_E_NO_KEY_PROPERTY _HRESULT_TYPEDEF_(0x8009200BL)
  2126. // MessageId: CRYPT_E_NO_DECRYPT_CERT
  2127. //
  2128. // MessageText:
  2129. //
  2130. // No certificate was found having a private key property to use for decrypting.
  2131. //
  2132. #define CRYPT_E_NO_DECRYPT_CERT _HRESULT_TYPEDEF_(0x8009200CL)
  2133. //
  2134. // MessageId: ERROR_ALREADY_INITIALIZED
  2135. //
  2136. // MessageText:
  2137. //
  2138. // An attempt was made to perform an initialization operation when
  2139. // initialization has already been completed.
  2140. //
  2141. #define ERROR_ALREADY_INITIALIZED 1247L
  2142. /*****************************************************************************\
  2143. * *
  2144. * From winreg.h(INC32)
  2145. * *
  2146. \*****************************************************************************/
  2147. #if 0
  2148. LONG
  2149. APIENTRY
  2150. RegEnumValueA (
  2151. HKEY hKey,
  2152. DWORD dwIndex,
  2153. LPSTR lpValueName,
  2154. LPDWORD lpcbValueName,
  2155. LPDWORD lpReserved,
  2156. LPDWORD lpType,
  2157. LPBYTE lpData,
  2158. LPDWORD lpcbData
  2159. );
  2160. #define RegEnumValue RegEnumValueA
  2161. #endif
  2162. #define STANDARD_RIGHTS_WRITE (READ_CONTROL)
  2163. /*****************************************************************************\
  2164. * *
  2165. * From mmsystem.h(INC32)
  2166. * *
  2167. \*****************************************************************************/
  2168. typedef UINT FAR *LPUINT;
  2169. /*****************************************************************************\
  2170. * *
  2171. * From shellapi.h(INC32)
  2172. * *
  2173. \*****************************************************************************/
  2174. #if 0 // Started to use SHELLAPI
  2175. typedef struct _SHFILEINFOA
  2176. {
  2177. HICON hIcon; // out: icon
  2178. int iIcon; // out: icon index
  2179. DWORD dwAttributes; // out: SFGAO_ flags
  2180. CHAR szDisplayName[MAX_PATH]; // out: display name (or path)
  2181. CHAR szTypeName[80]; // out: type name
  2182. } SHFILEINFOA;
  2183. typedef SHFILEINFOA SHFILEINFO;
  2184. #define SHGFI_ICON 0x000000100 // get icon
  2185. #define SHGFI_DISPLAYNAME 0x000000200 // get display name
  2186. #define SHGFI_TYPENAME 0x000000400 // get type name
  2187. #define SHGFI_ATTRIBUTES 0x000000800 // get attributes
  2188. #define SHGFI_ICONLOCATION 0x000001000 // get icon location
  2189. #define SHGFI_EXETYPE 0x000002000 // return exe type
  2190. #define SHGFI_SYSICONINDEX 0x000004000 // get system icon index
  2191. #define SHGFI_LINKOVERLAY 0x000008000 // put a link overlay on icon
  2192. #define SHGFI_SELECTED 0x000010000 // show icon in selected state
  2193. #define SHGFI_LARGEICON 0x000000000 // get large icon
  2194. #define SHGFI_SMALLICON 0x000000001 // get small icon
  2195. #define SHGFI_OPENICON 0x000000002 // get open icon
  2196. #define SHGFI_SHELLICONSIZE 0x000000004 // get shell size icon
  2197. #define SHGFI_PIDL 0x000000008 // pszPath is a pidl
  2198. #define SHGFI_USEFILEATTRIBUTES 0x000000010 // use passed dwFileAttribute
  2199. DWORD WINAPI SHGetFileInfoA(LPCSTR pszPath, DWORD dwFileAttributes, SHFILEINFOA FAR *psfi, UINT cbFileInfo, UINT uFlags);
  2200. #define SHGetFileInfo SHGetFileInfoA
  2201. ////
  2202. //// Tray notification definitions
  2203. ////
  2204. typedef struct _NOTIFYICONDATAA {
  2205. DWORD cbSize;
  2206. HWND hWnd;
  2207. UINT uID;
  2208. UINT uFlags;
  2209. UINT uCallbackMessage;
  2210. HICON hIcon;
  2211. CHAR szTip[64];
  2212. } NOTIFYICONDATAA, *PNOTIFYICONDATAA;
  2213. typedef struct _NOTIFYICONDATAW {
  2214. DWORD cbSize;
  2215. HWND hWnd;
  2216. UINT uID;
  2217. UINT uFlags;
  2218. UINT uCallbackMessage;
  2219. HICON hIcon;
  2220. WCHAR szTip[64];
  2221. } NOTIFYICONDATAW, *PNOTIFYICONDATAW;
  2222. #ifdef UNICODE
  2223. typedef NOTIFYICONDATAW NOTIFYICONDATA;
  2224. typedef PNOTIFYICONDATAW PNOTIFYICONDATA;
  2225. #else
  2226. typedef NOTIFYICONDATAA NOTIFYICONDATA;
  2227. typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
  2228. #endif // UNICODE
  2229. #define NIM_ADD 0x00000000
  2230. #define NIM_MODIFY 0x00000001
  2231. #define NIM_DELETE 0x00000002
  2232. #define NIF_MESSAGE 0x00000001
  2233. #define NIF_ICON 0x00000002
  2234. #define NIF_TIP 0x00000004
  2235. BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
  2236. BOOL WINAPI Shell_NotifyIconW(DWORD dwMessage, PNOTIFYICONDATAW lpData);
  2237. #ifdef UNICODE
  2238. #define Shell_NotifyIcon Shell_NotifyIconW
  2239. #else
  2240. #define Shell_NotifyIcon Shell_NotifyIconA
  2241. #endif // !UNICODE
  2242. ////
  2243. //// End Tray Notification Icons
  2244. ////
  2245. ////
  2246. //// Begin ShellExecuteEx and family
  2247. ////
  2248. /* ShellExecute() and ShellExecuteEx() error codes */
  2249. /* regular WinExec() codes */
  2250. #define SE_ERR_FNF 2 // file not found
  2251. #define SE_ERR_PNF 3 // path not found
  2252. #define SE_ERR_ACCESSDENIED 5 // access denied
  2253. #define SE_ERR_OOM 8 // out of memory
  2254. #define SE_ERR_DLLNOTFOUND 32
  2255. /* error values for ShellExecute() beyond the regular WinExec() codes */
  2256. #define SE_ERR_SHARE 26
  2257. #define SE_ERR_ASSOCINCOMPLETE 27
  2258. #define SE_ERR_DDETIMEOUT 28
  2259. #define SE_ERR_DDEFAIL 29
  2260. #define SE_ERR_DDEBUSY 30
  2261. #define SE_ERR_NOASSOC 31
  2262. // Note CLASSKEY overrides CLASSNAME
  2263. #define SEE_MASK_CLASSNAME 0x00000001
  2264. #define SEE_MASK_CLASSKEY 0x00000003
  2265. // Note INVOKEIDLIST overrides IDLIST
  2266. #define SEE_MASK_IDLIST 0x00000004
  2267. #define SEE_MASK_INVOKEIDLIST 0x0000000c
  2268. #define SEE_MASK_ICON 0x00000010
  2269. #define SEE_MASK_HOTKEY 0x00000020
  2270. #define SEE_MASK_NOCLOSEPROCESS 0x00000040
  2271. #define SEE_MASK_CONNECTNETDRV 0x00000080
  2272. #define SEE_MASK_FLAG_DDEWAIT 0x00000100
  2273. #define SEE_MASK_DOENVSUBST 0x00000200
  2274. #define SEE_MASK_FLAG_NO_UI 0x00000400
  2275. #define SEE_MASK_UNICODE 0x00004000
  2276. #define SEE_MASK_NO_CONSOLE 0x00008000
  2277. #define SEE_MASK_ASYNCOK 0x00100000
  2278. #define SEE_MASK_HMONITOR 0x00200000
  2279. typedef struct _SHELLEXECUTEINFOA
  2280. {
  2281. DWORD cbSize;
  2282. ULONG fMask;
  2283. HWND hwnd;
  2284. LPCSTR lpVerb;
  2285. LPCSTR lpFile;
  2286. LPCSTR lpParameters;
  2287. LPCSTR lpDirectory;
  2288. int nShow;
  2289. HINSTANCE hInstApp;
  2290. // Optional fields
  2291. LPVOID lpIDList;
  2292. LPCSTR lpClass;
  2293. HKEY hkeyClass;
  2294. DWORD dwHotKey;
  2295. union {
  2296. HANDLE hIcon;
  2297. HANDLE hMonitor;
  2298. };
  2299. HANDLE hProcess;
  2300. } SHELLEXECUTEINFOA, FAR *LPSHELLEXECUTEINFOA;
  2301. typedef struct _SHELLEXECUTEINFOW
  2302. {
  2303. DWORD cbSize;
  2304. ULONG fMask;
  2305. HWND hwnd;
  2306. LPCWSTR lpVerb;
  2307. LPCWSTR lpFile;
  2308. LPCWSTR lpParameters;
  2309. LPCWSTR lpDirectory;
  2310. int nShow;
  2311. HINSTANCE hInstApp;
  2312. // Optional fields
  2313. LPVOID lpIDList;
  2314. LPCWSTR lpClass;
  2315. HKEY hkeyClass;
  2316. DWORD dwHotKey;
  2317. union {
  2318. HANDLE hIcon;
  2319. HANDLE hMonitor;
  2320. };
  2321. HANDLE hProcess;
  2322. } SHELLEXECUTEINFOW, FAR *LPSHELLEXECUTEINFOW;
  2323. #ifdef UNICODE
  2324. typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO;
  2325. typedef LPSHELLEXECUTEINFOW LPSHELLEXECUTEINFO;
  2326. #else
  2327. typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
  2328. typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
  2329. #endif // UNICODE
  2330. BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
  2331. BOOL WINAPI ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo);
  2332. #ifdef UNICODE
  2333. #define ShellExecuteEx ShellExecuteExW
  2334. #else
  2335. #define ShellExecuteEx ShellExecuteExA
  2336. #endif // !UNICODE
  2337. ////
  2338. //// End ShellExecuteEx and family
  2339. ////
  2340. #endif //0
  2341. /*****************************************************************************\
  2342. * *
  2343. * From windowsx.h(INC32)
  2344. * *
  2345. \*****************************************************************************/
  2346. /* void Cls_OnContextMenu(HWND hwnd, HWND hwndContext, UINT xPos, UINT yPos) */
  2347. #define HANDLE_WM_CONTEXTMENU(hwnd, wParam, lParam, fn) \
  2348. ((fn)((hwnd), (HWND)(wParam), (UINT)LOWORD(lParam), (UINT)HIWORD(lParam)), 0L)
  2349. #define HANDLE_WM_CTLCOLORSTATIC(hwnd, wParam, lParam, fn) \
  2350. (LRESULT)(DWORD)(UINT)(HBRUSH)(fn)((hwnd), (HDC)(wParam), (HWND)(lParam), CTLCOLOR_STATIC)
  2351. typedef MINMAXINFO FAR * LPMINMAXINFO;
  2352. typedef MINMAXINFO FAR * LPMINMAXINFO;
  2353. typedef WCHAR PWCHAR;
  2354. #if 0 // Now WINDEF has this
  2355. #define DECLSPEC_IMPORT
  2356. #endif
  2357. #define GetPrivateProfileIntA GetPrivateProfileInt
  2358. #define lstrcmpA lstrcmp
  2359. #define lstrcmpW lstrcmp
  2360. #define lstrcmpiA lstrcmpi
  2361. #define LoadStringA LoadString
  2362. /*****************************************************************************\
  2363. * *
  2364. * From commdlg.h - It should be in the INC16
  2365. * *
  2366. \*****************************************************************************/
  2367. #define OFN_NONETWORKBUTTON 0x00020000
  2368. #define OFN_EXPLORER 0 // 0x00080000 - Not available on Win16
  2369. #define OFN_NODEREFERENCELINKS 0 // 0x00100000 - Not available on Win16
  2370. typedef UINT (CALLBACK *LPOFNHOOKPROC)( HWND, UINT, WPARAM, LPARAM );
  2371. #define CF_NOVERTFONTS 0 // 0x01000000L - Not available on Win16
  2372. #define CDM_FIRST (WM_USER + 100)
  2373. #define CDM_LAST (WM_USER + 200)
  2374. // lParam = pointer to a string
  2375. // wParam = ID of control to change
  2376. // return = not used
  2377. #define CDM_SETCONTROLTEXT (CDM_FIRST + 0x0004)
  2378. #define CommDlg_OpenSave_SetControlText(_hdlg, _id, _text) \
  2379. (void)SNDMSG(_hdlg, CDM_SETCONTROLTEXT, (WPARAM)_id, (LPARAM)(LPSTR)_text)
  2380. /*****************************************************************************\
  2381. * *
  2382. * From ntregapi.h - It should be in the INC16
  2383. * *
  2384. \*****************************************************************************/
  2385. //
  2386. // Key creation/open disposition
  2387. //
  2388. #define REG_CREATED_NEW_KEY (0x00000001L) // New Registry Key created
  2389. #define REG_OPENED_EXISTING_KEY (0x00000002L) // Existing Key opened
  2390. /*****************************************************************************\
  2391. * *
  2392. * From ntregapi.h - It should be in the INC16
  2393. * *
  2394. \*****************************************************************************/
  2395. #if 0
  2396. typedef struct tagVS_FIXEDFILEINFO
  2397. {
  2398. DWORD dwSignature; /* e.g. 0xfeef04bd */
  2399. DWORD dwStrucVersion; /* e.g. 0x00000042 = "0.42" */
  2400. DWORD dwFileVersionMS; /* e.g. 0x00030075 = "3.75" */
  2401. DWORD dwFileVersionLS; /* e.g. 0x00000031 = "0.31" */
  2402. DWORD dwProductVersionMS; /* e.g. 0x00030010 = "3.10" */
  2403. DWORD dwProductVersionLS; /* e.g. 0x00000031 = "0.31" */
  2404. DWORD dwFileFlagsMask; /* = 0x3F for version "0.42" */
  2405. DWORD dwFileFlags; /* e.g. VFF_DEBUG | VFF_PRERELEASE */
  2406. DWORD dwFileOS; /* e.g. VOS_DOS_WINDOWS16 */
  2407. DWORD dwFileType; /* e.g. VFT_DRIVER */
  2408. DWORD dwFileSubtype; /* e.g. VFT2_DRV_KEYBOARD */
  2409. DWORD dwFileDateMS; /* e.g. 0 */
  2410. DWORD dwFileDateLS; /* e.g. 0 */
  2411. } VS_FIXEDFILEINFO;
  2412. #endif
  2413. #if 0 // Now WINERROR has this
  2414. /*****************************************************************************\
  2415. * *
  2416. * From compobj.h - It should be in the INC16
  2417. * *
  2418. \*****************************************************************************/
  2419. #define CO_E_NOT_SUPPORTED (CO_E_FIRST + 0x10)
  2420. #endif
  2421. /*****************************************************************************\
  2422. * *
  2423. * From mbstring.h - It should be in the INC16
  2424. * *
  2425. \*****************************************************************************/
  2426. /***
  2427. * mbstring.h - MBCS string manipulation macros and functions
  2428. *
  2429. * Copyright (c) 1990-1995, Microsoft Corporation. All rights reserved.
  2430. *
  2431. *Purpose:
  2432. * This file contains macros and function declarations for the MBCS
  2433. * string manipulation functions.
  2434. *
  2435. * [Public]
  2436. *
  2437. ****/
  2438. #if _MSC_VER > 1000
  2439. #pragma once
  2440. #endif
  2441. #ifndef _INC_MBSTRING
  2442. #define _INC_MBSTRING
  2443. #ifdef _MSC_VER
  2444. /*
  2445. * Currently, all MS C compilers for Win32 platforms default to 8 byte
  2446. * alignment.
  2447. */
  2448. #pragma pack(push,8)
  2449. #endif /* _MSC_VER */
  2450. #ifdef __cplusplus
  2451. extern "C" {
  2452. #endif
  2453. /* Define _CRTIMP */
  2454. #ifndef _CRTIMP
  2455. #ifdef _NTSDK
  2456. /* definition compatible with NT SDK */
  2457. #define _CRTIMP
  2458. #else /* ndef _NTSDK */
  2459. /* current definition */
  2460. #ifdef _DLL
  2461. #define _CRTIMP __declspec(dllimport)
  2462. #else /* ndef _DLL */
  2463. #define _CRTIMP
  2464. #endif /* _DLL */
  2465. #endif /* _NTSDK */
  2466. #endif /* _CRTIMP */
  2467. #ifndef _SIZE_T_DEFINED
  2468. typedef unsigned int size_t;
  2469. #define _SIZE_T_DEFINED
  2470. #endif
  2471. #ifndef _NLSCMP_DEFINED
  2472. #define _NLSCMPERROR 2147483647 /* currently == INT_MAX */
  2473. #define _NLSCMP_DEFINED
  2474. #endif
  2475. #if 0
  2476. #ifndef _VA_LIST_DEFINED
  2477. #ifdef _M_ALPHA
  2478. typedef struct {
  2479. char *a0; /* pointer to first homed integer argument */
  2480. int offset; /* byte offset of next parameter */
  2481. } va_list;
  2482. #else
  2483. typedef char * va_list;
  2484. #endif
  2485. #define _VA_LIST_DEFINED
  2486. #endif
  2487. #ifndef _FILE_DEFINED
  2488. struct _iobuf {
  2489. char *_ptr;
  2490. int _cnt;
  2491. char *_base;
  2492. int _flag;
  2493. int _file;
  2494. int _charbuf;
  2495. int _bufsiz;
  2496. char *_tmpfname;
  2497. };
  2498. typedef struct _iobuf FILE;
  2499. #define _FILE_DEFINED
  2500. #endif
  2501. #endif
  2502. /*
  2503. * MBCS - Multi-Byte Character Set
  2504. */
  2505. #ifndef _MBSTRING_DEFINED
  2506. /* function prototypes */
  2507. _CRTIMP unsigned int __cdecl _mbbtombc(unsigned int);
  2508. _CRTIMP int __cdecl _mbbtype(unsigned char, int);
  2509. _CRTIMP unsigned int __cdecl _mbctombb(unsigned int);
  2510. _CRTIMP int __cdecl _mbsbtype(const unsigned char *, size_t);
  2511. _CRTIMP unsigned char * __cdecl _mbschr(const unsigned char *, unsigned int);
  2512. _CRTIMP int __cdecl _mbscmp(const unsigned char *, const unsigned char *);
  2513. _CRTIMP int __cdecl _mbscoll(const unsigned char *, const unsigned char *);
  2514. _CRTIMP size_t __cdecl _mbscspn(const unsigned char *, const unsigned char *);
  2515. _CRTIMP unsigned char * __cdecl _mbsdec(const unsigned char *, const unsigned char *);
  2516. _CRTIMP unsigned char * __cdecl _mbsdup(const unsigned char *);
  2517. _CRTIMP int __cdecl _mbsicmp(const unsigned char *, const unsigned char *);
  2518. _CRTIMP int __cdecl _mbsicoll(const unsigned char *, const unsigned char *);
  2519. _CRTIMP unsigned char * __cdecl _mbsinc(const unsigned char *);
  2520. _CRTIMP size_t __cdecl _mbslen(const unsigned char *);
  2521. _CRTIMP unsigned char * __cdecl _mbslwr(unsigned char *);
  2522. _CRTIMP int __cdecl _mbsnbcmp(const unsigned char *, const unsigned char *, size_t);
  2523. _CRTIMP int __cdecl _mbsnbcoll(const unsigned char *, const unsigned char *, size_t);
  2524. _CRTIMP size_t __cdecl _mbsnbcnt(const unsigned char *, size_t);
  2525. _CRTIMP int __cdecl _mbsnbicmp(const unsigned char *, const unsigned char *, size_t);
  2526. _CRTIMP int __cdecl _mbsnbicoll(const unsigned char *, const unsigned char *, size_t);
  2527. _CRTIMP unsigned char * __cdecl _mbsnbset(unsigned char *, unsigned int, size_t);
  2528. _CRTIMP unsigned char * __cdecl _mbsncat(unsigned char *, const unsigned char *, size_t);
  2529. _CRTIMP size_t __cdecl _mbsnccnt(const unsigned char *, size_t);
  2530. _CRTIMP int __cdecl _mbsncmp(const unsigned char *, const unsigned char *, size_t);
  2531. _CRTIMP int __cdecl _mbsncoll(const unsigned char *, const unsigned char *, size_t);
  2532. _CRTIMP unsigned char * __cdecl _mbsncpy(unsigned char *, const unsigned char *, size_t);
  2533. _CRTIMP unsigned int __cdecl _mbsnextc (const unsigned char *);
  2534. _CRTIMP int __cdecl _mbsnicmp(const unsigned char *, const unsigned char *, size_t);
  2535. _CRTIMP int __cdecl _mbsnicoll(const unsigned char *, const unsigned char *, size_t);
  2536. _CRTIMP unsigned char * __cdecl _mbsninc(const unsigned char *, size_t);
  2537. _CRTIMP unsigned char * __cdecl _mbsnset(unsigned char *, unsigned int, size_t);
  2538. _CRTIMP unsigned char * __cdecl _mbspbrk(const unsigned char *, const unsigned char *);
  2539. _CRTIMP unsigned char * __cdecl _mbsrchr(const unsigned char *, unsigned int);
  2540. _CRTIMP unsigned char * __cdecl _mbsrev(unsigned char *);
  2541. _CRTIMP unsigned char * __cdecl _mbsset(unsigned char *, unsigned int);
  2542. _CRTIMP size_t __cdecl _mbsspn(const unsigned char *, const unsigned char *);
  2543. _CRTIMP unsigned char * __cdecl _mbsspnp(const unsigned char *, const unsigned char *);
  2544. _CRTIMP unsigned char * __cdecl _mbsstr(const unsigned char *, const unsigned char *);
  2545. _CRTIMP unsigned char * __cdecl _mbstok(unsigned char *, const unsigned char *);
  2546. _CRTIMP unsigned char * __cdecl _mbsupr(unsigned char *);
  2547. _CRTIMP size_t __cdecl _mbclen(const unsigned char *);
  2548. #define _mbccmp(_cpc1, _cpc2) _mbsncmp((_cpc1),(_cpc2),1)
  2549. /* character routines */
  2550. _CRTIMP int __cdecl _ismbcalnum(unsigned int);
  2551. _CRTIMP int __cdecl _ismbcalpha(unsigned int);
  2552. _CRTIMP int __cdecl _ismbcdigit(unsigned int);
  2553. _CRTIMP int __cdecl _ismbcgraph(unsigned int);
  2554. _CRTIMP int __cdecl _ismbclegal(unsigned int);
  2555. _CRTIMP int __cdecl _ismbclower(unsigned int);
  2556. _CRTIMP int __cdecl _ismbcprint(unsigned int);
  2557. _CRTIMP int __cdecl _ismbcpunct(unsigned int);
  2558. _CRTIMP int __cdecl _ismbcspace(unsigned int);
  2559. _CRTIMP int __cdecl _ismbcupper(unsigned int);
  2560. _CRTIMP unsigned int __cdecl _mbctolower(unsigned int);
  2561. _CRTIMP unsigned int __cdecl _mbctoupper(unsigned int);
  2562. #define _MBSTRING_DEFINED
  2563. #endif
  2564. #ifndef _MBLEADTRAIL_DEFINED
  2565. _CRTIMP int __cdecl _ismbblead( unsigned int );
  2566. _CRTIMP int __cdecl _ismbbtrail( unsigned int );
  2567. _CRTIMP int __cdecl _ismbslead( const unsigned char *, const unsigned char *);
  2568. _CRTIMP int __cdecl _ismbstrail( const unsigned char *, const unsigned char *);
  2569. #define _MBLEADTRAIL_DEFINED
  2570. #endif
  2571. /* Kanji specific prototypes. */
  2572. _CRTIMP int __cdecl _ismbchira(unsigned int);
  2573. _CRTIMP int __cdecl _ismbckata(unsigned int);
  2574. _CRTIMP int __cdecl _ismbcsymbol(unsigned int);
  2575. _CRTIMP int __cdecl _ismbcl0(unsigned int);
  2576. _CRTIMP int __cdecl _ismbcl1(unsigned int);
  2577. _CRTIMP int __cdecl _ismbcl2(unsigned int);
  2578. _CRTIMP unsigned int __cdecl _mbcjistojms(unsigned int);
  2579. _CRTIMP unsigned int __cdecl _mbcjmstojis(unsigned int);
  2580. _CRTIMP unsigned int __cdecl _mbctohira(unsigned int);
  2581. _CRTIMP unsigned int __cdecl _mbctokata(unsigned int);
  2582. #ifdef __cplusplus
  2583. }
  2584. #endif
  2585. #ifdef _MSC_VER
  2586. #pragma pack(pop)
  2587. #endif /* _MSC_VER */
  2588. #endif /* _INC_MBSTRING */
  2589. /*****************************************************************************\
  2590. * *
  2591. * From winnt.h(INC32)
  2592. * *
  2593. \*****************************************************************************/
  2594. #define MEM_COMMIT 0x1000
  2595. #define MEM_RESERVE 0x2000
  2596. #define MEM_DECOMMIT 0x4000
  2597. #define MEM_RELEASE 0x8000
  2598. struct WNDMSGPARAM16
  2599. {
  2600. LPARAM wParam;
  2601. LPARAM lParam;
  2602. };
  2603. /*****************************************************************************\
  2604. * *
  2605. * From shlwapi.h - shlwapi.h in INC16 is not feasible for us
  2606. * *
  2607. \*****************************************************************************/
  2608. #ifdef __cplusplus
  2609. }
  2610. #endif //__cplusplus
  2611. /*****************************************************************************\
  2612. * *
  2613. * From iehelpid - iehelpid.h from INC which is not in INC16
  2614. * *
  2615. \*****************************************************************************/
  2616. //CERTIFICATE PROPERTIES DIALOG BOX
  2617. #define IDH_CERTVWPROP_GEN_FINEPRINT 50228
  2618. #define IDH_CERTVWPROP_DET_ISSUER_CERT 50229
  2619. #define IDH_CERTVWPROP_DET_FRIENDLY 50230
  2620. #define IDH_CERTVWPROP_DET_STATUS 50231
  2621. #define IDH_CERTVWPROP_TRUST_PURPOSE 50232
  2622. #define IDH_CERTVWPROP_TRUST_HIERAR 50233
  2623. #define IDH_CERTVWPROP_TRUST_VIEWCERT 50234
  2624. #define IDH_CERTVWPROP_TRUST_INHERIT 50235
  2625. #define IDH_CERTVWPROP_TRUST_EXPLICIT_TRUST 50236
  2626. #define IDH_CERTVWPROP_TRUST_EXPLICIT_DISTRUST 50237
  2627. #define IDH_CERTVWPROP_ADV_FIELD 50238
  2628. #define IDH_CERTVWPROP_ADV_DETAILS 50239
  2629. #endif // ATHENA16_H