autoprox.hxx
Upload User: caisha3
Upload Date: 2013-09-21
Package Size: 208739k
Code Size: 3k
Category:

Windows Develop

Development Platform:

Visual C++

  1. /*++
  2. Copyright (c) 1996  Microsoft Corporation
  3. Module Name:
  4.     autoprox.hxx
  5. Abstract:
  6.     Contains interface definition for a specialized DLL that automatically configurares WININET proxy
  7.       information. The DLL can reroute proxy infromation based on a downloaded set of data that matches
  8.       it registered MIME type.  The DLL can also control WININET proxy use, on a request by request basis.
  9.     Contents:
  10. Author:
  11.     Arthur L Bierer (arthurbi) 01-Dec-1996
  12. Revision History:
  13.     01-Dec-1996 arthurbi
  14.         Created
  15. --*/
  16. #ifndef _AUTOPROX_HXX_
  17. #define _AUTOPROX_HXX_
  18. //
  19. // Callback functions implimented in WININET
  20. //
  21. #define INTERNET_MAX_URL_LENGTH 2049
  22. class AUTO_PROXY_HELPER_APIS {
  23. public:
  24.     virtual
  25.     BOOL IsResolvable(
  26.         IN LPSTR lpszHost
  27.         );
  28.     
  29.     virtual
  30.     DWORD GetIPAddress(
  31.         IN OUT LPSTR   lpszIPAddress,
  32.         IN OUT LPDWORD lpdwIPAddressSize
  33.         );
  34.     virtual
  35.     DWORD ResolveHostName(
  36.         IN LPSTR lpszHostName,
  37.         IN OUT LPSTR   lpszIPAddress,
  38.         IN OUT LPDWORD lpdwIPAddressSize
  39.         );
  40.     virtual
  41.     BOOL IsInNet(
  42.         IN LPSTR   lpszIPAddress,
  43.         IN LPSTR   lpszDest,
  44.         IN LPSTR   lpszMask
  45.         );
  46. };
  47.     
  48. //
  49. // external func declariations, note that the DLL does not have to export the full set of these 
  50. //  functions, rather the DLL can export only the functions it impliments.
  51. // 
  52. /*
  53. BOOL
  54. CALLBACK
  55. InternetProxyInfoInvalid (  // NOT implimented
  56.     IN LPSTR lpszMime,
  57.     IN LPSTR lpszUrl,
  58.     IN DWORD dwUrlLength,
  59.     IN LPSTR lpszProxyHostName,
  60.     IN DWORD dwProxyHostNameLength
  61.     );
  62. */
  63. #ifdef unix
  64. extern "C"
  65. #endif /* unix */
  66. BOOL
  67. CALLBACK
  68. InternetDeInitializeAutoProxyDll(
  69.     IN LPSTR lpszMime,
  70.     IN DWORD dwReserved
  71.     );
  72. #ifdef unix
  73. extern "C"
  74. #endif /* unix */
  75. BOOL
  76. CALLBACK
  77. InternetGetProxyInfo(
  78.     IN LPCSTR lpszUrl,
  79.     IN DWORD dwUrlLength,
  80.     IN LPSTR lpszUrlHostName,
  81.     IN DWORD dwUrlHostNameLength,
  82.     OUT LPSTR * lplpszProxyHostName,
  83.     OUT LPDWORD lpdwProxyHostNameLength
  84.     ) ;
  85. /*
  86. BOOL
  87. CALLBACK
  88. InternetGetProxyInfoEx(
  89.     IN INTERNET_SCHEME tUrlProtocol,
  90.     IN LPCSTR lpszUrl,
  91.     IN DWORD dwUrlLength,
  92.     IN LPSTR lpszUrlHostName,
  93.     IN DWORD dwUrlHostNameLength,
  94.     IN INTERNET_PORT nUrlPort,
  95.     OUT LPINTERNET_SCHEME lptProxyScheme,
  96.     OUT LPSTR * lplpszProxyHostName,
  97.     OUT LPDWORD lpdwProxyHostNameLength,
  98.     OUT LPINTERNET_PORT lpProxyHostPort
  99.     ) ;
  100. */
  101. #ifdef unix
  102. extern "C"
  103. #endif /* unix */
  104. BOOL
  105. CALLBACK
  106. InternetInitializeAutoProxyDll(
  107.     IN DWORD                  dwVersion,
  108.     IN LPSTR                  lpszDownloadedTempFile,
  109.     IN LPSTR                  lpszMime,
  110.     IN AUTO_PROXY_HELPER_APIS *pAutoProxyCallbacks,
  111.     IN DWORD                  dwReserved
  112.     );
  113.  
  114. #endif /* _AUTOPROX_HXX_ */