home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 December / PCWKCD1296.iso / vjplusb / activex / inetsdk / include / wininet.h < prev    next >
C/C++ Source or Header  |  1996-07-15  |  77KB  |  2,595 lines

  1.     /*++
  2.  
  3. Copyright (c) 1995-1996  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     wininet.h
  8.  
  9. Abstract:
  10.  
  11.     Contains manifests, macros, types and prototypes for Microsoft Windows
  12.     Internet Extensions
  13.  
  14. --*/
  15.  
  16. #if !defined(_WININET_)
  17. #define _WININET_
  18.  
  19. /*
  20.  * Set up Structure Packing to be 4 bytes
  21.  * for all wininet structures
  22.  */
  23.  
  24. #pragma pack(push, wininet, 4)
  25.  
  26. #if defined(__cplusplus)
  27. extern "C" {
  28. #endif
  29.  
  30. #if !defined(_WINX32_)
  31. #define INTERNETAPI DECLSPEC_IMPORT
  32. #else
  33. #define INTERNETAPI
  34. #endif
  35.  
  36. //
  37. // internet types
  38. //
  39.  
  40. typedef LPVOID HINTERNET;
  41. typedef HINTERNET * LPHINTERNET;
  42.  
  43. typedef WORD INTERNET_PORT;
  44. typedef INTERNET_PORT * LPINTERNET_PORT;
  45.  
  46. //
  47. // Internet APIs
  48. //
  49.  
  50. //
  51. // manifests
  52. //
  53.  
  54. #define INTERNET_INVALID_PORT_NUMBER    0           // use the protocol-specific default
  55.  
  56. #define INTERNET_DEFAULT_FTP_PORT       21          // default for FTP servers
  57. #define INTERNET_DEFAULT_GOPHER_PORT    70          //    "     "  gopher "
  58. #define INTERNET_DEFAULT_HTTP_PORT      80          //    "     "  HTTP   "
  59. #define INTERNET_DEFAULT_HTTPS_PORT     443         //    "     "  HTTPS  "
  60. #define INTERNET_DEFAULT_SOCKS_PORT     1080        // default for SOCKS firewall servers.
  61.  
  62. #define MAX_CACHE_ENTRY_INFO_SIZE       4096
  63.  
  64. //
  65. // maximum field lengths (arbitrary)
  66. //
  67.  
  68. #define INTERNET_MAX_HOST_NAME_LENGTH   256
  69. #define INTERNET_MAX_USER_NAME_LENGTH   128
  70. #define INTERNET_MAX_PASSWORD_LENGTH    128
  71. #define INTERNET_MAX_PORT_NUMBER_LENGTH 5           // INTERNET_PORT is unsigned short
  72. #define INTERNET_MAX_PORT_NUMBER_VALUE  65535       // maximum unsigned short value
  73. #define INTERNET_MAX_PATH_LENGTH        2048
  74. #define INTERNET_MAX_PROTOCOL_NAME      "gopher"    // longest protocol name
  75. #define INTERNET_MAX_URL_LENGTH         ((sizeof(INTERNET_MAX_PROTOCOL_NAME) - 1) \
  76.                                         + sizeof("://") \
  77.                                         + INTERNET_MAX_PATH_LENGTH)
  78.  
  79. //
  80. // values returned by InternetQueryOption() with INTERNET_OPTION_KEEP_CONNECTION:
  81. //
  82.  
  83. #define INTERNET_KEEP_ALIVE_UNKNOWN     ((DWORD)-1)
  84. #define INTERNET_KEEP_ALIVE_ENABLED     1
  85. #define INTERNET_KEEP_ALIVE_DISABLED    0
  86.  
  87. //
  88. // flags returned by InternetQueryOption() with INTERNET_OPTION_REQUEST_FLAGS
  89. //
  90.  
  91. #define INTERNET_REQFLAG_FROM_CACHE     0x00000001
  92. #define INTERNET_REQFLAG_ASYNC          0x00000002
  93.  
  94. //
  95. // flags common to open functions (not InternetOpen()):
  96. //
  97.  
  98. #define INTERNET_FLAG_RELOAD            0x80000000  // retrieve the original item
  99.  
  100. //
  101. // flags for InternetOpenUrl():
  102. //
  103.  
  104. #define INTERNET_FLAG_RAW_DATA          0x40000000  // receive the item as raw data
  105. #define INTERNET_FLAG_EXISTING_CONNECT  0x20000000  // do not create new connection object
  106.  
  107. //
  108. // flags for InternetOpen():
  109. //
  110.  
  111. #define INTERNET_FLAG_ASYNC             0x10000000  // this request is asynchronous (where supported)
  112.  
  113. //
  114. // protocol-specific flags:
  115. //
  116.  
  117. #define INTERNET_FLAG_PASSIVE           0x08000000  // used for FTP connections
  118.  
  119. //
  120. // additional cache flags
  121. //
  122.  
  123. #define INTERNET_FLAG_NO_CACHE_WRITE    0x04000000  // don't write this item to the cache
  124. #define INTERNET_FLAG_DONT_CACHE        INTERNET_FLAG_NO_CACHE_WRITE
  125.  
  126. #define INTERNET_FLAG_MAKE_PERSISTENT   0x02000000  // make this item persistent in cache
  127.  
  128. #define INTERNET_FLAG_OFFLINE           0x01000000  // use offline semantics
  129.  
  130. //
  131. // additional flags
  132. //
  133.  
  134. #define INTERNET_FLAG_SECURE            0x00800000  // use PCT/SSL if applicable (HTTP)
  135.  
  136. #define INTERNET_FLAG_KEEP_CONNECTION   0x00400000  // use keep-alive semantics
  137.  
  138. #define INTERNET_FLAG_NO_AUTO_REDIRECT  0x00200000  // don't handle redirections automatically
  139.  
  140. #define INTERNET_FLAG_READ_PREFETCH     0x00100000  // do background read prefetch
  141.  
  142. #define INTERNET_FLAG_NO_COOKIES        0x00080000  // no automatic cookie handling
  143.  
  144. #define INTERNET_FLAG_NO_AUTH           0x00040000  // no automatic authentication handling
  145.  
  146. //
  147. // Security Ignore Flags, Allow HttpOpenRequest to overide
  148. //  Secure Channel (SSL/PCT) failures of the following types.
  149. //
  150.  
  151. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   0x00008000 // ex: https:// to http://
  152.  
  153. #define INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  0x00004000 // ex: http:// to https://
  154.  
  155. #define INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  0x00002000 // expired X509 Cert.
  156.  
  157. #define INTERNET_FLAG_IGNORE_CERT_CN_INVALID    0x00001000 // bad common name in X509 Cert.
  158.  
  159. //more caching flags
  160. #define INTERNET_FLAG_MUST_CACHE_REQUEST        0x00000010 // fails if unable to cache request
  161. #define INTERNET_FLAG_RESYNCHRONIZE             0x00000800 // asking wininet to update an item if it is newer
  162. #define INTERNET_FLAG_HYPERLINK                 0x00000400 // asking wininet to
  163.                                                            //do hyperlinking semantic which works right for scripts
  164.  
  165. //
  166. // flags for FTP
  167. //
  168.  
  169. #define INTERNET_FLAG_TRANSFER_ASCII    FTP_TRANSFER_TYPE_ASCII
  170. #define INTERNET_FLAG_TRANSFER_BINARY   FTP_TRANSFER_TYPE_BINARY
  171.  
  172. //
  173. // flags field masks
  174. //
  175.  
  176. #define SECURITY_INTERNET_MASK  (INTERNET_FLAG_IGNORE_CERT_CN_INVALID    |  \
  177.                                  INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  |  \
  178.                                  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  |  \
  179.                                  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   )
  180.  
  181. #define SECURITY_SET_MASK       SECURITY_INTERNET_MASK
  182.  
  183. #define INTERNET_FLAGS_MASK     (INTERNET_FLAG_RELOAD               \
  184.                                 | INTERNET_FLAG_RAW_DATA            \
  185.                                 | INTERNET_FLAG_EXISTING_CONNECT    \
  186.                                 | INTERNET_FLAG_ASYNC               \
  187.                                 | INTERNET_FLAG_PASSIVE             \
  188.                                 | INTERNET_FLAG_NO_CACHE_WRITE      \
  189.                                 | INTERNET_FLAG_MAKE_PERSISTENT     \
  190.                                 | INTERNET_FLAG_OFFLINE             \
  191.                                 | INTERNET_FLAG_SECURE              \
  192.                                 | INTERNET_FLAG_KEEP_CONNECTION     \
  193.                                 | INTERNET_FLAG_NO_AUTO_REDIRECT    \
  194.                                 | INTERNET_FLAG_READ_PREFETCH       \
  195.                                 | INTERNET_FLAG_NO_COOKIES          \
  196.                                 | INTERNET_FLAG_NO_AUTH             \
  197.                                 | SECURITY_INTERNET_MASK            \
  198.                                 | INTERNET_FLAG_TRANSFER_ASCII      \
  199.                                 | INTERNET_FLAG_TRANSFER_BINARY     \
  200.                                 | INTERNET_FLAG_RESYNCHRONIZE       \
  201.                                 | INTERNET_FLAG_MUST_CACHE_REQUEST  \
  202.                                 | INTERNET_FLAG_HYPERLINK           \
  203.                                 )
  204.  
  205. #define INTERNET_OPTIONS_MASK   (~INTERNET_FLAGS_MASK)
  206.  
  207. //
  208. // INTERNET_NO_CALLBACK - if this value is presented as the dwContext parameter
  209. // then no call-backs will be made for that API
  210. //
  211.  
  212. #define INTERNET_NO_CALLBACK            0
  213.  
  214. //
  215. // structures/types
  216. //
  217.  
  218. //
  219. // INTERNET_SCHEME - enumerated URL scheme type
  220. //
  221.  
  222. typedef enum {
  223.     INTERNET_SCHEME_PARTIAL = -2,
  224.     INTERNET_SCHEME_UNKNOWN = -1,
  225.     INTERNET_SCHEME_DEFAULT = 0,
  226.     INTERNET_SCHEME_FTP,
  227.     INTERNET_SCHEME_GOPHER,
  228.     INTERNET_SCHEME_HTTP,
  229.     INTERNET_SCHEME_HTTPS,
  230.     INTERNET_SCHEME_FILE,
  231.     INTERNET_SCHEME_NEWS,
  232.     INTERNET_SCHEME_MAILTO,
  233.     INTERNET_SCHEME_SOCKS,
  234.     INTERNET_SCHEME_FIRST = INTERNET_SCHEME_FTP,
  235.     INTERNET_SCHEME_LAST = INTERNET_SCHEME_SOCKS
  236. } INTERNET_SCHEME, * LPINTERNET_SCHEME;
  237.  
  238. //
  239. // INTERNET_ASYNC_RESULT - this structure is returned to the application via
  240. // the callback with INTERNET_STATUS_REQUEST_COMPLETE. It is not sufficient to
  241. // just return the result of the async operation. If the API failed then the
  242. // app cannot call GetLastError() because the thread context will be incorrect.
  243. // Both the value returned by the async API and any resultant error code are
  244. // made available. The app need not check dwError if dwResult indicates that
  245. // the API succeeded (in this case dwError will be ERROR_SUCCESS)
  246. //
  247.  
  248. typedef struct {
  249.  
  250.     //
  251.     // dwResult - the HINTERNET, DWORD or BOOL return code from an async API
  252.     //
  253.  
  254.     DWORD dwResult;
  255.  
  256.     //
  257.     // dwError - the error code if the API failed
  258.     //
  259.  
  260.     DWORD dwError;
  261. } INTERNET_ASYNC_RESULT, * LPINTERNET_ASYNC_RESULT;
  262.  
  263. //
  264. // INTERNET_PREFETCH_STATUS -
  265. //
  266.  
  267. typedef struct {
  268.  
  269.     //
  270.     // dwStatus - status of download. See INTERNET_PREFETCH_ flags
  271.     //
  272.  
  273.     DWORD dwStatus;
  274.  
  275.     //
  276.     // dwSize - size of file downloaded so far
  277.     //
  278.  
  279.     DWORD dwSize;
  280. } INTERNET_PREFETCH_STATUS, * LPINTERNET_PREFETCH_STATUS;
  281.  
  282. //
  283. // INTERNET_PREFETCH_STATUS - dwStatus values
  284. //
  285.  
  286. #define INTERNET_PREFETCH_PROGRESS  0
  287. #define INTERNET_PREFETCH_COMPLETE  1
  288. #define INTERNET_PREFETCH_ABORTED   2
  289.  
  290. //
  291. // INTERNET_PROXY_INFO - structure supplied with INTERNET_OPTION_PROXY to get/
  292. // set proxy information on a InternetOpen() handle
  293. //
  294.  
  295. typedef struct {
  296.  
  297.     //
  298.     // dwAccessType - INTERNET_OPEN_TYPE_DIRECT, INTERNET_OPEN_TYPE_PROXY, or
  299.     // INTERNET_OPEN_TYPE_PRECONFIG (set only)
  300.     //
  301.  
  302.     DWORD dwAccessType;
  303.  
  304.     //
  305.     // lpszProxy - proxy server list
  306.     //
  307.  
  308.     LPCTSTR lpszProxy;
  309.  
  310.     //
  311.     // lpszProxyBypass - proxy bypass list
  312.     //
  313.  
  314.     LPCTSTR lpszProxyBypass;
  315. } INTERNET_PROXY_INFO, * LPINTERNET_PROXY_INFO;
  316.  
  317. //
  318. // INTERNET_VERSION_INFO - version information returned via
  319. // InternetQueryOption(..., INTERNET_OPTION_VERSION, ...)
  320. //
  321.  
  322. typedef struct {
  323.     DWORD dwMajorVersion;
  324.     DWORD dwMinorVersion;
  325. } INTERNET_VERSION_INFO, * LPINTERNET_VERSION_INFO;
  326.  
  327. //
  328. // URL_COMPONENTS - the constituent parts of an URL. Used in InternetCrackUrl()
  329. // and InternetCreateUrl()
  330. //
  331. // For InternetCrackUrl(), if a pointer field and its corresponding length field
  332. // are both 0 then that component is not returned; If the pointer field is NULL
  333. // but the length field is not zero, then both the pointer and length fields are
  334. // returned; if both pointer and corresponding length fields are non-zero then
  335. // the pointer field points to a buffer where the component is copied. The
  336. // component may be un-escaped, depending on dwFlags
  337. //
  338. // For InternetCreateUrl(), the pointer fields should be NULL if the component
  339. // is not required. If the corresponding length field is zero then the pointer
  340. // field is the address of a zero-terminated string. If the length field is not
  341. // zero then it is the string length of the corresponding pointer field
  342. //
  343.  
  344. typedef struct {
  345.     DWORD dwStructSize;         // size of this structure. Used in version check
  346.     LPTSTR lpszScheme;          // pointer to scheme name
  347.     DWORD dwSchemeLength;       // length of scheme name
  348.     INTERNET_SCHEME nScheme;    // enumerated scheme type (if known)
  349.     LPTSTR lpszHostName;        // pointer to host name
  350.     DWORD dwHostNameLength;     // length of host name
  351.     INTERNET_PORT nPort;        // converted port number
  352.     LPTSTR lpszUserName;        // pointer to user name
  353.     DWORD dwUserNameLength;     // length of user name
  354.     LPTSTR lpszPassword;        // pointer to password
  355.     DWORD dwPasswordLength;     // length of password
  356.     LPTSTR lpszUrlPath;         // pointer to URL-path
  357.     DWORD dwUrlPathLength;      // length of URL-path
  358.     LPTSTR lpszExtraInfo;       // pointer to extra information (e.g. ?foo or #foo)
  359.     DWORD dwExtraInfoLength;    // length of extra information
  360. } URL_COMPONENTS, * LPURL_COMPONENTS;
  361.  
  362. //
  363. // INTERNET_CERTIFICATE_INFO lpBuffer - contains the certificate returned from
  364. // the server
  365. //
  366.  
  367. typedef struct {
  368.  
  369.     //
  370.     // ftExpiry - date the certificate expires.
  371.     //
  372.  
  373.     FILETIME ftExpiry;
  374.  
  375.     //
  376.     // ftStart - date the certificate becomes valid.
  377.     //
  378.  
  379.     FILETIME ftStart;
  380.  
  381.     //
  382.     // lpszSubjectInfo - the name of organization, site, and server
  383.     //   the cert. was issued for.
  384.     //
  385.  
  386.     LPTSTR lpszSubjectInfo;
  387.  
  388.     //
  389.     // lpszIssuerInfo - the name of orgainzation, site, and server
  390.     //   the cert was issues by.
  391.     //
  392.  
  393.     LPTSTR lpszIssuerInfo;
  394.  
  395.     //
  396.     // lpszProtocolName - the name of the protocol used to provide the secure
  397.     //   connection.
  398.     //
  399.  
  400.     LPTSTR lpszProtocolName;
  401.  
  402.     //
  403.     // lpszSignatureAlgName - the name of the algorithm used for signing
  404.     //  the certificate.
  405.     //
  406.  
  407.     LPTSTR lpszSignatureAlgName;
  408.  
  409.     //
  410.     // lpszEncryptionAlgName - the name of the algorithm used for
  411.     //  doing encryption over the secure channel (SSL/PCT) connection.
  412.     //
  413.  
  414.     LPTSTR lpszEncryptionAlgName;
  415.  
  416.     //
  417.     // dwKeySize - size of the key.
  418.     //
  419.  
  420.     DWORD dwKeySize;
  421.  
  422. } INTERNET_CERTIFICATE_INFO, * LPINTERNET_CERTIFICATE_INFO;
  423.  
  424. //
  425. // prototypes
  426. //
  427.  
  428. INTERNETAPI
  429. BOOL
  430. WINAPI
  431. InternetTimeFromSystemTime(
  432.     IN  CONST SYSTEMTIME *pst,  // input GMT time
  433.     IN  DWORD dwRFC,            // RFC format
  434.     OUT LPSTR lpszTime,         // output string buffer
  435.     IN  DWORD cbTime            // output buffer size
  436.     );
  437.  
  438. //
  439. // constants for InternetTimeFromSystemTime
  440. //
  441.  
  442. #define INTERNET_RFC1123_FORMAT     0
  443. #define INTERNET_RFC1123_BUFSIZE   30
  444.  
  445. INTERNETAPI
  446. BOOL
  447. WINAPI
  448. InternetTimeToSystemTime(
  449.     IN  LPCSTR lpszTime,         // NULL terminated string
  450.     OUT SYSTEMTIME *pst,         // output in GMT time
  451.     IN  DWORD dwReserved
  452.     );
  453.  
  454. INTERNETAPI
  455. BOOL
  456. WINAPI
  457. InternetDebugGetLocalTime(
  458.     OUT SYSTEMTIME * pstLocalTime,
  459.     OUT DWORD      * pdwReserved
  460. );
  461.  
  462. INTERNETAPI
  463. BOOL
  464. WINAPI
  465. InternetCrackUrlA(
  466.     IN LPCSTR lpszUrl,
  467.     IN DWORD dwUrlLength,
  468.     IN DWORD dwFlags,
  469.     IN OUT LPURL_COMPONENTS lpUrlComponents
  470.     );
  471. INTERNETAPI
  472. BOOL
  473. WINAPI
  474. InternetCrackUrlW(
  475.     IN LPCWSTR lpszUrl,
  476.     IN DWORD dwUrlLength,
  477.     IN DWORD dwFlags,
  478.     IN OUT LPURL_COMPONENTS lpUrlComponents
  479.     );
  480. #ifdef UNICODE
  481. #define InternetCrackUrl  InternetCrackUrlW
  482. #else
  483. #define InternetCrackUrl  InternetCrackUrlA
  484. #endif // !UNICODE
  485.  
  486. INTERNETAPI
  487. BOOL
  488. WINAPI
  489. InternetCreateUrlA(
  490.     IN LPURL_COMPONENTS lpUrlComponents,
  491.     IN DWORD dwFlags,
  492.     OUT LPSTR lpszUrl,
  493.     IN OUT LPDWORD lpdwUrlLength
  494.     );
  495. INTERNETAPI
  496. BOOL
  497. WINAPI
  498. InternetCreateUrlW(
  499.     IN LPURL_COMPONENTS lpUrlComponents,
  500.     IN DWORD dwFlags,
  501.     OUT LPWSTR lpszUrl,
  502.     IN OUT LPDWORD lpdwUrlLength
  503.     );
  504. #ifdef UNICODE
  505. #define InternetCreateUrl  InternetCreateUrlW
  506. #else
  507. #define InternetCreateUrl  InternetCreateUrlA
  508. #endif // !UNICODE
  509.  
  510. INTERNETAPI
  511. BOOL
  512. WINAPI
  513. InternetCanonicalizeUrlA(
  514.     IN LPCSTR lpszUrl,
  515.     OUT LPSTR lpszBuffer,
  516.     IN OUT LPDWORD lpdwBufferLength,
  517.     IN DWORD dwFlags
  518.     );
  519. INTERNETAPI
  520. BOOL
  521. WINAPI
  522. InternetCanonicalizeUrlW(
  523.     IN LPCWSTR lpszUrl,
  524.     OUT LPWSTR lpszBuffer,
  525.     IN OUT LPDWORD lpdwBufferLength,
  526.     IN DWORD dwFlags
  527.     );
  528. #ifdef UNICODE
  529. #define InternetCanonicalizeUrl  InternetCanonicalizeUrlW
  530. #else
  531. #define InternetCanonicalizeUrl  InternetCanonicalizeUrlA
  532. #endif // !UNICODE
  533.  
  534. INTERNETAPI
  535. BOOL
  536. WINAPI
  537. InternetCombineUrlA(
  538.     IN LPCSTR lpszBaseUrl,
  539.     IN LPCSTR lpszRelativeUrl,
  540.     OUT LPSTR lpszBuffer,
  541.     IN OUT LPDWORD lpdwBufferLength,
  542.     IN DWORD dwFlags
  543.     );
  544. INTERNETAPI
  545. BOOL
  546. WINAPI
  547. InternetCombineUrlW(
  548.     IN LPCWSTR lpszBaseUrl,
  549.     IN LPCWSTR lpszRelativeUrl,
  550.     OUT LPWSTR lpszBuffer,
  551.     IN OUT LPDWORD lpdwBufferLength,
  552.     IN DWORD dwFlags
  553.     );
  554. #ifdef UNICODE
  555. #define InternetCombineUrl  InternetCombineUrlW
  556. #else
  557. #define InternetCombineUrl  InternetCombineUrlA
  558. #endif // !UNICODE
  559.  
  560. //
  561. // flags for InternetCrackUrl() and InternetCreateUrl()
  562. //
  563.  
  564. #define ICU_ESCAPE      0x80000000  // (un)escape URL characters
  565. #define ICU_USERNAME    0x40000000  // use internal username & password
  566.  
  567. //
  568. // flags for InternetCanonicalizeUrl() and InternetCombineUrl()
  569. //
  570.  
  571. #define ICU_NO_ENCODE   0x20000000  // Don't convert unsafe characters to escape sequence
  572. #define ICU_DECODE      0x10000000  // Convert %XX escape sequences to characters
  573. #define ICU_NO_META     0x08000000  // Don't convert .. etc. meta path sequences
  574. #define ICU_ENCODE_SPACES_ONLY 0x04000000  // Encode spaces only
  575. #define ICU_BROWSER_MODE 0x02000000 // Special encode/decode rules for browser
  576.  
  577. INTERNETAPI
  578. HINTERNET
  579. WINAPI
  580. InternetOpenA(
  581.     IN LPCSTR lpszAgent,
  582.     IN DWORD dwAccessType,
  583.     IN LPCSTR lpszProxy OPTIONAL,
  584.     IN LPCSTR lpszProxyBypass OPTIONAL,
  585.     IN DWORD dwFlags
  586.     );
  587. INTERNETAPI
  588. HINTERNET
  589. WINAPI
  590. InternetOpenW(
  591.     IN LPCWSTR lpszAgent,
  592.     IN DWORD dwAccessType,
  593.     IN LPCWSTR lpszProxy OPTIONAL,
  594.     IN LPCWSTR lpszProxyBypass OPTIONAL,
  595.     IN DWORD dwFlags
  596.     );
  597. #ifdef UNICODE
  598. #define InternetOpen  InternetOpenW
  599. #else
  600. #define InternetOpen  InternetOpenA
  601. #endif // !UNICODE
  602.  
  603. //
  604. // access types for InternetOpen()
  605. //
  606.  
  607. #define INTERNET_OPEN_TYPE_PRECONFIG    0   // use registry configuration
  608. #define INTERNET_OPEN_TYPE_DIRECT       1   // direct to net
  609. #define INTERNET_OPEN_TYPE_PROXY        3   // via named proxy
  610.  
  611. #define PRE_CONFIG_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PRECONFIG
  612. #define LOCAL_INTERNET_ACCESS       INTERNET_OPEN_TYPE_DIRECT
  613. #define GATEWAY_INTERNET_ACCESS     2   // Internet via gateway
  614. #define CERN_PROXY_INTERNET_ACCESS  INTERNET_OPEN_TYPE_PROXY
  615.  
  616. INTERNETAPI
  617. BOOL
  618. WINAPI
  619. InternetCloseHandle(
  620.     IN HINTERNET hInternet
  621.     );
  622.  
  623. INTERNETAPI
  624. HINTERNET
  625. WINAPI
  626. InternetConnectA(
  627.     IN HINTERNET hInternet,
  628.     IN LPCSTR lpszServerName,
  629.     IN INTERNET_PORT nServerPort,
  630.     IN LPCSTR lpszUserName OPTIONAL,
  631.     IN LPCSTR lpszPassword OPTIONAL,
  632.     IN DWORD dwService,
  633.     IN DWORD dwFlags,
  634.     IN DWORD dwContext
  635.     );
  636. INTERNETAPI
  637. HINTERNET
  638. WINAPI
  639. InternetConnectW(
  640.     IN HINTERNET hInternet,
  641.     IN LPCWSTR lpszServerName,
  642.     IN INTERNET_PORT nServerPort,
  643.     IN LPCWSTR lpszUserName OPTIONAL,
  644.     IN LPCWSTR lpszPassword OPTIONAL,
  645.     IN DWORD dwService,
  646.     IN DWORD dwFlags,
  647.     IN DWORD dwContext
  648.     );
  649. #ifdef UNICODE
  650. #define InternetConnect  InternetConnectW
  651. #else
  652. #define InternetConnect  InternetConnectA
  653. #endif // !UNICODE
  654.  
  655. //
  656. // service types for InternetConnect()
  657. //
  658.  
  659. #define INTERNET_SERVICE_FTP    1
  660. #define INTERNET_SERVICE_GOPHER 2
  661. #define INTERNET_SERVICE_HTTP   3
  662.  
  663. INTERNETAPI
  664. HINTERNET
  665. WINAPI
  666. InternetOpenUrlA(
  667.     IN HINTERNET hInternet,
  668.     IN LPCSTR lpszUrl,
  669.     IN LPCSTR lpszHeaders OPTIONAL,
  670.     IN DWORD dwHeadersLength,
  671.     IN DWORD dwFlags,
  672.     IN DWORD dwContext
  673.     );
  674. INTERNETAPI
  675. HINTERNET
  676. WINAPI
  677. InternetOpenUrlW(
  678.     IN HINTERNET hInternet,
  679.     IN LPCWSTR lpszUrl,
  680.     IN LPCWSTR lpszHeaders OPTIONAL,
  681.     IN DWORD dwHeadersLength,
  682.     IN DWORD dwFlags,
  683.     IN DWORD dwContext
  684.     );
  685. #ifdef UNICODE
  686. #define InternetOpenUrl  InternetOpenUrlW
  687. #else
  688. #define InternetOpenUrl  InternetOpenUrlA
  689. #endif // !UNICODE
  690.  
  691. INTERNETAPI
  692. BOOL
  693. WINAPI
  694. InternetReadFile(
  695.     IN HINTERNET hFile,
  696.     IN LPVOID lpBuffer,
  697.     IN DWORD dwNumberOfBytesToRead,
  698.     OUT LPDWORD lpdwNumberOfBytesRead
  699.     );
  700.  
  701. INTERNETAPI
  702. DWORD
  703. WINAPI
  704. InternetSetFilePointer(
  705.     IN HINTERNET hFile,
  706.     IN LONG  lDistanceToMove,
  707.     IN PVOID pReserved,
  708.     IN DWORD dwMoveMethod,
  709.     IN DWORD dwContext
  710.     );
  711.  
  712. INTERNETAPI
  713. BOOL
  714. WINAPI
  715. InternetWriteFile(
  716.     IN HINTERNET hFile,
  717.     IN LPCVOID lpBuffer,
  718.     IN DWORD dwNumberOfBytesToWrite,
  719.     OUT LPDWORD lpdwNumberOfBytesWritten
  720.     );
  721.  
  722. INTERNETAPI
  723. BOOL
  724. WINAPI
  725. InternetQueryDataAvailable(
  726.     IN HINTERNET hFile,
  727.     OUT LPDWORD lpdwNumberOfBytesAvailable,
  728.     IN DWORD dwFlags,
  729.     IN DWORD dwContext
  730.     );
  731.  
  732. INTERNETAPI
  733. BOOL
  734. WINAPI
  735. InternetFindNextFileA(
  736.     IN HINTERNET hFind,
  737.     OUT LPVOID lpvFindData
  738.     );
  739. INTERNETAPI
  740. BOOL
  741. WINAPI
  742. InternetFindNextFileW(
  743.     IN HINTERNET hFind,
  744.     OUT LPVOID lpvFindData
  745.     );
  746. #ifdef UNICODE
  747. #define InternetFindNextFile  InternetFindNextFileW
  748. #else
  749. #define InternetFindNextFile  InternetFindNextFileA
  750. #endif // !UNICODE
  751.  
  752. INTERNETAPI
  753. BOOL
  754. WINAPI
  755. InternetQueryOptionA(
  756.     IN HINTERNET hInternet OPTIONAL,
  757.     IN DWORD dwOption,
  758.     OUT LPVOID lpBuffer OPTIONAL,
  759.     IN OUT LPDWORD lpdwBufferLength
  760.     );
  761. INTERNETAPI
  762. BOOL
  763. WINAPI
  764. InternetQueryOptionW(
  765.     IN HINTERNET hInternet OPTIONAL,
  766.     IN DWORD dwOption,
  767.     OUT LPVOID lpBuffer OPTIONAL,
  768.     IN OUT LPDWORD lpdwBufferLength
  769.     );
  770. #ifdef UNICODE
  771. #define InternetQueryOption  InternetQueryOptionW
  772. #else
  773. #define InternetQueryOption  InternetQueryOptionA
  774. #endif // !UNICODE
  775.  
  776. INTERNETAPI
  777. BOOL
  778. WINAPI
  779. InternetSetOptionA(
  780.     IN HINTERNET hInternet OPTIONAL,
  781.     IN DWORD dwOption,
  782.     IN LPVOID lpBuffer,
  783.     IN DWORD dwBufferLength
  784.     );
  785. INTERNETAPI
  786. BOOL
  787. WINAPI
  788. InternetSetOptionW(
  789.     IN HINTERNET hInternet OPTIONAL,
  790.     IN DWORD dwOption,
  791.     IN LPVOID lpBuffer,
  792.     IN DWORD dwBufferLength
  793.     );
  794. #ifdef UNICODE
  795. #define InternetSetOption  InternetSetOptionW
  796. #else
  797. #define InternetSetOption  InternetSetOptionA
  798. #endif // !UNICODE
  799.  
  800. INTERNETAPI
  801. BOOL
  802. WINAPI
  803. InternetSetOptionExA(
  804.     IN HINTERNET hInternet OPTIONAL,
  805.     IN DWORD dwOption,
  806.     IN LPVOID lpBuffer,
  807.     IN DWORD dwBufferLength,
  808.     IN DWORD dwFlags
  809.     );
  810. INTERNETAPI
  811. BOOL
  812. WINAPI
  813. InternetSetOptionExW(
  814.     IN HINTERNET hInternet OPTIONAL,
  815.     IN DWORD dwOption,
  816.     IN LPVOID lpBuffer,
  817.     IN DWORD dwBufferLength,
  818.     IN DWORD dwFlags
  819.     );
  820. #ifdef UNICODE
  821. #define InternetSetOptionEx  InternetSetOptionExW
  822. #else
  823. #define InternetSetOptionEx  InternetSetOptionExA
  824. #endif // !UNICODE
  825.  
  826. //
  827. // flags for InternetSetOptionEx()
  828. //
  829.  
  830. #define ISO_GLOBAL      0x00000001  // modify option globally
  831. #define ISO_REGISTRY    0x00000002  // write option to registry (where applicable)
  832.  
  833. #define ISO_VALID_FLAGS (ISO_GLOBAL | ISO_REGISTRY)
  834.  
  835. //
  836. // options manifests for Internet{Query|Set}Option
  837. //
  838.  
  839. #define INTERNET_OPTION_CALLBACK                1
  840. #define INTERNET_OPTION_CONNECT_TIMEOUT         2
  841. #define INTERNET_OPTION_CONNECT_RETRIES         3
  842. #define INTERNET_OPTION_CONNECT_BACKOFF         4
  843. #define INTERNET_OPTION_SEND_TIMEOUT            5
  844. #define INTERNET_OPTION_CONTROL_SEND_TIMEOUT    INTERNET_OPTION_SEND_TIMEOUT
  845. #define INTERNET_OPTION_RECEIVE_TIMEOUT         6
  846. #define INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT INTERNET_OPTION_RECEIVE_TIMEOUT
  847. #define INTERNET_OPTION_DATA_SEND_TIMEOUT       7
  848. #define INTERNET_OPTION_DATA_RECEIVE_TIMEOUT    8
  849. #define INTERNET_OPTION_HANDLE_TYPE             9
  850. #define INTERNET_OPTION_CONTEXT_VALUE           10
  851.  
  852. #define INTERNET_OPTION_READ_BUFFER_SIZE        12
  853. #define INTERNET_OPTION_WRITE_BUFFER_SIZE       13
  854.  
  855. #define INTERNET_OPTION_ASYNC_ID                15
  856. #define INTERNET_OPTION_ASYNC_PRIORITY          16
  857.  
  858. #define INTERNET_OPTION_PARENT_HANDLE           21
  859. #define INTERNET_OPTION_KEEP_CONNECTION         22
  860. #define INTERNET_OPTION_REQUEST_FLAGS           23
  861. #define INTERNET_OPTION_EXTENDED_ERROR          24
  862.  
  863. #define INTERNET_OPTION_OFFLINE_MODE            26
  864. #define INTERNET_OPTION_CACHE_STREAM_HANDLE     27
  865. #define INTERNET_OPTION_USERNAME                28
  866. #define INTERNET_OPTION_PASSWORD                29
  867. #define INTERNET_OPTION_ASYNC                   30
  868. #define INTERNET_OPTION_SECURITY_FLAGS          31
  869. #define INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT    32
  870. #define INTERNET_OPTION_DATAFILE_NAME           33
  871. #define INTERNET_OPTION_URL                     34
  872. #define INTERNET_OPTION_SECURITY_CERTIFICATE    35
  873. #define INTERNET_OPTION_SECURITY_KEY_BITNESS    36
  874. #define INTERNET_OPTION_REFRESH                 37
  875. #define INTERNET_OPTION_PROXY                   38
  876. #define INTERNET_OPTION_SETTINGS_CHANGED        39
  877. #define INTERNET_OPTION_VERSION                 40
  878.  
  879. #define INTERNET_FIRST_OPTION                   INTERNET_OPTION_CALLBACK
  880. #define INTERNET_LAST_OPTION                    INTERNET_OPTION_VERSION
  881.  
  882. //
  883. // values for INTERNET_OPTION_PRIORITY
  884. //
  885.  
  886. #define INTERNET_PRIORITY_FOREGROUND            1000
  887.  
  888. //
  889. // handle types
  890. //
  891.  
  892. #define INTERNET_HANDLE_TYPE_INTERNET           1
  893. #define INTERNET_HANDLE_TYPE_CONNECT_FTP        2
  894. #define INTERNET_HANDLE_TYPE_CONNECT_GOPHER     3
  895. #define INTERNET_HANDLE_TYPE_CONNECT_HTTP       4
  896. #define INTERNET_HANDLE_TYPE_FTP_FIND           5
  897. #define INTERNET_HANDLE_TYPE_FTP_FIND_HTML      6
  898. #define INTERNET_HANDLE_TYPE_FTP_FILE           7
  899. #define INTERNET_HANDLE_TYPE_FTP_FILE_HTML      8
  900. #define INTERNET_HANDLE_TYPE_GOPHER_FIND        9
  901. #define INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML   10
  902. #define INTERNET_HANDLE_TYPE_GOPHER_FILE        11
  903. #define INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML   12
  904. #define INTERNET_HANDLE_TYPE_HTTP_REQUEST       13
  905.  
  906. //
  907. // values for INTERNET_OPTION_SECURITY_FLAGS
  908. //
  909.  
  910. #define SECURITY_FLAG_SECURE                    0x00000001 // can query only
  911. #define SECURITY_FLAG_SSL                       0x00000002
  912. #define SECURITY_FLAG_SSL3                      0x00000004
  913. #define SECURITY_FLAG_PCT                       0x00000008
  914. #define SECURITY_FLAG_PCT4                      0x00000010
  915. #define SECURITY_FLAG_IETFSSL4                  0x00000020
  916.  
  917. #define SECURITY_FLAG_40BIT                     0x10000000
  918. #define SECURITY_FLAG_128BIT                    0x20000000
  919. #define SECURITY_FLAG_56BIT                     0x40000000
  920. #define SECURITY_FLAG_UNKNOWNBIT                0x80000000
  921. #define SECURITY_FLAG_NORMALBITNESS             SECURITY_FLAG_40BIT
  922.  
  923. #define SECURITY_FLAG_IGNORE_CERT_CN_INVALID    INTERNET_FLAG_IGNORE_CERT_CN_INVALID
  924. #define SECURITY_FLAG_IGNORE_CERT_DATE_INVALID  INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
  925. #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS  INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
  926. #define SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP   INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
  927.  
  928. INTERNETAPI
  929. BOOL
  930. WINAPI
  931. InternetGetLastResponseInfoA(
  932.     OUT LPDWORD lpdwError,
  933.     OUT LPSTR lpszBuffer OPTIONAL,
  934.     IN OUT LPDWORD lpdwBufferLength
  935.     );
  936. INTERNETAPI
  937. BOOL
  938. WINAPI
  939. InternetGetLastResponseInfoW(
  940.     OUT LPDWORD lpdwError,
  941.     OUT LPWSTR lpszBuffer OPTIONAL,
  942.     IN OUT LPDWORD lpdwBufferLength
  943.     );
  944. #ifdef UNICODE
  945. #define InternetGetLastResponseInfo  InternetGetLastResponseInfoW
  946. #else
  947. #define InternetGetLastResponseInfo  InternetGetLastResponseInfoA
  948. #endif // !UNICODE
  949.  
  950. //
  951. // callback function for InternetSetStatusCallback
  952. //
  953.  
  954. typedef
  955. VOID
  956. (CALLBACK * INTERNET_STATUS_CALLBACK)(
  957.     IN HINTERNET hInternet,
  958.     IN DWORD dwContext,
  959.     IN DWORD dwInternetStatus,
  960.     IN LPVOID lpvStatusInformation OPTIONAL,
  961.     IN DWORD dwStatusInformationLength
  962.     );
  963.  
  964. typedef INTERNET_STATUS_CALLBACK * LPINTERNET_STATUS_CALLBACK;
  965.  
  966. INTERNETAPI
  967. INTERNET_STATUS_CALLBACK
  968. WINAPI
  969. InternetSetStatusCallback(
  970.     IN HINTERNET hInternet,
  971.     IN INTERNET_STATUS_CALLBACK lpfnInternetCallback
  972.     );
  973.  
  974. //
  975. // status manifests for Internet status callback
  976. //
  977.  
  978. #define INTERNET_STATUS_RESOLVING_NAME          10
  979. #define INTERNET_STATUS_NAME_RESOLVED           11
  980. #define INTERNET_STATUS_CONNECTING_TO_SERVER    20
  981. #define INTERNET_STATUS_CONNECTED_TO_SERVER     21
  982. #define INTERNET_STATUS_SENDING_REQUEST         30
  983. #define INTERNET_STATUS_REQUEST_SENT            31
  984. #define INTERNET_STATUS_RECEIVING_RESPONSE      40
  985. #define INTERNET_STATUS_RESPONSE_RECEIVED       41
  986. #define INTERNET_STATUS_CTL_RESPONSE_RECEIVED   42
  987. #define INTERNET_STATUS_PREFETCH                43
  988. #define INTERNET_STATUS_CLOSING_CONNECTION      50
  989. #define INTERNET_STATUS_CONNECTION_CLOSED       51
  990. #define INTERNET_STATUS_HANDLE_CREATED          60
  991. #define INTERNET_STATUS_HANDLE_CLOSING          70
  992. #define INTERNET_STATUS_REQUEST_COMPLETE        100
  993. #define INTERNET_STATUS_REDIRECT                110
  994.  
  995. //
  996. // if the following value is returned by InternetSetStatusCallback, then
  997. // probably an invalid (non-code) address was supplied for the callback
  998. //
  999.  
  1000. #define INTERNET_INVALID_STATUS_CALLBACK        ((INTERNET_STATUS_CALLBACK)(-1L))
  1001.  
  1002. //
  1003. // FTP
  1004. //
  1005.  
  1006. //
  1007. // manifests
  1008. //
  1009.  
  1010. #define FTP_TRANSFER_TYPE_UNKNOWN   0x00000000
  1011. #define FTP_TRANSFER_TYPE_ASCII     0x00000001
  1012. #define FTP_TRANSFER_TYPE_BINARY    0x00000002
  1013.  
  1014. #define FTP_TRANSFER_TYPE_MASK      (FTP_TRANSFER_TYPE_ASCII | FTP_TRANSFER_TYPE_BINARY)
  1015.  
  1016. //
  1017. // prototypes
  1018. //
  1019.  
  1020. INTERNETAPI
  1021. HINTERNET
  1022. WINAPI
  1023. FtpFindFirstFileA(
  1024.     IN HINTERNET hConnect,
  1025.     IN LPCSTR lpszSearchFile OPTIONAL,
  1026.     OUT LPWIN32_FIND_DATA lpFindFileData OPTIONAL,
  1027.     IN DWORD dwFlags,
  1028.     IN DWORD dwContext
  1029.     );
  1030. INTERNETAPI
  1031. HINTERNET
  1032. WINAPI
  1033. FtpFindFirstFileW(
  1034.     IN HINTERNET hConnect,
  1035.     IN LPCWSTR lpszSearchFile OPTIONAL,
  1036.     OUT LPWIN32_FIND_DATA lpFindFileData OPTIONAL,
  1037.     IN DWORD dwFlags,
  1038.     IN DWORD dwContext
  1039.     );
  1040. #ifdef UNICODE
  1041. #define FtpFindFirstFile  FtpFindFirstFileW
  1042. #else
  1043. #define FtpFindFirstFile  FtpFindFirstFileA
  1044. #endif // !UNICODE
  1045.  
  1046. INTERNETAPI
  1047. BOOL
  1048. WINAPI
  1049. FtpGetFileA(
  1050.     IN HINTERNET hConnect,
  1051.     IN LPCSTR lpszRemoteFile,
  1052.     IN LPCSTR lpszNewFile,
  1053.     IN BOOL fFailIfExists,
  1054.     IN DWORD dwFlagsAndAttributes,
  1055.     IN DWORD dwFlags,
  1056.     IN DWORD dwContext
  1057.     );
  1058. INTERNETAPI
  1059. BOOL
  1060. WINAPI
  1061. FtpGetFileW(
  1062.     IN HINTERNET hConnect,
  1063.     IN LPCWSTR lpszRemoteFile,
  1064.     IN LPCWSTR lpszNewFile,
  1065.     IN BOOL fFailIfExists,
  1066.     IN DWORD dwFlagsAndAttributes,
  1067.     IN DWORD dwFlags,
  1068.     IN DWORD dwContext
  1069.     );
  1070. #ifdef UNICODE
  1071. #define FtpGetFile  FtpGetFileW
  1072. #else
  1073. #define FtpGetFile  FtpGetFileA
  1074. #endif // !UNICODE
  1075.  
  1076. INTERNETAPI
  1077. BOOL
  1078. WINAPI
  1079. FtpPutFileA(
  1080.     IN HINTERNET hConnect,
  1081.     IN LPCSTR lpszLocalFile,
  1082.     IN LPCSTR lpszNewRemoteFile,
  1083.     IN DWORD dwFlags,
  1084.     IN DWORD dwContext
  1085.     );
  1086. INTERNETAPI
  1087. BOOL
  1088. WINAPI
  1089. FtpPutFileW(
  1090.     IN HINTERNET hConnect,
  1091.     IN LPCWSTR lpszLocalFile,
  1092.     IN LPCWSTR lpszNewRemoteFile,
  1093.     IN DWORD dwFlags,
  1094.     IN DWORD dwContext
  1095.     );
  1096. #ifdef UNICODE
  1097. #define FtpPutFile  FtpPutFileW
  1098. #else
  1099. #define FtpPutFile  FtpPutFileA
  1100. #endif // !UNICODE
  1101.  
  1102. INTERNETAPI
  1103. BOOL
  1104. WINAPI
  1105. FtpDeleteFileA(
  1106.     IN HINTERNET hConnect,
  1107.     IN LPCSTR lpszFileName
  1108.     );
  1109. INTERNETAPI
  1110. BOOL
  1111. WINAPI
  1112. FtpDeleteFileW(
  1113.     IN HINTERNET hConnect,
  1114.     IN LPCWSTR lpszFileName
  1115.     );
  1116. #ifdef UNICODE
  1117. #define FtpDeleteFile  FtpDeleteFileW
  1118. #else
  1119. #define FtpDeleteFile  FtpDeleteFileA
  1120. #endif // !UNICODE
  1121.  
  1122. INTERNETAPI
  1123. BOOL
  1124. WINAPI
  1125. FtpRenameFileA(
  1126.     IN HINTERNET hConnect,
  1127.     IN LPCSTR lpszExisting,
  1128.     IN LPCSTR lpszNew
  1129.     );
  1130. INTERNETAPI
  1131. BOOL
  1132. WINAPI
  1133. FtpRenameFileW(
  1134.     IN HINTERNET hConnect,
  1135.     IN LPCWSTR lpszExisting,
  1136.     IN LPCWSTR lpszNew
  1137.     );
  1138. #ifdef UNICODE
  1139. #define FtpRenameFile  FtpRenameFileW
  1140. #else
  1141. #define FtpRenameFile  FtpRenameFileA
  1142. #endif // !UNICODE
  1143.  
  1144. INTERNETAPI
  1145. HINTERNET
  1146. WINAPI
  1147. FtpOpenFileA(
  1148.     IN HINTERNET hConnect,
  1149.     IN LPCSTR lpszFileName,
  1150.     IN DWORD dwAccess,
  1151.     IN DWORD dwFlags,
  1152.     IN DWORD dwContext
  1153.     );
  1154. INTERNETAPI
  1155. HINTERNET
  1156. WINAPI
  1157. FtpOpenFileW(
  1158.     IN HINTERNET hConnect,
  1159.     IN LPCWSTR lpszFileName,
  1160.     IN DWORD dwAccess,
  1161.     IN DWORD dwFlags,
  1162.     IN DWORD dwContext
  1163.     );
  1164. #ifdef UNICODE
  1165. #define FtpOpenFile  FtpOpenFileW
  1166. #else
  1167. #define FtpOpenFile  FtpOpenFileA
  1168. #endif // !UNICODE
  1169.  
  1170. INTERNETAPI
  1171. BOOL
  1172. WINAPI
  1173. FtpCreateDirectoryA(
  1174.     IN HINTERNET hConnect,
  1175.     IN LPCSTR lpszDirectory
  1176.     );
  1177. INTERNETAPI
  1178. BOOL
  1179. WINAPI
  1180. FtpCreateDirectoryW(
  1181.     IN HINTERNET hConnect,
  1182.     IN LPCWSTR lpszDirectory
  1183.     );
  1184. #ifdef UNICODE
  1185. #define FtpCreateDirectory  FtpCreateDirectoryW
  1186. #else
  1187. #define FtpCreateDirectory  FtpCreateDirectoryA
  1188. #endif // !UNICODE
  1189.  
  1190. INTERNETAPI
  1191. BOOL
  1192. WINAPI
  1193. FtpRemoveDirectoryA(
  1194.     IN HINTERNET hConnect,
  1195.     IN LPCSTR lpszDirectory
  1196.     );
  1197. INTERNETAPI
  1198. BOOL
  1199. WINAPI
  1200. FtpRemoveDirectoryW(
  1201.     IN HINTERNET hConnect,
  1202.     IN LPCWSTR lpszDirectory
  1203.     );
  1204. #ifdef UNICODE
  1205. #define FtpRemoveDirectory  FtpRemoveDirectoryW
  1206. #else
  1207. #define FtpRemoveDirectory  FtpRemoveDirectoryA
  1208. #endif // !UNICODE
  1209.  
  1210. INTERNETAPI
  1211. BOOL
  1212. WINAPI
  1213. FtpSetCurrentDirectoryA(
  1214.     IN HINTERNET hConnect,
  1215.     IN LPCSTR lpszDirectory
  1216.     );
  1217. INTERNETAPI
  1218. BOOL
  1219. WINAPI
  1220. FtpSetCurrentDirectoryW(
  1221.     IN HINTERNET hConnect,
  1222.     IN LPCWSTR lpszDirectory
  1223.     );
  1224. #ifdef UNICODE
  1225. #define FtpSetCurrentDirectory  FtpSetCurrentDirectoryW
  1226. #else
  1227. #define FtpSetCurrentDirectory  FtpSetCurrentDirectoryA
  1228. #endif // !UNICODE
  1229.  
  1230. INTERNETAPI
  1231. BOOL
  1232. WINAPI
  1233. FtpGetCurrentDirectoryA(
  1234.     IN HINTERNET hConnect,
  1235.     OUT LPSTR lpszCurrentDirectory,
  1236.     IN OUT LPDWORD lpdwCurrentDirectory
  1237.     );
  1238. INTERNETAPI
  1239. BOOL
  1240. WINAPI
  1241. FtpGetCurrentDirectoryW(
  1242.     IN HINTERNET hConnect,
  1243.     OUT LPWSTR lpszCurrentDirectory,
  1244.     IN OUT LPDWORD lpdwCurrentDirectory
  1245.     );
  1246. #ifdef UNICODE
  1247. #define FtpGetCurrentDirectory  FtpGetCurrentDirectoryW
  1248. #else
  1249. #define FtpGetCurrentDirectory  FtpGetCurrentDirectoryA
  1250. #endif // !UNICODE
  1251.  
  1252. INTERNETAPI
  1253. BOOL
  1254. WINAPI
  1255. FtpCommandA(
  1256.     IN HINTERNET hConnect,
  1257.     IN BOOL fExpectResponse,
  1258.     IN DWORD dwFlags,
  1259.     IN LPCSTR lpszCommand,
  1260.     IN DWORD dwContext
  1261.     );
  1262. INTERNETAPI
  1263. BOOL
  1264. WINAPI
  1265. FtpCommandW(
  1266.     IN HINTERNET hConnect,
  1267.     IN BOOL fExpectResponse,
  1268.     IN DWORD dwFlags,
  1269.     IN LPCWSTR lpszCommand,
  1270.     IN DWORD dwContext
  1271.     );
  1272. #ifdef UNICODE
  1273. #define FtpCommand  FtpCommandW
  1274. #else
  1275. #define FtpCommand  FtpCommandA
  1276. #endif // !UNICODE
  1277.  
  1278. //
  1279. // Gopher
  1280. //
  1281.  
  1282. //
  1283. // manifests
  1284. //
  1285.  
  1286. //
  1287. // string field lengths (in characters, not bytes)
  1288. //
  1289.  
  1290. #define MAX_GOPHER_DISPLAY_TEXT     128
  1291. #define MAX_GOPHER_SELECTOR_TEXT    256
  1292. #define MAX_GOPHER_HOST_NAME        INTERNET_MAX_HOST_NAME_LENGTH
  1293. #define MAX_GOPHER_LOCATOR_LENGTH   (1                                  \
  1294.                                     + MAX_GOPHER_DISPLAY_TEXT           \
  1295.                                     + 1                                 \
  1296.                                     + MAX_GOPHER_SELECTOR_TEXT          \
  1297.                                     + 1                                 \
  1298.                                     + MAX_GOPHER_HOST_NAME              \
  1299.                                     + 1                                 \
  1300.                                     + INTERNET_MAX_PORT_NUMBER_LENGTH   \
  1301.                                     + 1                                 \
  1302.                                     + 1                                 \
  1303.                                     + 2                                 \
  1304.                                     )
  1305.  
  1306. //
  1307. // structures/types
  1308. //
  1309.  
  1310. //
  1311. // GOPHER_FIND_DATA - returns the results of a GopherFindFirstFile()/
  1312. // InternetFindNextFile() request
  1313. //
  1314.  
  1315. typedef struct {
  1316.     CHAR   DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
  1317.     DWORD GopherType;   // GOPHER_TYPE_, if known
  1318.     DWORD SizeLow;
  1319.     DWORD SizeHigh;
  1320.     FILETIME LastModificationTime;
  1321.     CHAR   Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
  1322. } GOPHER_FIND_DATAA, * LPGOPHER_FIND_DATAA;
  1323. typedef struct {
  1324.     WCHAR  DisplayString[MAX_GOPHER_DISPLAY_TEXT + 1];
  1325.     DWORD GopherType;   // GOPHER_TYPE_, if known
  1326.     DWORD SizeLow;
  1327.     DWORD SizeHigh;
  1328.     FILETIME LastModificationTime;
  1329.     WCHAR  Locator[MAX_GOPHER_LOCATOR_LENGTH + 1];
  1330. } GOPHER_FIND_DATAW, * LPGOPHER_FIND_DATAW;
  1331. #ifdef UNICODE
  1332. typedef GOPHER_FIND_DATAW GOPHER_FIND_DATA;
  1333. typedef LPGOPHER_FIND_DATAW LPGOPHER_FIND_DATA;
  1334. #else
  1335. typedef GOPHER_FIND_DATAA GOPHER_FIND_DATA;
  1336. typedef LPGOPHER_FIND_DATAA LPGOPHER_FIND_DATA;
  1337. #endif // UNICODE
  1338.  
  1339. //
  1340. // manifests for GopherType
  1341. //
  1342.  
  1343. #define GOPHER_TYPE_TEXT_FILE       0x00000001
  1344. #define GOPHER_TYPE_DIRECTORY       0x00000002
  1345. #define GOPHER_TYPE_CSO             0x00000004
  1346. #define GOPHER_TYPE_ERROR           0x00000008
  1347. #define GOPHER_TYPE_MAC_BINHEX      0x00000010
  1348. #define GOPHER_TYPE_DOS_ARCHIVE     0x00000020
  1349. #define GOPHER_TYPE_UNIX_UUENCODED  0x00000040
  1350. #define GOPHER_TYPE_INDEX_SERVER    0x00000080
  1351. #define GOPHER_TYPE_TELNET          0x00000100
  1352. #define GOPHER_TYPE_BINARY          0x00000200
  1353. #define GOPHER_TYPE_REDUNDANT       0x00000400
  1354. #define GOPHER_TYPE_TN3270          0x00000800
  1355. #define GOPHER_TYPE_GIF             0x00001000
  1356. #define GOPHER_TYPE_IMAGE           0x00002000
  1357. #define GOPHER_TYPE_BITMAP          0x00004000
  1358. #define GOPHER_TYPE_MOVIE           0x00008000
  1359. #define GOPHER_TYPE_SOUND           0x00010000
  1360. #define GOPHER_TYPE_HTML            0x00020000
  1361. #define GOPHER_TYPE_PDF             0x00040000
  1362. #define GOPHER_TYPE_CALENDAR        0x00080000
  1363. #define GOPHER_TYPE_INLINE          0x00100000
  1364. #define GOPHER_TYPE_UNKNOWN         0x20000000
  1365. #define GOPHER_TYPE_ASK             0x40000000
  1366. #define GOPHER_TYPE_GOPHER_PLUS     0x80000000
  1367.  
  1368. //
  1369. // gopher type macros
  1370. //
  1371.  
  1372. #define IS_GOPHER_FILE(type)            (BOOL)(((type) & GOPHER_TYPE_FILE_MASK) ? TRUE : FALSE)
  1373. #define IS_GOPHER_DIRECTORY(type)       (BOOL)(((type) & GOPHER_TYPE_DIRECTORY) ? TRUE : FALSE)
  1374. #define IS_GOPHER_PHONE_SERVER(type)    (BOOL)(((type) & GOPHER_TYPE_CSO) ? TRUE : FALSE)
  1375. #define IS_GOPHER_ERROR(type)           (BOOL)(((type) & GOPHER_TYPE_ERROR) ? TRUE : FALSE)
  1376. #define IS_GOPHER_INDEX_SERVER(type)    (BOOL)(((type) & GOPHER_TYPE_INDEX_SERVER) ? TRUE : FALSE)
  1377. #define IS_GOPHER_TELNET_SESSION(type)  (BOOL)(((type) & GOPHER_TYPE_TELNET) ? TRUE : FALSE)
  1378. #define IS_GOPHER_BACKUP_SERVER(type)   (BOOL)(((type) & GOPHER_TYPE_REDUNDANT) ? TRUE : FALSE)
  1379. #define IS_GOPHER_TN3270_SESSION(type)  (BOOL)(((type) & GOPHER_TYPE_TN3270) ? TRUE : FALSE)
  1380. #define IS_GOPHER_ASK(type)             (BOOL)(((type) & GOPHER_TYPE_ASK) ? TRUE : FALSE)
  1381. #define IS_GOPHER_PLUS(type)            (BOOL)(((type) & GOPHER_TYPE_GOPHER_PLUS) ? TRUE : FALSE)
  1382.  
  1383. #define IS_GOPHER_TYPE_KNOWN(type)      (BOOL)(((type) & GOPHER_TYPE_UNKNOWN) ? FALSE : TRUE)
  1384.  
  1385. //
  1386. // GOPHER_TYPE_FILE_MASK - use this to determine if a locator identifies a
  1387. // (known) file type
  1388. //
  1389.  
  1390. #define GOPHER_TYPE_FILE_MASK       (GOPHER_TYPE_TEXT_FILE          \
  1391.                                     | GOPHER_TYPE_MAC_BINHEX        \
  1392.                                     | GOPHER_TYPE_DOS_ARCHIVE       \
  1393.                                     | GOPHER_TYPE_UNIX_UUENCODED    \
  1394.                                     | GOPHER_TYPE_BINARY            \
  1395.                                     | GOPHER_TYPE_GIF               \
  1396.                                     | GOPHER_TYPE_IMAGE             \
  1397.                                     | GOPHER_TYPE_BITMAP            \
  1398.                                     | GOPHER_TYPE_MOVIE             \
  1399.                                     | GOPHER_TYPE_SOUND             \
  1400.                                     | GOPHER_TYPE_HTML              \
  1401.                                     | GOPHER_TYPE_PDF               \
  1402.                                     | GOPHER_TYPE_CALENDAR          \
  1403.                                     | GOPHER_TYPE_INLINE            \
  1404.                                     )
  1405.  
  1406. //
  1407. // structured gopher attributes (as defined in gopher+ protocol document)
  1408. //
  1409.  
  1410. typedef struct {
  1411.     LPCTSTR Comment;
  1412.     LPCTSTR EmailAddress;
  1413. } GOPHER_ADMIN_ATTRIBUTE_TYPE, * LPGOPHER_ADMIN_ATTRIBUTE_TYPE;
  1414.  
  1415. typedef struct {
  1416.     FILETIME DateAndTime;
  1417. } GOPHER_MOD_DATE_ATTRIBUTE_TYPE, * LPGOPHER_MOD_DATE_ATTRIBUTE_TYPE;
  1418.  
  1419. typedef struct {
  1420.     DWORD Ttl;
  1421. } GOPHER_TTL_ATTRIBUTE_TYPE, * LPGOPHER_TTL_ATTRIBUTE_TYPE;
  1422.  
  1423. typedef struct {
  1424.     INT Score;
  1425. } GOPHER_SCORE_ATTRIBUTE_TYPE, * LPGOPHER_SCORE_ATTRIBUTE_TYPE;
  1426.  
  1427. typedef struct {
  1428.     INT LowerBound;
  1429.     INT UpperBound;
  1430. } GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE, * LPGOPHER_SCORE_RANGE_ATTRIBUTE_TYPE;
  1431.  
  1432. typedef struct {
  1433.     LPCTSTR Site;
  1434. } GOPHER_SITE_ATTRIBUTE_TYPE, * LPGOPHER_SITE_ATTRIBUTE_TYPE;
  1435.  
  1436. typedef struct {
  1437.     LPCTSTR Organization;
  1438. } GOPHER_ORGANIZATION_ATTRIBUTE_TYPE, * LPGOPHER_ORGANIZATION_ATTRIBUTE_TYPE;
  1439.  
  1440. typedef struct {
  1441.     LPCTSTR Location;
  1442. } GOPHER_LOCATION_ATTRIBUTE_TYPE, * LPGOPHER_LOCATION_ATTRIBUTE_TYPE;
  1443.  
  1444. typedef struct {
  1445.     INT DegreesNorth;
  1446.     INT MinutesNorth;
  1447.     INT SecondsNorth;
  1448.     INT DegreesEast;
  1449.     INT MinutesEast;
  1450.     INT SecondsEast;
  1451. } GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE, * LPGOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE;
  1452.  
  1453. typedef struct {
  1454.     INT Zone;
  1455. } GOPHER_TIMEZONE_ATTRIBUTE_TYPE, * LPGOPHER_TIMEZONE_ATTRIBUTE_TYPE;
  1456.  
  1457. typedef struct {
  1458.     LPCTSTR Provider;
  1459. } GOPHER_PROVIDER_ATTRIBUTE_TYPE, * LPGOPHER_PROVIDER_ATTRIBUTE_TYPE;
  1460.  
  1461. typedef struct {
  1462.     LPCTSTR Version;
  1463. } GOPHER_VERSION_ATTRIBUTE_TYPE, * LPGOPHER_VERSION_ATTRIBUTE_TYPE;
  1464.  
  1465. typedef struct {
  1466.     LPCTSTR ShortAbstract;
  1467.     LPCTSTR AbstractFile;
  1468. } GOPHER_ABSTRACT_ATTRIBUTE_TYPE, * LPGOPHER_ABSTRACT_ATTRIBUTE_TYPE;
  1469.  
  1470. typedef struct {
  1471.     LPCTSTR ContentType;
  1472.     LPCTSTR Language;
  1473.     DWORD Size;
  1474. } GOPHER_VIEW_ATTRIBUTE_TYPE, * LPGOPHER_VIEW_ATTRIBUTE_TYPE;
  1475.  
  1476. typedef struct {
  1477.     BOOL TreeWalk;
  1478. } GOPHER_VERONICA_ATTRIBUTE_TYPE, * LPGOPHER_VERONICA_ATTRIBUTE_TYPE;
  1479.  
  1480. typedef struct {
  1481.     LPCTSTR QuestionType;
  1482.     LPCTSTR QuestionText;
  1483. } GOPHER_ASK_ATTRIBUTE_TYPE, * LPGOPHER_ASK_ATTRIBUTE_TYPE;
  1484.  
  1485. //
  1486. // GOPHER_UNKNOWN_ATTRIBUTE_TYPE - this is returned if we retrieve an attribute
  1487. // that is not specified in the current gopher/gopher+ documentation. It is up
  1488. // to the application to parse the information
  1489. //
  1490.  
  1491. typedef struct {
  1492.     LPCTSTR Text;
  1493. } GOPHER_UNKNOWN_ATTRIBUTE_TYPE, * LPGOPHER_UNKNOWN_ATTRIBUTE_TYPE;
  1494.  
  1495. //
  1496. // GOPHER_ATTRIBUTE_TYPE - returned in the user's buffer when an enumerated
  1497. // GopherGetAttribute call is made
  1498. //
  1499.  
  1500. typedef struct {
  1501.     DWORD CategoryId;   // e.g. GOPHER_CATEGORY_ID_ADMIN
  1502.     DWORD AttributeId;  // e.g. GOPHER_ATTRIBUTE_ID_ADMIN
  1503.     union {
  1504.         GOPHER_ADMIN_ATTRIBUTE_TYPE Admin;
  1505.         GOPHER_MOD_DATE_ATTRIBUTE_TYPE ModDate;
  1506.         GOPHER_TTL_ATTRIBUTE_TYPE Ttl;
  1507.         GOPHER_SCORE_ATTRIBUTE_TYPE Score;
  1508.         GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ScoreRange;
  1509.         GOPHER_SITE_ATTRIBUTE_TYPE Site;
  1510.         GOPHER_ORGANIZATION_ATTRIBUTE_TYPE Organization;
  1511.         GOPHER_LOCATION_ATTRIBUTE_TYPE Location;
  1512.         GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE GeographicalLocation;
  1513.         GOPHER_TIMEZONE_ATTRIBUTE_TYPE TimeZone;
  1514.         GOPHER_PROVIDER_ATTRIBUTE_TYPE Provider;
  1515.         GOPHER_VERSION_ATTRIBUTE_TYPE Version;
  1516.         GOPHER_ABSTRACT_ATTRIBUTE_TYPE Abstract;
  1517.         GOPHER_VIEW_ATTRIBUTE_TYPE View;
  1518.         GOPHER_VERONICA_ATTRIBUTE_TYPE Veronica;
  1519.         GOPHER_ASK_ATTRIBUTE_TYPE Ask;
  1520.         GOPHER_UNKNOWN_ATTRIBUTE_TYPE Unknown;
  1521.     } AttributeType;
  1522. } GOPHER_ATTRIBUTE_TYPE, * LPGOPHER_ATTRIBUTE_TYPE;
  1523.  
  1524. #define MAX_GOPHER_CATEGORY_NAME    128     // arbitrary
  1525. #define MAX_GOPHER_ATTRIBUTE_NAME   128     //     "
  1526. #define MIN_GOPHER_ATTRIBUTE_LENGTH 256     //     "
  1527.  
  1528. //
  1529. // known gopher attribute categories. See below for ordinals
  1530. //
  1531.  
  1532. #define GOPHER_INFO_CATEGORY        TEXT("+INFO")
  1533. #define GOPHER_ADMIN_CATEGORY       TEXT("+ADMIN")
  1534. #define GOPHER_VIEWS_CATEGORY       TEXT("+VIEWS")
  1535. #define GOPHER_ABSTRACT_CATEGORY    TEXT("+ABSTRACT")
  1536. #define GOPHER_VERONICA_CATEGORY    TEXT("+VERONICA")
  1537.  
  1538. //
  1539. // known gopher attributes. These are the attribute names as defined in the
  1540. // gopher+ protocol document
  1541. //
  1542.  
  1543. #define GOPHER_ADMIN_ATTRIBUTE      TEXT("Admin")
  1544. #define GOPHER_MOD_DATE_ATTRIBUTE   TEXT("Mod-Date")
  1545. #define GOPHER_TTL_ATTRIBUTE        TEXT("TTL")
  1546. #define GOPHER_SCORE_ATTRIBUTE      TEXT("Score")
  1547. #define GOPHER_RANGE_ATTRIBUTE      TEXT("Score-range")
  1548. #define GOPHER_SITE_ATTRIBUTE       TEXT("Site")
  1549. #define GOPHER_ORG_ATTRIBUTE        TEXT("Org")
  1550. #define GOPHER_LOCATION_ATTRIBUTE   TEXT("Loc")
  1551. #define GOPHER_GEOG_ATTRIBUTE       TEXT("Geog")
  1552. #define GOPHER_TIMEZONE_ATTRIBUTE   TEXT("TZ")
  1553. #define GOPHER_PROVIDER_ATTRIBUTE   TEXT("Provider")
  1554. #define GOPHER_VERSION_ATTRIBUTE    TEXT("Version")
  1555. #define GOPHER_ABSTRACT_ATTRIBUTE   TEXT("Abstract")
  1556. #define GOPHER_VIEW_ATTRIBUTE       TEXT("View")
  1557. #define GOPHER_TREEWALK_ATTRIBUTE   TEXT("treewalk")
  1558.  
  1559. //
  1560. // identifiers for attribute strings
  1561. //
  1562.  
  1563. #define GOPHER_ATTRIBUTE_ID_BASE        0xabcccc00
  1564.  
  1565. #define GOPHER_CATEGORY_ID_ALL          (GOPHER_ATTRIBUTE_ID_BASE + 1)
  1566.  
  1567. #define GOPHER_CATEGORY_ID_INFO         (GOPHER_ATTRIBUTE_ID_BASE + 2)
  1568. #define GOPHER_CATEGORY_ID_ADMIN        (GOPHER_ATTRIBUTE_ID_BASE + 3)
  1569. #define GOPHER_CATEGORY_ID_VIEWS        (GOPHER_ATTRIBUTE_ID_BASE + 4)
  1570. #define GOPHER_CATEGORY_ID_ABSTRACT     (GOPHER_ATTRIBUTE_ID_BASE + 5)
  1571. #define GOPHER_CATEGORY_ID_VERONICA     (GOPHER_ATTRIBUTE_ID_BASE + 6)
  1572. #define GOPHER_CATEGORY_ID_ASK          (GOPHER_ATTRIBUTE_ID_BASE + 7)
  1573.  
  1574. #define GOPHER_CATEGORY_ID_UNKNOWN      (GOPHER_ATTRIBUTE_ID_BASE + 8)
  1575.  
  1576. #define GOPHER_ATTRIBUTE_ID_ALL         (GOPHER_ATTRIBUTE_ID_BASE + 9)
  1577.  
  1578. #define GOPHER_ATTRIBUTE_ID_ADMIN       (GOPHER_ATTRIBUTE_ID_BASE + 10)
  1579. #define GOPHER_ATTRIBUTE_ID_MOD_DATE    (GOPHER_ATTRIBUTE_ID_BASE + 11)
  1580. #define GOPHER_ATTRIBUTE_ID_TTL         (GOPHER_ATTRIBUTE_ID_BASE + 12)
  1581. #define GOPHER_ATTRIBUTE_ID_SCORE       (GOPHER_ATTRIBUTE_ID_BASE + 13)
  1582. #define GOPHER_ATTRIBUTE_ID_RANGE       (GOPHER_ATTRIBUTE_ID_BASE + 14)
  1583. #define GOPHER_ATTRIBUTE_ID_SITE        (GOPHER_ATTRIBUTE_ID_BASE + 15)
  1584. #define GOPHER_ATTRIBUTE_ID_ORG         (GOPHER_ATTRIBUTE_ID_BASE + 16)
  1585. #define GOPHER_ATTRIBUTE_ID_LOCATION    (GOPHER_ATTRIBUTE_ID_BASE + 17)
  1586. #define GOPHER_ATTRIBUTE_ID_GEOG        (GOPHER_ATTRIBUTE_ID_BASE + 18)
  1587. #define GOPHER_ATTRIBUTE_ID_TIMEZONE    (GOPHER_ATTRIBUTE_ID_BASE + 19)
  1588. #define GOPHER_ATTRIBUTE_ID_PROVIDER    (GOPHER_ATTRIBUTE_ID_BASE + 20)
  1589. #define GOPHER_ATTRIBUTE_ID_VERSION     (GOPHER_ATTRIBUTE_ID_BASE + 21)
  1590. #define GOPHER_ATTRIBUTE_ID_ABSTRACT    (GOPHER_ATTRIBUTE_ID_BASE + 22)
  1591. #define GOPHER_ATTRIBUTE_ID_VIEW        (GOPHER_ATTRIBUTE_ID_BASE + 23)
  1592. #define GOPHER_ATTRIBUTE_ID_TREEWALK    (GOPHER_ATTRIBUTE_ID_BASE + 24)
  1593.  
  1594. #define GOPHER_ATTRIBUTE_ID_UNKNOWN     (GOPHER_ATTRIBUTE_ID_BASE + 25)
  1595.  
  1596. //
  1597. // prototypes
  1598. //
  1599.  
  1600. INTERNETAPI
  1601. BOOL
  1602. WINAPI
  1603. GopherCreateLocatorA(
  1604.     IN LPCSTR lpszHost,
  1605.     IN INTERNET_PORT nServerPort,
  1606.     IN LPCSTR lpszDisplayString OPTIONAL,
  1607.     IN LPCSTR lpszSelectorString OPTIONAL,
  1608.     IN DWORD dwGopherType,
  1609.     OUT LPSTR lpszLocator OPTIONAL,
  1610.     IN OUT LPDWORD lpdwBufferLength
  1611.     );
  1612. INTERNETAPI
  1613. BOOL
  1614. WINAPI
  1615. GopherCreateLocatorW(
  1616.     IN LPCWSTR lpszHost,
  1617.     IN INTERNET_PORT nServerPort,
  1618.     IN LPCWSTR lpszDisplayString OPTIONAL,
  1619.     IN LPCWSTR lpszSelectorString OPTIONAL,
  1620.     IN DWORD dwGopherType,
  1621.     OUT LPWSTR lpszLocator OPTIONAL,
  1622.     IN OUT LPDWORD lpdwBufferLength
  1623.     );
  1624. #ifdef UNICODE
  1625. #define GopherCreateLocator  GopherCreateLocatorW
  1626. #else
  1627. #define GopherCreateLocator  GopherCreateLocatorA
  1628. #endif // !UNICODE
  1629.  
  1630. INTERNETAPI
  1631. BOOL
  1632. WINAPI
  1633. GopherGetLocatorTypeA(
  1634.     IN LPCSTR lpszLocator,
  1635.     OUT LPDWORD lpdwGopherType
  1636.     );
  1637. INTERNETAPI
  1638. BOOL
  1639. WINAPI
  1640. GopherGetLocatorTypeW(
  1641.     IN LPCWSTR lpszLocator,
  1642.     OUT LPDWORD lpdwGopherType
  1643.     );
  1644. #ifdef UNICODE
  1645. #define GopherGetLocatorType  GopherGetLocatorTypeW
  1646. #else
  1647. #define GopherGetLocatorType  GopherGetLocatorTypeA
  1648. #endif // !UNICODE
  1649.  
  1650. INTERNETAPI
  1651. HINTERNET
  1652. WINAPI
  1653. GopherFindFirstFileA(
  1654.     IN HINTERNET hConnect,
  1655.     IN LPCSTR lpszLocator OPTIONAL,
  1656.     IN LPCSTR lpszSearchString OPTIONAL,
  1657.     OUT LPGOPHER_FIND_DATAA lpFindData OPTIONAL,
  1658.     IN DWORD dwFlags,
  1659.     IN DWORD dwContext
  1660.     );
  1661. INTERNETAPI
  1662. HINTERNET
  1663. WINAPI
  1664. GopherFindFirstFileW(
  1665.     IN HINTERNET hConnect,
  1666.     IN LPCWSTR lpszLocator OPTIONAL,
  1667.     IN LPCWSTR lpszSearchString OPTIONAL,
  1668.     OUT LPGOPHER_FIND_DATAW lpFindData OPTIONAL,
  1669.     IN DWORD dwFlags,
  1670.     IN DWORD dwContext
  1671.     );
  1672. #ifdef UNICODE
  1673. #define GopherFindFirstFile  GopherFindFirstFileW
  1674. #else
  1675. #define GopherFindFirstFile  GopherFindFirstFileA
  1676. #endif // !UNICODE
  1677.  
  1678. INTERNETAPI
  1679. HINTERNET
  1680. WINAPI
  1681. GopherOpenFileA(
  1682.     IN HINTERNET hConnect,
  1683.     IN LPCSTR lpszLocator,
  1684.     IN LPCSTR lpszView OPTIONAL,
  1685.     IN DWORD dwFlags,
  1686.     IN DWORD dwContext
  1687.     );
  1688. INTERNETAPI
  1689. HINTERNET
  1690. WINAPI
  1691. GopherOpenFileW(
  1692.     IN HINTERNET hConnect,
  1693.     IN LPCWSTR lpszLocator,
  1694.     IN LPCWSTR lpszView OPTIONAL,
  1695.     IN DWORD dwFlags,
  1696.     IN DWORD dwContext
  1697.     );
  1698. #ifdef UNICODE
  1699. #define GopherOpenFile  GopherOpenFileW
  1700. #else
  1701. #define GopherOpenFile  GopherOpenFileA
  1702. #endif // !UNICODE
  1703.  
  1704. typedef
  1705. BOOL
  1706. (CALLBACK * GOPHER_ATTRIBUTE_ENUMERATOR)(
  1707.     LPGOPHER_ATTRIBUTE_TYPE lpAttributeInfo,
  1708.     DWORD dwError
  1709.     );
  1710.  
  1711. INTERNETAPI
  1712. BOOL
  1713. WINAPI
  1714. GopherGetAttributeA(
  1715.     IN HINTERNET hConnect,
  1716.     IN LPCSTR lpszLocator,
  1717.     IN LPCSTR lpszAttributeName OPTIONAL,
  1718.     OUT LPBYTE lpBuffer,
  1719.     IN DWORD dwBufferLength,
  1720.     OUT LPDWORD lpdwCharactersReturned,
  1721.     IN GOPHER_ATTRIBUTE_ENUMERATOR lpfnEnumerator OPTIONAL,
  1722.     IN DWORD dwContext
  1723.     );
  1724. INTERNETAPI
  1725. BOOL
  1726. WINAPI
  1727. GopherGetAttributeW(
  1728.     IN HINTERNET hConnect,
  1729.     IN LPCWSTR lpszLocator,
  1730.     IN LPCWSTR lpszAttributeName OPTIONAL,
  1731.     OUT LPBYTE lpBuffer,
  1732.     IN DWORD dwBufferLength,
  1733.     OUT LPDWORD lpdwCharactersReturned,
  1734.     IN GOPHER_ATTRIBUTE_ENUMERATOR lpfnEnumerator OPTIONAL,
  1735.     IN DWORD dwContext
  1736.     );
  1737. #ifdef UNICODE
  1738. #define GopherGetAttribute  GopherGetAttributeW
  1739. #else
  1740. #define GopherGetAttribute  GopherGetAttributeA
  1741. #endif // !UNICODE
  1742.  
  1743. //
  1744. // HTTP
  1745. //
  1746.  
  1747. //
  1748. // manifests
  1749. //
  1750.  
  1751. //
  1752. // the default major/minor HTTP version numbers
  1753. //
  1754.  
  1755. #define HTTP_MAJOR_VERSION      1
  1756. #define HTTP_MINOR_VERSION      0
  1757.  
  1758. #define HTTP_VERSION            TEXT("HTTP/1.0")
  1759.  
  1760. //
  1761. // HttpQueryInfo info levels. Generally, there is one info level
  1762. // for each potential RFC822/HTTP/MIME header that an HTTP server
  1763. // may send as part of a request response.
  1764. //
  1765. // The HTTP_QUERY_RAW_HEADERS info level is provided for clients
  1766. // that choose to perform their own header parsing.
  1767. //
  1768.  
  1769. #define HTTP_QUERY_MIME_VERSION                 0
  1770. #define HTTP_QUERY_CONTENT_TYPE                 1
  1771. #define HTTP_QUERY_CONTENT_TRANSFER_ENCODING    2
  1772. #define HTTP_QUERY_CONTENT_ID                   3
  1773. #define HTTP_QUERY_CONTENT_DESCRIPTION          4
  1774. #define HTTP_QUERY_CONTENT_LENGTH               5
  1775. #define HTTP_QUERY_CONTENT_LANGUAGE             6
  1776. #define HTTP_QUERY_ALLOW                        7
  1777. #define HTTP_QUERY_PUBLIC                       8
  1778. #define HTTP_QUERY_DATE                         9
  1779. #define HTTP_QUERY_EXPIRES                      10
  1780. #define HTTP_QUERY_LAST_MODIFIED                11
  1781. #define HTTP_QUERY_MESSAGE_ID                   12
  1782. #define HTTP_QUERY_URI                          13
  1783. #define HTTP_QUERY_DERIVED_FROM                 14
  1784. #define HTTP_QUERY_COST                         15
  1785. #define HTTP_QUERY_LINK                         16
  1786. #define HTTP_QUERY_PRAGMA                       17
  1787. #define HTTP_QUERY_VERSION                      18  // special: part of status line
  1788. #define HTTP_QUERY_STATUS_CODE                  19  // special: part of status line
  1789. #define HTTP_QUERY_STATUS_TEXT                  20  // special: part of status line
  1790. #define HTTP_QUERY_RAW_HEADERS                  21  // special: all headers as ASCIIZ
  1791. #define HTTP_QUERY_RAW_HEADERS_CRLF             22  // special: all headers
  1792. #define HTTP_QUERY_CONNECTION                   23
  1793. #define HTTP_QUERY_ACCEPT                       24
  1794. #define HTTP_QUERY_ACCEPT_CHARSET               25
  1795. #define HTTP_QUERY_ACCEPT_ENCODING              26
  1796. #define HTTP_QUERY_ACCEPT_LANGUAGE              27
  1797. #define HTTP_QUERY_AUTHORIZATION                28
  1798. #define HTTP_QUERY_CONTENT_ENCODING             29
  1799. #define HTTP_QUERY_FORWARDED                    30
  1800. #define HTTP_QUERY_FROM                         31
  1801. #define HTTP_QUERY_IF_MODIFIED_SINCE            32
  1802. #define HTTP_QUERY_LOCATION                     33
  1803. #define HTTP_QUERY_ORIG_URI                     34
  1804. #define HTTP_QUERY_REFERER                      35
  1805. #define HTTP_QUERY_RETRY_AFTER                  36
  1806. #define HTTP_QUERY_SERVER                       37
  1807. #define HTTP_QUERY_TITLE                        38
  1808. #define HTTP_QUERY_USER_AGENT                   39
  1809. #define HTTP_QUERY_WWW_AUTHENTICATE             40
  1810. #define HTTP_QUERY_PROXY_AUTHENTICATE           41
  1811. #define HTTP_QUERY_ACCEPT_RANGES                42
  1812. #define HTTP_QUERY_SET_COOKIE                   43
  1813. #define HTTP_QUERY_COOKIE                       44
  1814. #define HTTP_QUERY_REQUEST_METHOD               45  // special: GET/POST etc.
  1815.  
  1816. #define HTTP_QUERY_MAX                          45
  1817.  
  1818. //
  1819. // HTTP_QUERY_CUSTOM - if this special value is supplied as the dwInfoLevel
  1820. // parameter of HttpQueryInfo() then the lpBuffer parameter contains the name
  1821. // of the header we are to query
  1822. //
  1823.  
  1824. #define HTTP_QUERY_CUSTOM                       65535
  1825.  
  1826. //
  1827. // HTTP_QUERY_FLAG_REQUEST_HEADERS - if this bit is set in the dwInfoLevel
  1828. // parameter of HttpQueryInfo() then the request headers will be queried for the
  1829. // request information
  1830. //
  1831.  
  1832. #define HTTP_QUERY_FLAG_REQUEST_HEADERS         0x80000000
  1833.  
  1834. //
  1835. // HTTP_QUERY_FLAG_SYSTEMTIME - if this bit is set in the dwInfoLevel parameter
  1836. // of HttpQueryInfo() AND the header being queried contains date information,
  1837. // e.g. the "Expires:" header then lpBuffer will contain a SYSTEMTIME structure
  1838. // containing the date and time information converted from the header string
  1839. //
  1840.  
  1841. #define HTTP_QUERY_FLAG_SYSTEMTIME              0x40000000
  1842.  
  1843. //
  1844. // HTTP_QUERY_FLAG_NUMBER - if this bit is set in the dwInfoLevel parameter of
  1845. // HttpQueryInfo(), then the value of the header will be converted to a number
  1846. // before being returned to the caller, if applicable
  1847. //
  1848.  
  1849. #define HTTP_QUERY_FLAG_NUMBER                  0x20000000
  1850.  
  1851. //
  1852. // HTTP_QUERY_FLAG_COALESCE - combine the values from several headers of the
  1853. // same name into the output buffer
  1854. //
  1855.  
  1856. #define HTTP_QUERY_FLAG_COALESCE                0x10000000
  1857.  
  1858. #define HTTP_QUERY_MODIFIER_FLAGS_MASK          (HTTP_QUERY_FLAG_REQUEST_HEADERS    \
  1859.                                                 | HTTP_QUERY_FLAG_SYSTEMTIME        \
  1860.                                                 | HTTP_QUERY_FLAG_NUMBER            \
  1861.                                                 | HTTP_QUERY_FLAG_COALESCE          \
  1862.                                                 )
  1863.  
  1864. #define HTTP_QUERY_HEADER_MASK                  (~HTTP_QUERY_MODIFIER_FLAGS_MASK)
  1865.  
  1866. //
  1867. // HTTP Response Status Codes:
  1868. //
  1869.  
  1870. #define HTTP_STATUS_OK              200     // request completed
  1871. #define HTTP_STATUS_CREATED         201     // object created, reason = new URI
  1872. #define HTTP_STATUS_ACCEPTED        202     // async completion (TBS)
  1873. #define HTTP_STATUS_PARTIAL         203     // partial completion
  1874. #define HTTP_STATUS_NO_CONTENT      204     // no info to return
  1875.  
  1876. #define HTTP_STATUS_AMBIGUOUS       300     // server couldn't decide what to return
  1877. #define HTTP_STATUS_MOVED           301     // object permanently moved
  1878. #define HTTP_STATUS_REDIRECT        302     // object temporarily moved
  1879. #define HTTP_STATUS_REDIRECT_METHOD 303     // redirection w/ new access method
  1880. #define HTTP_STATUS_NOT_MODIFIED    304     // if-modified-since was not modified
  1881.  
  1882. #define HTTP_STATUS_BAD_REQUEST     400     // invalid syntax
  1883. #define HTTP_STATUS_DENIED          401     // access denied
  1884. #define HTTP_STATUS_PAYMENT_REQ     402     // payment required
  1885. #define HTTP_STATUS_FORBIDDEN       403     // request forbidden
  1886. #define HTTP_STATUS_NOT_FOUND       404     // object not found
  1887. #define HTTP_STATUS_BAD_METHOD      405     // method is not allowed
  1888. #define HTTP_STATUS_NONE_ACCEPTABLE 406     // no response acceptable to client found
  1889. #define HTTP_STATUS_PROXY_AUTH_REQ  407     // proxy authentication required
  1890. #define HTTP_STATUS_REQUEST_TIMEOUT 408     // server timed out waiting for request
  1891. #define HTTP_STATUS_CONFLICT        409     // user should resubmit with more info
  1892. #define HTTP_STATUS_GONE            410     // the resource is no longer available
  1893. #define HTTP_STATUS_AUTH_REFUSED    411     // couldn't authorize client
  1894.  
  1895. #define HTTP_STATUS_SERVER_ERROR    500     // internal server error
  1896. #define HTTP_STATUS_NOT_SUPPORTED   501     // required not supported
  1897. #define HTTP_STATUS_BAD_GATEWAY     502     // error response received from gateway
  1898. #define HTTP_STATUS_SERVICE_UNAVAIL 503     // temporarily overloaded
  1899. #define HTTP_STATUS_GATEWAY_TIMEOUT 504     // timed out waiting for gateway
  1900.  
  1901. //
  1902. // prototypes
  1903. //
  1904.  
  1905. INTERNETAPI
  1906. HINTERNET
  1907. WINAPI
  1908. HttpOpenRequestA(
  1909.     IN HINTERNET hConnect,
  1910.     IN LPCSTR lpszVerb,
  1911.     IN LPCSTR lpszObjectName,
  1912.     IN LPCSTR lpszVersion,
  1913.     IN LPCSTR lpszReferrer OPTIONAL,
  1914.     IN LPCSTR FAR * lplpszAcceptTypes OPTIONAL,
  1915.     IN DWORD dwFlags,
  1916.     IN DWORD dwContext
  1917.     );
  1918. INTERNETAPI
  1919. HINTERNET
  1920. WINAPI
  1921. HttpOpenRequestW(
  1922.     IN HINTERNET hConnect,
  1923.     IN LPCWSTR lpszVerb,
  1924.     IN LPCWSTR lpszObjectName,
  1925.     IN LPCWSTR lpszVersion,
  1926.     IN LPCWSTR lpszReferrer OPTIONAL,
  1927.     IN LPCWSTR FAR * lplpszAcceptTypes OPTIONAL,
  1928.     IN DWORD dwFlags,
  1929.     IN DWORD dwContext
  1930.     );
  1931. #ifdef UNICODE
  1932. #define HttpOpenRequest  HttpOpenRequestW
  1933. #else
  1934. #define HttpOpenRequest  HttpOpenRequestA
  1935. #endif // !UNICODE
  1936.  
  1937. INTERNETAPI
  1938. BOOL
  1939. WINAPI
  1940. HttpAddRequestHeadersA(
  1941.     IN HINTERNET hRequest,
  1942.     IN LPCSTR lpszHeaders,
  1943.     IN DWORD dwHeadersLength,
  1944.     IN DWORD dwModifiers
  1945.     );
  1946. INTERNETAPI
  1947. BOOL
  1948. WINAPI
  1949. HttpAddRequestHeadersW(
  1950.     IN HINTERNET hRequest,
  1951.     IN LPCWSTR lpszHeaders,
  1952.     IN DWORD dwHeadersLength,
  1953.     IN DWORD dwModifiers
  1954.     );
  1955. #ifdef UNICODE
  1956. #define HttpAddRequestHeaders  HttpAddRequestHeadersW
  1957. #else
  1958. #define HttpAddRequestHeaders  HttpAddRequestHeadersA
  1959. #endif // !UNICODE
  1960.  
  1961. //
  1962. // values for dwModifiers parameter of HttpAddRequestHeaders()
  1963. //
  1964.  
  1965. #define HTTP_ADDREQ_INDEX_MASK      0x0000FFFF
  1966. #define HTTP_ADDREQ_FLAGS_MASK      0xFFFF0000
  1967.  
  1968. //
  1969. // HTTP_ADDREQ_FLAG_ADD_IF_NEW - the header will only be added if it doesn't
  1970. // already exist
  1971. //
  1972.  
  1973. #define HTTP_ADDREQ_FLAG_ADD_IF_NEW 0x10000000
  1974.  
  1975. //
  1976. // HTTP_ADDREQ_FLAG_ADD - if HTTP_ADDREQ_FLAG_REPLACE is set but the header is
  1977. // not found then if this flag is set, the header is added anyway, so long as
  1978. // there is a valid header-value
  1979. //
  1980.  
  1981. #define HTTP_ADDREQ_FLAG_ADD        0x20000000
  1982.  
  1983. //
  1984. // HTTP_ADDREQ_FLAG_COALESCE - coalesce headers with same name. e.g.
  1985. // "Accept: text/*" and "Accept: audio/*" with this flag results in a single
  1986. // header: "Accept: text/*, audio/*"
  1987. //
  1988.  
  1989. //
  1990. // HTTP_ADDREQ_FLAG_COALESCE - coalesce headers with same name. e.g.
  1991. // "Accept: text/*" and "Accept: audio/*" with this flag results in a single
  1992. // header: "Accept: text/*, audio/*"
  1993. //
  1994.  
  1995. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA       0x40000000
  1996.  
  1997. #define HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON   0x01000000
  1998.  
  1999. #define HTTP_ADDREQ_FLAG_COALESCE                  HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
  2000.  
  2001. //
  2002. // HTTP_ADDREQ_FLAG_REPLACE - replaces the specified header. Only one header can
  2003. // be supplied in the buffer. If the header to be replaced is not the first
  2004. // in a list of headers with the same name, then the relative index should be
  2005. // supplied in the low 8 bits of the dwModifiers parameter. If the header-value
  2006. // part is missing, then the header is removed
  2007. //
  2008.  
  2009. #define HTTP_ADDREQ_FLAG_REPLACE    0x80000000
  2010.  
  2011. INTERNETAPI
  2012. BOOL
  2013. WINAPI
  2014. HttpSendRequestA(
  2015.     IN HINTERNET hRequest,
  2016.     IN LPCSTR lpszHeaders OPTIONAL,
  2017.     IN DWORD dwHeadersLength,
  2018.     IN LPVOID lpOptional OPTIONAL,
  2019.     IN DWORD dwOptionalLength
  2020.     );
  2021. INTERNETAPI
  2022. BOOL
  2023. WINAPI
  2024. HttpSendRequestW(
  2025.     IN HINTERNET hRequest,
  2026.     IN LPCWSTR lpszHeaders OPTIONAL,
  2027.     IN DWORD dwHeadersLength,
  2028.     IN LPVOID lpOptional OPTIONAL,
  2029.     IN DWORD dwOptionalLength
  2030.     );
  2031. #ifdef UNICODE
  2032. #define HttpSendRequest  HttpSendRequestW
  2033. #else
  2034. #define HttpSendRequest  HttpSendRequestA
  2035. #endif // !UNICODE
  2036.  
  2037. INTERNETAPI
  2038. BOOL
  2039. WINAPI
  2040. HttpQueryInfoA(
  2041.     IN HINTERNET hRequest,
  2042.     IN DWORD dwInfoLevel,
  2043.     IN OUT LPVOID lpBuffer OPTIONAL,
  2044.     IN OUT LPDWORD lpdwBufferLength,
  2045.     IN OUT LPDWORD lpdwIndex OPTIONAL
  2046.     );
  2047. INTERNETAPI
  2048. BOOL
  2049. WINAPI
  2050. HttpQueryInfoW(
  2051.     IN HINTERNET hRequest,
  2052.     IN DWORD dwInfoLevel,
  2053.     IN OUT LPVOID lpBuffer OPTIONAL,
  2054.     IN OUT LPDWORD lpdwBufferLength,
  2055.     IN OUT LPDWORD lpdwIndex OPTIONAL
  2056.     );
  2057. #ifdef UNICODE
  2058. #define HttpQueryInfo  HttpQueryInfoW
  2059. #else
  2060. #define HttpQueryInfo  HttpQueryInfoA
  2061. #endif // !UNICODE
  2062.  
  2063. //
  2064. // Cookie APIs
  2065. //
  2066.  
  2067. INTERNETAPI
  2068. BOOL
  2069. WINAPI
  2070. InternetSetCookieA(
  2071.     IN LPCSTR lpszUrl,
  2072.     IN LPCSTR lpszCookieName,
  2073.     IN LPCSTR lpszCookieData
  2074.     );
  2075. INTERNETAPI
  2076. BOOL
  2077. WINAPI
  2078. InternetSetCookieW(
  2079.     IN LPCSTR lpszUrl,
  2080.     IN LPCWSTR lpszCookieName,
  2081.     IN LPCWSTR lpszCookieData
  2082.     );
  2083. #ifdef UNICODE
  2084. #define InternetSetCookie  InternetSetCookieW
  2085. #else
  2086. #define InternetSetCookie  InternetSetCookieA
  2087. #endif // !UNICODE
  2088.  
  2089. INTERNETAPI
  2090. BOOL
  2091. WINAPI
  2092. InternetGetCookieA(
  2093.     IN LPCSTR lpszUrl,
  2094.     IN LPCSTR lpszCookieName,
  2095.     OUT LPSTR lpCookieData,
  2096.     IN OUT LPDWORD lpdwSize
  2097.     );
  2098. INTERNETAPI
  2099. BOOL
  2100. WINAPI
  2101. InternetGetCookieW(
  2102.     IN LPCSTR lpszUrl,
  2103.     IN LPCWSTR lpszCookieName,
  2104.     OUT LPWSTR lpCookieData,
  2105.     IN OUT LPDWORD lpdwSize
  2106.     );
  2107. #ifdef UNICODE
  2108. #define InternetGetCookie  InternetGetCookieW
  2109. #else
  2110. #define InternetGetCookie  InternetGetCookieA
  2111. #endif // !UNICODE
  2112.  
  2113. //
  2114. // offline browsing
  2115. //
  2116.  
  2117. INTERNETAPI
  2118. DWORD
  2119. WINAPI
  2120. InternetAttemptConnect(
  2121.     DWORD dwReserved
  2122.     );
  2123.  
  2124. //
  2125. // Internet UI
  2126. //
  2127.  
  2128. //
  2129. // InternetErrorDlg - Provides UI for certain Errors.
  2130. //
  2131.  
  2132. #define FLAGS_ERROR_UI_FILTER_FOR_ERRORS        0x01
  2133. #define FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS     0x02
  2134. #define FLAGS_ERROR_UI_FLAGS_GENERATE_DATA      0x04
  2135. #define FLAGS_ERROR_UI_FLAGS_NO_UI              0x08
  2136.  
  2137. INTERNETAPI
  2138. DWORD
  2139. WINAPI
  2140. InternetErrorDlg(
  2141.      IN HWND hWnd,
  2142.      IN OUT HINTERNET hRequest,
  2143.      IN DWORD dwError,
  2144.      IN DWORD dwFlags,
  2145.      IN OUT LPVOID * lppvData
  2146.      );
  2147.  
  2148. INTERNETAPI
  2149. DWORD
  2150. WINAPI
  2151. InternetConfirmZoneCrossing(
  2152.      IN HWND hWnd,
  2153.      IN LPSTR szUrlPrev,
  2154.      IN LPSTR szUrlNew,
  2155.      IN BOOL bPost
  2156.      );
  2157.  
  2158. //#if !defined(_WINERROR_)
  2159.  
  2160. //
  2161. // Internet API error returns
  2162. //
  2163.  
  2164. #define INTERNET_ERROR_BASE                     12000
  2165.  
  2166. #define ERROR_INTERNET_OUT_OF_HANDLES           (INTERNET_ERROR_BASE + 1)
  2167. #define ERROR_INTERNET_TIMEOUT                  (INTERNET_ERROR_BASE + 2)
  2168. #define ERROR_INTERNET_EXTENDED_ERROR           (INTERNET_ERROR_BASE + 3)
  2169. #define ERROR_INTERNET_INTERNAL_ERROR           (INTERNET_ERROR_BASE + 4)
  2170. #define ERROR_INTERNET_INVALID_URL              (INTERNET_ERROR_BASE + 5)
  2171. #define ERROR_INTERNET_UNRECOGNIZED_SCHEME      (INTERNET_ERROR_BASE + 6)
  2172. #define ERROR_INTERNET_NAME_NOT_RESOLVED        (INTERNET_ERROR_BASE + 7)
  2173. #define ERROR_INTERNET_PROTOCOL_NOT_FOUND       (INTERNET_ERROR_BASE + 8)
  2174. #define ERROR_INTERNET_INVALID_OPTION           (INTERNET_ERROR_BASE + 9)
  2175. #define ERROR_INTERNET_BAD_OPTION_LENGTH        (INTERNET_ERROR_BASE + 10)
  2176. #define ERROR_INTERNET_OPTION_NOT_SETTABLE      (INTERNET_ERROR_BASE + 11)
  2177. #define ERROR_INTERNET_SHUTDOWN                 (INTERNET_ERROR_BASE + 12)
  2178. #define ERROR_INTERNET_INCORRECT_USER_NAME      (INTERNET_ERROR_BASE + 13)
  2179. #define ERROR_INTERNET_INCORRECT_PASSWORD       (INTERNET_ERROR_BASE + 14)
  2180. #define ERROR_INTERNET_LOGIN_FAILURE            (INTERNET_ERROR_BASE + 15)
  2181. #define ERROR_INTERNET_INVALID_OPERATION        (INTERNET_ERROR_BASE + 16)
  2182. #define ERROR_INTERNET_OPERATION_CANCELLED      (INTERNET_ERROR_BASE + 17)
  2183. #define ERROR_INTERNET_INCORRECT_HANDLE_TYPE    (INTERNET_ERROR_BASE + 18)
  2184. #define ERROR_INTERNET_INCORRECT_HANDLE_STATE   (INTERNET_ERROR_BASE + 19)
  2185. #define ERROR_INTERNET_NOT_PROXY_REQUEST        (INTERNET_ERROR_BASE + 20)
  2186. #define ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND (INTERNET_ERROR_BASE + 21)
  2187. #define ERROR_INTERNET_BAD_REGISTRY_PARAMETER   (INTERNET_ERROR_BASE + 22)
  2188. #define ERROR_INTERNET_NO_DIRECT_ACCESS         (INTERNET_ERROR_BASE + 23)
  2189. #define ERROR_INTERNET_NO_CONTEXT               (INTERNET_ERROR_BASE + 24)
  2190. #define ERROR_INTERNET_NO_CALLBACK              (INTERNET_ERROR_BASE + 25)
  2191. #define ERROR_INTERNET_REQUEST_PENDING          (INTERNET_ERROR_BASE + 26)
  2192. #define ERROR_INTERNET_INCORRECT_FORMAT         (INTERNET_ERROR_BASE + 27)
  2193. #define ERROR_INTERNET_ITEM_NOT_FOUND           (INTERNET_ERROR_BASE + 28)
  2194. #define ERROR_INTERNET_CANNOT_CONNECT           (INTERNET_ERROR_BASE + 29)
  2195. #define ERROR_INTERNET_CONNECTION_ABORTED       (INTERNET_ERROR_BASE + 30)
  2196. #define ERROR_INTERNET_CONNECTION_RESET         (INTERNET_ERROR_BASE + 31)
  2197. #define ERROR_INTERNET_FORCE_RETRY              (INTERNET_ERROR_BASE + 32)
  2198. #define ERROR_INTERNET_INVALID_PROXY_REQUEST    (INTERNET_ERROR_BASE + 33)
  2199. #define ERROR_INTERNET_NEED_UI                  (INTERNET_ERROR_BASE + 34)
  2200.  
  2201. #define ERROR_INTERNET_HANDLE_EXISTS            (INTERNET_ERROR_BASE + 36)
  2202. #define ERROR_INTERNET_SEC_CERT_DATE_INVALID    (INTERNET_ERROR_BASE + 37)
  2203. #define ERROR_INTERNET_SEC_CERT_CN_INVALID      (INTERNET_ERROR_BASE + 38)
  2204. #define ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR   (INTERNET_ERROR_BASE + 39)
  2205. #define ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR   (INTERNET_ERROR_BASE + 40)
  2206. #define ERROR_INTERNET_MIXED_SECURITY           (INTERNET_ERROR_BASE + 41)
  2207. #define ERROR_INTERNET_CHG_POST_IS_NON_SECURE   (INTERNET_ERROR_BASE + 42)
  2208. #define ERROR_INTERNET_POST_IS_NON_SECURE       (INTERNET_ERROR_BASE + 43)
  2209. #define ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED  (INTERNET_ERROR_BASE + 44)
  2210. #define ERROR_INTERNET_INVALID_CA               (INTERNET_ERROR_BASE + 45)
  2211. #define ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP    (INTERNET_ERROR_BASE + 46)
  2212. #define ERROR_INTERNET_ASYNC_THREAD_FAILED      (INTERNET_ERROR_BASE + 47)
  2213. #define ERROR_INTERNET_REDIRECT_SCHEME_CHANGE   (INTERNET_ERROR_BASE + 48)
  2214.  
  2215. //
  2216. // FTP API errors
  2217. //
  2218.  
  2219. #define ERROR_FTP_TRANSFER_IN_PROGRESS          (INTERNET_ERROR_BASE + 110)
  2220. #define ERROR_FTP_DROPPED                       (INTERNET_ERROR_BASE + 111)
  2221.  
  2222. //
  2223. // gopher API errors
  2224. //
  2225.  
  2226. #define ERROR_GOPHER_PROTOCOL_ERROR             (INTERNET_ERROR_BASE + 130)
  2227. #define ERROR_GOPHER_NOT_FILE                   (INTERNET_ERROR_BASE + 131)
  2228. #define ERROR_GOPHER_DATA_ERROR                 (INTERNET_ERROR_BASE + 132)
  2229. #define ERROR_GOPHER_END_OF_DATA                (INTERNET_ERROR_BASE + 133)
  2230. #define ERROR_GOPHER_INVALID_LOCATOR            (INTERNET_ERROR_BASE + 134)
  2231. #define ERROR_GOPHER_INCORRECT_LOCATOR_TYPE     (INTERNET_ERROR_BASE + 135)
  2232. #define ERROR_GOPHER_NOT_GOPHER_PLUS            (INTERNET_ERROR_BASE + 136)
  2233. #define ERROR_GOPHER_ATTRIBUTE_NOT_FOUND        (INTERNET_ERROR_BASE + 137)
  2234. #define ERROR_GOPHER_UNKNOWN_LOCATOR            (INTERNET_ERROR_BASE + 138)
  2235.  
  2236. //
  2237. // HTTP API errors
  2238. //
  2239.  
  2240. #define ERROR_HTTP_HEADER_NOT_FOUND             (INTERNET_ERROR_BASE + 150)
  2241. #define ERROR_HTTP_DOWNLEVEL_SERVER             (INTERNET_ERROR_BASE + 151)
  2242. #define ERROR_HTTP_INVALID_SERVER_RESPONSE      (INTERNET_ERROR_BASE + 152)
  2243. #define ERROR_HTTP_INVALID_HEADER               (INTERNET_ERROR_BASE + 153)
  2244. #define ERROR_HTTP_INVALID_QUERY_REQUEST        (INTERNET_ERROR_BASE + 154)
  2245. #define ERROR_HTTP_HEADER_ALREADY_EXISTS        (INTERNET_ERROR_BASE + 155)
  2246. #define ERROR_HTTP_REDIRECT_FAILED              (INTERNET_ERROR_BASE + 156)
  2247.  
  2248. #define ERROR_INTERNET_SECURITY_CHANNEL_ERROR   (INTERNET_ERROR_BASE + 157)
  2249. #define ERROR_INTERNET_UNABLE_TO_CACHE_FILE     (INTERNET_ERROR_BASE + 158)        
  2250.  
  2251. #define INTERNET_ERROR_LAST                     ERROR_INTERNET_UNABLE_TO_CACHE_FILE
  2252.  
  2253. //#endif // !defined(_WINERROR_)
  2254.  
  2255. //
  2256. // URLCACHE APIs
  2257. //
  2258.  
  2259. #if !defined(_WINX32_) && !defined(_URLCACHEAPI_)
  2260. #define URLCACHEAPI DECLSPEC_IMPORT
  2261. #else
  2262. #define URLCACHEAPI
  2263. #endif
  2264.  
  2265. //
  2266. // datatype definitions.
  2267. //
  2268.  
  2269. //
  2270. // cache entry type flags.
  2271. //
  2272.  
  2273. #define NORMAL_CACHE_ENTRY      0x00000001
  2274. #define STABLE_CACHE_ENTRY      0x00000002
  2275. #define STICKY_CACHE_ENTRY      0x00000004
  2276.  
  2277. #define SPARSE_CACHE_ENTRY      0x00010000
  2278. #define OCX_CACHE_ENTRY         0x00020000
  2279.  
  2280. #define COOKIE_CACHE_ENTRY      0x00100000
  2281. #define URLHISTORY_CACHE_ENTRY  0x00200000
  2282.  
  2283. //
  2284. // INTERNET_CACHE_ENTRY_INFO -
  2285. //
  2286.  
  2287. typedef struct _INTERNET_CACHE_ENTRY_INFOA {
  2288.     DWORD dwStructSize;         // version of cache system. ?? do we need this for all entries?
  2289.     LPSTR lpszSourceUrlName;    // embedded pointer to the URL name string.
  2290.     LPSTR   lpszLocalFileName;  // embedded pointer to the local file name.
  2291.     DWORD CacheEntryType;       // cache type bit mask.
  2292.     DWORD dwUseCount;           // current users count of the cache entry.
  2293.     DWORD dwHitRate;            // num of times the cache entry was retrieved.
  2294.     DWORD dwSizeLow;            // low DWORD of the file size.
  2295.     DWORD dwSizeHigh;           // high DWORD of the file size.
  2296.     FILETIME LastModifiedTime;  // last modified time of the file in GMT format.
  2297.     FILETIME ExpireTime;        // expire time of the file in GMT format
  2298.     FILETIME LastAccessTime;    // last accessed time in GMT format
  2299.     FILETIME LastSyncTime;      // last time the URL was synchronized
  2300.                                 // with the source
  2301.     LPBYTE lpHeaderInfo;        // embedded pointer to the header info.
  2302.     DWORD dwHeaderInfoSize;     // size of the above header.
  2303.     LPSTR   lpszFileExtension;  // File extension used to retrive the urldata as a file.
  2304.     DWORD dwReserved;           // reserved for future use.
  2305. } INTERNET_CACHE_ENTRY_INFOA, * LPINTERNET_CACHE_ENTRY_INFOA;
  2306. typedef struct _INTERNET_CACHE_ENTRY_INFOW {
  2307.     DWORD dwStructSize;         // version of cache system. ?? do we need this for all entries?
  2308.     LPSTR lpszSourceUrlName;    // embedded pointer to the URL name string.
  2309.     LPWSTR  lpszLocalFileName;  // embedded pointer to the local file name.
  2310.     DWORD CacheEntryType;       // cache type bit mask.
  2311.     DWORD dwUseCount;           // current users count of the cache entry.
  2312.     DWORD dwHitRate;            // num of times the cache entry was retrieved.
  2313.     DWORD dwSizeLow;            // low DWORD of the file size.
  2314.     DWORD dwSizeHigh;           // high DWORD of the file size.
  2315.     FILETIME LastModifiedTime;  // last modified time of the file in GMT format.
  2316.     FILETIME ExpireTime;        // expire time of the file in GMT format
  2317.     FILETIME LastAccessTime;    // last accessed time in GMT format
  2318.     FILETIME LastSyncTime;      // last time the URL was synchronized
  2319.                                 // with the source
  2320.     LPBYTE lpHeaderInfo;        // embedded pointer to the header info.
  2321.     DWORD dwHeaderInfoSize;     // size of the above header.
  2322.     LPWSTR  lpszFileExtension;  // File extension used to retrive the urldata as a file.
  2323.     DWORD dwReserved;           // reserved for future use.
  2324. } INTERNET_CACHE_ENTRY_INFOW, * LPINTERNET_CACHE_ENTRY_INFOW;
  2325. #ifdef UNICODE
  2326. typedef INTERNET_CACHE_ENTRY_INFOW INTERNET_CACHE_ENTRY_INFO;
  2327. typedef LPINTERNET_CACHE_ENTRY_INFOW LPINTERNET_CACHE_ENTRY_INFO;
  2328. #else
  2329. typedef INTERNET_CACHE_ENTRY_INFOA INTERNET_CACHE_ENTRY_INFO;
  2330. typedef LPINTERNET_CACHE_ENTRY_INFOA LPINTERNET_CACHE_ENTRY_INFO;
  2331. #endif // UNICODE
  2332.  
  2333. //
  2334. // Cache APIs
  2335. //
  2336.  
  2337. URLCACHEAPI
  2338. BOOL
  2339. WINAPI
  2340. CreateUrlCacheEntryA(
  2341.     IN LPCSTR lpszUrlName,
  2342.     IN DWORD dwExpectedFileSize,
  2343.     IN LPCSTR lpszFileExtension,
  2344.     OUT LPSTR lpszFileName,
  2345.     IN DWORD dwReserved
  2346.     );
  2347. URLCACHEAPI
  2348. BOOL
  2349. WINAPI
  2350. CreateUrlCacheEntryW(
  2351.     IN LPCSTR lpszUrlName,
  2352.     IN DWORD dwExpectedFileSize,
  2353.     IN LPCSTR lpszFileExtension,
  2354.     OUT LPWSTR lpszFileName,
  2355.     IN DWORD dwReserved
  2356.     );
  2357. #ifdef UNICODE
  2358. #define CreateUrlCacheEntry  CreateUrlCacheEntryW
  2359. #else
  2360. #define CreateUrlCacheEntry  CreateUrlCacheEntryA
  2361. #endif // !UNICODE
  2362.  
  2363. URLCACHEAPI
  2364. BOOL
  2365. WINAPI
  2366. CommitUrlCacheEntryA(
  2367.     IN LPCSTR lpszUrlName,
  2368.     IN LPCSTR lpszLocalFileName,
  2369.     IN FILETIME ExpireTime,
  2370.     IN FILETIME LastModifiedTime,
  2371.     IN DWORD CacheEntryType,
  2372.     IN LPBYTE lpHeaderInfo,
  2373.     IN DWORD dwHeaderSize,
  2374.     IN LPCTSTR lpszFileExtension,
  2375.     IN DWORD dwReserved
  2376.     );
  2377. URLCACHEAPI
  2378. BOOL
  2379. WINAPI
  2380. CommitUrlCacheEntryW(
  2381.     IN LPCSTR lpszUrlName,
  2382.     IN LPCWSTR lpszLocalFileName,
  2383.     IN FILETIME ExpireTime,
  2384.     IN FILETIME LastModifiedTime,
  2385.     IN DWORD CacheEntryType,
  2386.     IN LPBYTE lpHeaderInfo,
  2387.     IN DWORD dwHeaderSize,
  2388.     IN LPCTSTR lpszFileExtension,
  2389.     IN DWORD dwReserved
  2390.     );
  2391. #ifdef UNICODE
  2392. #define CommitUrlCacheEntry  CommitUrlCacheEntryW
  2393. #else
  2394. #define CommitUrlCacheEntry  CommitUrlCacheEntryA
  2395. #endif // !UNICODE
  2396.  
  2397. URLCACHEAPI
  2398. BOOL
  2399. WINAPI
  2400. RetrieveUrlCacheEntryFileA(
  2401.     IN LPCSTR  lpszUrlName,
  2402.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2403.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize,
  2404.     IN DWORD dwReserved
  2405.     );
  2406. URLCACHEAPI
  2407. BOOL
  2408. WINAPI
  2409. RetrieveUrlCacheEntryFileW(
  2410.     IN LPCSTR  lpszUrlName,
  2411.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2412.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize,
  2413.     IN DWORD dwReserved
  2414.     );
  2415. #ifdef UNICODE
  2416. #define RetrieveUrlCacheEntryFile  RetrieveUrlCacheEntryFileW
  2417. #else
  2418. #define RetrieveUrlCacheEntryFile  RetrieveUrlCacheEntryFileA
  2419. #endif // !UNICODE
  2420.  
  2421. URLCACHEAPI
  2422. BOOL
  2423. WINAPI
  2424. UnlockUrlCacheEntryFile(
  2425.     IN LPCSTR lpszUrlName,
  2426.     IN DWORD dwReserved
  2427.     );
  2428.  
  2429. URLCACHEAPI
  2430. HANDLE
  2431. WINAPI
  2432. RetrieveUrlCacheEntryStreamA(
  2433.     IN LPCSTR  lpszUrlName,
  2434.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2435.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize,
  2436.     IN BOOL fRandomRead,
  2437.     IN DWORD dwReserved
  2438.     );
  2439. URLCACHEAPI
  2440. HANDLE
  2441. WINAPI
  2442. RetrieveUrlCacheEntryStreamW(
  2443.     IN LPCSTR  lpszUrlName,
  2444.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2445.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize,
  2446.     IN BOOL fRandomRead,
  2447.     IN DWORD dwReserved
  2448.     );
  2449. #ifdef UNICODE
  2450. #define RetrieveUrlCacheEntryStream  RetrieveUrlCacheEntryStreamW
  2451. #else
  2452. #define RetrieveUrlCacheEntryStream  RetrieveUrlCacheEntryStreamA
  2453. #endif // !UNICODE
  2454.  
  2455. URLCACHEAPI
  2456. BOOL
  2457. WINAPI
  2458. ReadUrlCacheEntryStream(
  2459.     IN HANDLE hUrlCacheStream,
  2460.     IN DWORD dwLocation,
  2461.     IN OUT LPVOID lpBuffer,
  2462.     IN OUT LPDWORD lpdwLen,
  2463.     IN DWORD Reserved
  2464.     );
  2465.  
  2466. URLCACHEAPI
  2467. BOOL
  2468. WINAPI
  2469. UnlockUrlCacheEntryStream(
  2470.     IN HANDLE hUrlCacheStream,
  2471.     IN DWORD Reserved
  2472.     );
  2473.  
  2474. URLCACHEAPI
  2475. BOOL
  2476. WINAPI
  2477. GetUrlCacheEntryInfoA(
  2478.     IN LPCSTR lpszUrlName,
  2479.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2480.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize
  2481.     );
  2482. URLCACHEAPI
  2483. BOOL
  2484. WINAPI
  2485. GetUrlCacheEntryInfoW(
  2486.     IN LPCSTR lpszUrlName,
  2487.     OUT LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2488.     IN OUT LPDWORD lpdwCacheEntryInfoBufferSize
  2489.     );
  2490. #ifdef UNICODE
  2491. #define GetUrlCacheEntryInfo  GetUrlCacheEntryInfoW
  2492. #else
  2493. #define GetUrlCacheEntryInfo  GetUrlCacheEntryInfoA
  2494. #endif // !UNICODE
  2495.  
  2496. #define CACHE_ENTRY_ATTRIBUTE_FC    0x00000004
  2497. #define CACHE_ENTRY_HITRATE_FC      0x00000010
  2498. #define CACHE_ENTRY_MODTIME_FC      0x00000040
  2499. #define CACHE_ENTRY_EXPTIME_FC      0x00000080
  2500. #define CACHE_ENTRY_ACCTIME_FC      0x00000100
  2501. #define CACHE_ENTRY_SYNCTIME_FC     0x00000200
  2502. #define CACHE_ENTRY_HEADERINFO_FC   0x00000400
  2503.  
  2504. URLCACHEAPI
  2505. BOOL
  2506. WINAPI
  2507. SetUrlCacheEntryInfoA(
  2508.     IN LPCSTR lpszUrlName,
  2509.     IN LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2510.     IN DWORD dwFieldControl
  2511.     );
  2512. URLCACHEAPI
  2513. BOOL
  2514. WINAPI
  2515. SetUrlCacheEntryInfoW(
  2516.     IN LPCSTR lpszUrlName,
  2517.     IN LPINTERNET_CACHE_ENTRY_INFO lpCacheEntryInfo,
  2518.     IN DWORD dwFieldControl
  2519.     );
  2520. #ifdef UNICODE
  2521. #define SetUrlCacheEntryInfo  SetUrlCacheEntryInfoW
  2522. #else
  2523. #define SetUrlCacheEntryInfo  SetUrlCacheEntryInfoA
  2524. #endif // !UNICODE
  2525.  
  2526. URLCACHEAPI
  2527. HANDLE
  2528. WINAPI
  2529. FindFirstUrlCacheEntryA(
  2530.     IN LPCSTR lpszUrlSearchPattern,
  2531.     OUT LPINTERNET_CACHE_ENTRY_INFO lpFirstCacheEntryInfo,
  2532.     IN OUT LPDWORD lpdwFirstCacheEntryInfoBufferSize
  2533.     );
  2534. URLCACHEAPI
  2535. HANDLE
  2536. WINAPI
  2537. FindFirstUrlCacheEntryW(
  2538.     IN LPCSTR lpszUrlSearchPattern,
  2539.     OUT LPINTERNET_CACHE_ENTRY_INFO lpFirstCacheEntryInfo,
  2540.     IN OUT LPDWORD lpdwFirstCacheEntryInfoBufferSize
  2541.     );
  2542. #ifdef UNICODE
  2543. #define FindFirstUrlCacheEntry  FindFirstUrlCacheEntryW
  2544. #else
  2545. #define FindFirstUrlCacheEntry  FindFirstUrlCacheEntryA
  2546. #endif // !UNICODE
  2547.  
  2548. URLCACHEAPI
  2549. BOOL
  2550. WINAPI
  2551. FindNextUrlCacheEntryA(
  2552.     IN HANDLE hEnumHandle,
  2553.     OUT LPINTERNET_CACHE_ENTRY_INFO lpNextCacheEntryInfo,
  2554.     IN OUT LPDWORD lpdwNextCacheEntryInfoBufferSize
  2555.     );
  2556. URLCACHEAPI
  2557. BOOL
  2558. WINAPI
  2559. FindNextUrlCacheEntryW(
  2560.     IN HANDLE hEnumHandle,
  2561.     OUT LPINTERNET_CACHE_ENTRY_INFO lpNextCacheEntryInfo,
  2562.     IN OUT LPDWORD lpdwNextCacheEntryInfoBufferSize
  2563.     );
  2564. #ifdef UNICODE
  2565. #define FindNextUrlCacheEntry  FindNextUrlCacheEntryW
  2566. #else
  2567. #define FindNextUrlCacheEntry  FindNextUrlCacheEntryA
  2568. #endif // !UNICODE
  2569.  
  2570. URLCACHEAPI
  2571. BOOL
  2572. WINAPI
  2573. FindCloseUrlCache(
  2574.     IN HANDLE hEnumHandle
  2575.     );
  2576.  
  2577. URLCACHEAPI
  2578. BOOL
  2579. WINAPI
  2580. DeleteUrlCacheEntry(
  2581.     IN LPCSTR lpszUrlName
  2582.     );
  2583.  
  2584. #if defined(__cplusplus)
  2585. }
  2586. #endif
  2587.  
  2588. /*
  2589.  * Return packing to whatever it was before we
  2590.  * entered this file
  2591.  */
  2592. #pragma pack(pop, wininet)
  2593.  
  2594. #endif // !defined(_WININET_)
  2595.