Source code of Windows XP (NT5)
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.

77 lines
3.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1997.
  5. //
  6. // File: N C I N E T . H
  7. //
  8. // Contents: Wrappers for the WinInet APIs so they return HRESULTs
  9. //
  10. // Notes:
  11. //
  12. // Author: danielwe 11 Oct 1999
  13. //
  14. //----------------------------------------------------------------------------
  15. #include <wininet.h>
  16. HRESULT HrLoadWinInetDll();
  17. HRESULT HrInternetCloseHandle(HINTERNET hInternet);
  18. HINTERNET HinInternetOpenA(IN LPCSTR lpszAgent, IN DWORD dwAccessType,
  19. IN LPCSTR lpszProxyName, IN LPCSTR lpszProxyBypass,
  20. IN DWORD dwFlags);
  21. HRESULT HrInternetCrackUrlA(IN LPCSTR lpszUrl, IN DWORD dwUrlLength,
  22. IN DWORD dwFlags,
  23. IN OUT LPURL_COMPONENTSA lpUrlComponents);
  24. HINTERNET HinInternetConnectA(IN HINTERNET hInternet, IN LPCSTR lpszServerName,
  25. IN INTERNET_PORT nServerPort,
  26. IN LPCSTR lpszUserName OPTIONAL,
  27. IN LPCSTR lpszPassword OPTIONAL,
  28. IN DWORD dwService, IN DWORD dwFlags,
  29. IN DWORD_PTR dwContext);
  30. HINTERNET HinHttpOpenRequestA(IN HINTERNET hConnect, IN LPCSTR lpszVerb,
  31. IN LPCSTR lpszObjectName, IN LPCSTR lpszVersion,
  32. IN LPCSTR lpszReferrer OPTIONAL,
  33. IN LPCSTR FAR * lplpszAcceptTypes OPTIONAL,
  34. IN DWORD dwFlags, IN DWORD_PTR dwContext);
  35. HRESULT HrHttpAddRequestHeadersA(IN HINTERNET hRequest, IN LPCSTR lpszHeaders,
  36. IN DWORD dwHeadersLength, IN DWORD dwModifiers);
  37. HRESULT HrHttpSendRequestA(IN HINTERNET hRequest, IN LPCSTR lpszHeaders OPTIONAL,
  38. IN DWORD dwHeadersLength, IN LPVOID lpOptional OPTIONAL,
  39. IN DWORD dwOptionalLength);
  40. HRESULT HrHttpSendRequestExA(IN HINTERNET hRequest,
  41. IN LPINTERNET_BUFFERSA lpBuffersIn OPTIONAL,
  42. OUT LPINTERNET_BUFFERSA lpBuffersOut OPTIONAL,
  43. IN DWORD dwFlags, IN DWORD_PTR dwContext);
  44. HRESULT HrInternetWriteFile(IN HINTERNET hFile, IN LPCVOID lpBuffer,
  45. IN DWORD dwNumberOfBytesToWrite,
  46. OUT LPDWORD lpdwNumberOfBytesWritten);
  47. HRESULT HrHttpEndRequest(IN HINTERNET hRequest,
  48. OUT LPINTERNET_BUFFERSA lpBuffersOut OPTIONAL,
  49. IN DWORD dwFlags, IN DWORD_PTR dwContext);
  50. HRESULT HrHttpQueryInfo(IN HINTERNET hRequest, IN DWORD dwInfoLevel,
  51. IN OUT LPVOID lpBuffer OPTIONAL,
  52. IN OUT LPDWORD lpdwBufferLength,
  53. IN OUT LPDWORD lpdwIndex OPTIONAL);
  54. HRESULT HrInternetSetStatusCallback(IN HINTERNET hInternet,
  55. IN INTERNET_STATUS_CALLBACK lpfnInternetCallback);
  56. HRESULT HrGetRequestUriA(LPCSTR szUrl, DWORD cbUri, LPSTR szUri);
  57. VOID InitializeNcInet(VOID);
  58. VOID UnInitializeNcInet(VOID);
  59. HRESULT HrFreeWinInetDll(VOID);
  60. HRESULT HrEnsureWinInetLoaded(VOID);