Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

143 lines
4.0 KiB

  1. /*****************************************************************************\
  2. * MODULE: inetwrap.h
  3. *
  4. * Header file for wininet wrapper routines. Until the library can support
  5. * Unicode, this module is necessary for NT.
  6. *
  7. * Copyright (C) 1996-1997 Microsoft Corporation
  8. * Copyright (C) 1996-1997 Hewlett Packard
  9. *
  10. * History:
  11. * 07-Oct-1996 HWP-Guys Initiated port from win95 to winNT
  12. * 15-Jul-1998 v-chrisw Allow safe DelayLoad of wininet.
  13. *
  14. \*****************************************************************************/
  15. #ifndef INETWRAP_H
  16. #define INETWRAP_H
  17. #define WCtoMB(pszUStr, pszAStr, uSize) \
  18. WideCharToMultiByte(CP_ACP, \
  19. 0, \
  20. (LPWSTR)pszUStr, \
  21. -1, \
  22. (LPSTR)pszAStr, \
  23. uSize, \
  24. NULL, \
  25. NULL)
  26. HINTERNET wrapInternetOpen(
  27. LPCTSTR lpszAgent,
  28. DWORD dwAccess,
  29. LPCTSTR lpszProxyName,
  30. LPCTSTR lpszProxyBypass,
  31. DWORD dwFlags);
  32. HINTERNET wrapInternetOpenUrl(
  33. HINTERNET hInternet,
  34. LPCTSTR lpszUrl,
  35. LPCTSTR lpszHeaders,
  36. DWORD dwHeaderLen,
  37. DWORD dwFlags,
  38. DWORD_PTR dwContext);
  39. HINTERNET wrapInternetConnect(
  40. HINTERNET hSession,
  41. LPCTSTR lpszServerName,
  42. INTERNET_PORT nServerPort,
  43. LPCTSTR lpszUserName,
  44. LPCTSTR lpszPassword,
  45. DWORD dwService,
  46. DWORD dwFlags,
  47. DWORD_PTR dwContext);
  48. BOOL wrapHttpQueryInfo(
  49. HINTERNET hRequest,
  50. DWORD dwInfoLevel,
  51. LPVOID lpvBuffer,
  52. LPDWORD lpdwBufferLen,
  53. LPDWORD lpdwIndex);
  54. BOOL wrapHttpSendRequest(
  55. HINTERNET hRequest,
  56. LPCTSTR lpszHeaders,
  57. DWORD dwHeaderLen,
  58. LPVOID lpvOptional,
  59. DWORD dwOptionalLen);
  60. BOOL wrapHttpSendRequestEx(
  61. HINTERNET hRequest,
  62. LPINTERNET_BUFFERS lpBufIn,
  63. LPINTERNET_BUFFERS lpBufOut,
  64. DWORD dwFlags,
  65. DWORD_PTR dwContext);
  66. HINTERNET wrapHttpOpenRequest(
  67. HINTERNET hConnect,
  68. LPCTSTR lpszVerb,
  69. LPCTSTR lpszObjectName,
  70. LPCTSTR lpszVersion,
  71. LPCTSTR lpszReferer,
  72. LPCTSTR *lplpszAccept,
  73. DWORD dwFlags,
  74. DWORD_PTR dwContext);
  75. BOOL wrapHttpAddRequestHeaders(
  76. HINTERNET hRequest,
  77. LPCTSTR lpszHeaders,
  78. DWORD cbLength,
  79. DWORD dwModifiers);
  80. BOOL wrapHttpEndRequest(
  81. HINTERNET hRequest,
  82. LPINTERNET_BUFFERS lpBuf,
  83. DWORD dwFlags,
  84. DWORD_PTR dwContext);
  85. BOOL wrapInternetSetOption(
  86. HINTERNET hRequest,
  87. IN DWORD dwOption,
  88. IN LPVOID lpBuffer,
  89. IN DWORD dwBufferLength);
  90. BOOL wrapInternetCloseHandle(
  91. HINTERNET hHandle);
  92. BOOL wrapInternetReadFile(
  93. HINTERNET hRequest,
  94. LPVOID lpvBuffer,
  95. DWORD cbBuffer,
  96. LPDWORD lpcbRd);
  97. BOOL wrapInternetWriteFile(
  98. HINTERNET hRequest,
  99. LPVOID lpvBuffer,
  100. DWORD cbBuffer,
  101. LPDWORD lpcbWr);
  102. DWORD wrapInternetErrorDlg(
  103. HWND hWnd,
  104. HINTERNET hReq,
  105. DWORD dwError,
  106. DWORD dwFlags,
  107. LPVOID pvParam);
  108. #define InetInternetOpen wrapInternetOpen
  109. #define InetInternetOpenUrl wrapInternetOpenUrl
  110. #define InetInternetConnect wrapInternetConnect
  111. #define InetHttpQueryInfo wrapHttpQueryInfo
  112. #define InetHttpSendRequest wrapHttpSendRequest
  113. #define InetHttpSendRequestEx wrapHttpSendRequestEx
  114. #define InetHttpOpenRequest wrapHttpOpenRequest
  115. #define InetHttpAddRequestHeaders wrapHttpAddRequestHeaders
  116. #define InetHttpEndRequest wrapHttpEndRequest
  117. #define InetInternetSetOption wrapInternetSetOption
  118. #define InetInternetCloseHandle wrapInternetCloseHandle
  119. #define InetInternetReadFile wrapInternetReadFile
  120. #define InetInternetWriteFile wrapInternetWriteFile
  121. #define InetInternetErrorDlg wrapInternetErrorDlg
  122. #endif