' ########################################################################################
' Microsoft Windows
' File: UrlMon.inc
' Contents: URL monikers allow an application to bind a resource--which is specified by a
' URL--to a moniker.
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_UrlMon_PBI)
#DEFINE PBX_UrlMon_PBI
%EQUATE `URLMON_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/ObjIdl.inc"
#INCLUDE ONCE "Legacy/COM/OleIdl.inc"
#INCLUDE ONCE "Legacy/System/ServProv.inc"
#INCLUDE ONCE "Legacy/System/MSXML.inc"
'//=--------------------------------------------------------------------------=
'// UrlMon.h
'//=--------------------------------------------------------------------------=
'// Copyright (c) Microsoft Corporation. All rights reserved.
'//
'// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
'// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'// PARTICULAR PURPOSE.
'//=--------------------------------------------------------------------------=
'#pragma comment(lib,"uuid.lib")
'//---------------------------------------------------------------------------=
'// URL Moniker Interfaces.
'EXTERN_C const IID IID_IAsyncMoniker;
'EXTERN_C const IID CLSID_StdURLMoniker;
'EXTERN_C const IID CLSID_HttpProtocol;
'EXTERN_C const IID CLSID_FtpProtocol;
'EXTERN_C const IID CLSID_GopherProtocol;
'EXTERN_C const IID CLSID_HttpSProtocol;
'EXTERN_C const IID CLSID_FileProtocol;
'EXTERN_C const IID CLSID_MkProtocol;
'EXTERN_C const IID CLSID_StdURLProtocol;
'EXTERN_C const IID CLSID_UrlMkBindCtx;
'EXTERN_C const IID CLSID_StdEncodingFilterFac;
'EXTERN_C const IID CLSID_DeCompMimeFilter;
'EXTERN_C const IID CLSID_CdlProtocol;
'EXTERN_C const IID CLSID_ClassInstallFilter;
'EXTERN_C const IID IID_IAsyncBindCtx;
$IID_IAsyncBindCtx = GUID$("{79EAC9D4-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_StdURLMoniker = GUID$("{79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_HttpProtocol = GUID$("{79EAC9E2-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_FtpProtocol = GUID$("{79EAC9E3-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_GopherProtocol = GUID$("{79EAC9E4-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_HttpSProtocol = GUID$("{79EAC9E5-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_FileProtocol = GUID$("{79EAC9E7-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_MkProtocol = GUID$("{79EAC9E6-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_StdURLProtocol = GUID$("{79EAC9E1-BAF9-11CE-8C82-00AA004BA90B}")
$CLSID_UrlMkBindCtx = GUID$("{F2C9EA79-F9BA-CE11-8C82-00AA004BA90B}")
$CLSID_StdEncodingFilterFac = GUID$("{D07CC354-44D9-D011-A9F4-006097942311}")
$CLSID_DeCompMimeFilter = GUID$("{60036B8F-0DB8-D011-A9B3-006097942311}")
$CLSID_CdlProtocol = GUID$("{3DD53D40-7B8B-11D0-B013-00AA0059CE02}")
$CLSID_ClassInstallFilter = GUID$("{BB33B532-AEED-D011-BD5A-00AA00B92AF1}")
'#define SZ_URLCONTEXT OLESTR("URL Context")
'#define SZ_ASYNC_CALLEE OLESTR("AsyncCallee")
$SZ_URLCONTEXT = "URL Context"
$SZ_ASYNC_CALLEE = "AsyncCallee"
%EQUATE `MKSYS_URLMONIKER = 6
%EQUATE `URL_MK_LEGACY = 0
%EQUATE `URL_MK_UNIFORM = 1
%EQUATE `URL_MK_NO_CANONICALIZE = 2
'// Side-by-Side clsid
'EXTERN_C const IID CLSID_SBS_StdURLMoniker;
'EXTERN_C const IID CLSID_SBS_HttpProtocol;
'EXTERN_C const IID CLSID_SBS_FtpProtocol;
'EXTERN_C const IID CLSID_SBS_GopherProtocol;
'EXTERN_C const IID CLSID_SBS_HttpSProtocol;
'EXTERN_C const IID CLSID_SBS_FileProtocol;
'EXTERN_C const IID CLSID_SBS_MkProtocol;
'EXTERN_C const IID CLSID_SBS_UrlMkBindCtx;
'EXTERN_C const IID CLSID_SBS_SoftDistExt;
'EXTERN_C const IID CLSID_SBS_StdEncodingFilterFac;
'EXTERN_C const IID CLSID_SBS_DeCompMimeFilter;
'EXTERN_C const IID CLSID_SBS_CdlProtocol;
'EXTERN_C const IID CLSID_SBS_ClassInstallFilter;
'EXTERN_C const IID CLSID_SBS_InternetSecurityManager;
'EXTERN_C const IID CLSID_SBS_InternetZoneManager;
'// END Side-by-Side clsid
$CLSID_SBS_StdURLMoniker = $CLSID_StdURLMoniker
$CLSID_SBS_HttpProtocol = $CLSID_HttpProtocol
$CLSID_SBS_FtpProtocol = $CLSID_FtpProtocol
$CLSID_SBS_GopherProtocol = $CLSID_GopherProtocol
$CLSID_SBS_HttpSProtocol = $CLSID_HttpSProtocol
$CLSID_SBS_FileProtocol = $CLSID_FileProtocol
$CLSID_SBS_MkProtocol = $CLSID_MkProtocol
$CLSID_SBS_UrlMkBindCtx = $CLSID_UrlMkBindCtx
$CLSID_SBS_StdEncodingFilterFac = $CLSID_StdEncodingFilterFac
$CLSID_SBS_DeCompMimeFilter = $CLSID_DeCompMimeFilter
$CLSID_SBS_CdlProtocol = $CLSID_CdlProtocol
$CLSID_SBS_ClassInstallFilter = $CLSID_ClassInstallFilter
'// These are for backwards compatibility with previous URLMON versions
'#define BINDF_DONTUSECACHE BINDF_GETNEWESTVERSION
'#define BINDF_DONTPUTINCACHE BINDF_NOWRITECACHE
'#define BINDF_NOCOPYDATA BINDF_PULLDATA
'#define INVALID_P_ROOT_SECURITY_ID ((BYTE*)-1)
'#define PI_DOCFILECLSIDLOOKUP PI_CLSIDLOOKUP
%EQUATE `INVALID_P_ROOT_SECURITY_ID = -1 ' ((BYTE*)-1)
DECLARE FUNCTION CreateURLMoniker LIB "urlmon.dll" ALIAS "CreateURLMoniker" ( BYVAL pmkContext AS IMoniker , BYREF szURL AS WSTRINGZ , BYREF ppmk AS IMoniker ) AS LONG
DECLARE FUNCTION CreateURLMonikerEx LIB "urlmon.dll" ALIAS "CreateURLMonikerEx" ( BYVAL pMkCtx AS IMoniker
 , BYREF szURL AS WSTRINGZ
 , BYREF ppmk AS IMoniker
 , BYVAL dwFlags AS DWORD
 ) AS LONG
' Not implemented.
'STDAPI GetClassURL(LPCWSTR szURL, CLSID *pClsID);
'DECLARE FUNCTION GetClassURL LIB "urlmon.dll" ALIAS "GetClassURL" ( ' , BYREF szURL AS WSTRINGZ
' , BYREF pClsID AS GUID
' ) AS LONG
DECLARE FUNCTION CreateAsyncBindCtx LIB "urlmon.dll" ALIAS "CreateAsyncBindCtx" ( BYVAL reserved AS DWORD
 , BYVAL pbscb AS IBindStatusCallback
 , BYVAL pEFetc AS IEnumFORMATETC
 , BYREF ppbc AS IBindCtx
 ) AS LONG
'#if (_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CreateURLMonikerEx2 LIB "urlmon.dll" ALIAS "CreateURLMonikerEx2" ( BYVAL pMkCtx AS IMoniker , BYVAL pUri AS IUri , BYREF ppmk AS IMoniker , BYVAL dwFlags AS QUAD ) AS LONG
'#endif
DECLARE FUNCTION CreateAsyncBindCtxEx LIB "urlmon.dll" ALIAS "CreateAsyncBindCtxEx" ( BYVAL pbc AS IBindCtx , BYVAL dwOptions AS QUAD , BYVAL pbscb AS IBindStatusCallback , BYVAL pEnum AS IEnumFORMATETC , BYREF ppbc AS IBindCtx , BYVAL reserved AS QUAD ) AS LONG
DECLARE FUNCTION MkParseDisplayNameEx LIB "urlmon.dll" ALIAS "MkParseDisplayNameEx" ( BYVAL pbc AS IBindCtx
 , BYREF szDisplayName AS WSTRINGZ
 , BYREF pchEaten AS DWORD
 , BYREF ppmk AS IMoniker
 ) AS LONG
DECLARE FUNCTION RegisterBindStatusCallback LIB "urlmon.dll" ALIAS "RegisterBindStatusCallback" ( BYVAL pbc AS IBindCtx
 , BYVAL pbscb AS IBindStatusCallback
 , BYREF ppBSCBPrev AS IBindStatusCallback
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION RevokeBindStatusCallback LIB "urlmon.dll" ALIAS "RevokeBindStatusCallback" ( BYVAL pbc AS IBindCtx
 , BYVAL pbscb AS IBindStatusCallback
 ) AS LONG
DECLARE FUNCTION GetClassFileOrMime LIB "urlmon.dll" ALIAS "GetClassFileOrMime" ( BYVAL pbc AS IBindCtx
 , BYREF szFilename AS WSTRINGZ
 , BYVAL pBuffer AS DWORD
 , BYVAL cbSize AS DWORD
 , BYREF szMime AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYREF pclsid AS GUID
 ) AS LONG
DECLARE FUNCTION IsValidURL LIB "urlmon.dll" ALIAS "IsValidURL" ( BYVAL pbc AS IBindCtx
 , BYREF szURL AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION CoGetClassObjectFromURL LIB "urlmon.dll" ALIAS "CoGetClassObjectFromURL" ( BYREF rclsid AS GUID
 , BYREF szCodeURL AS WSTRINGZ
 , BYVAL dwFileVersionMS AS DWORD
 , BYVAL dwFileVersionLS AS DWORD
 , BYREF szContentType AS WSTRINGZ
 , BYVAL pBindCtx AS IBindCtx
 , BYVAL dwClsContext AS DWORD
 , BYVAL pvReserved AS DWORD
 , BYREF riid AS GUID
 , BYREF ppv AS ANY
 ) AS LONG
DECLARE FUNCTION IEInstallScope LIB "urlmon.dll" ALIAS "IEInstallScope" ( BYREF pdwScope AS DWORD ) AS LONG '__ out LPDWORD pdwScope
DECLARE FUNCTION FaultInIEFeature LIB "urlmon.dll" ALIAS "FaultInIEFeature" ( BYVAL hWnd AS DWORD
 , BYREF pClassSpec AS uCLSSPEC
 , BYREF pQuery AS QUERYCONTEXT
 , BYVAL dwFlags AS DWORD
 ) AS LONG
DECLARE FUNCTION GetComponentIDFromCLSSPEC LIB "urlmon.dll" ALIAS "GetComponentIDFromCLSSPEC" ( BYREF pClassSpec AS uCLSSPEC
 , BYREF ppszComponentID AS ASCIIZ
 ) AS LONG
'// flags for FaultInIEFeature
%EQUATE `FIEF_FLAG_FORCE_JITUI = &H1 ' // force JIT ui even if
 ' // previoulsy rejected by
 ' // user in this session or
 ' // marked as Never Ask Again
%EQUATE `FIEF_FLAG_PEEK = &H2 ' // just peek, don't faultin
%EQUATE `FIEF_FLAG_SKIP_INSTALLED_VERSION_CHECK = &H4 ' // force JIT without checking local version
'//helper apis
DECLARE FUNCTION IsAsyncMoniker LIB "urlmon.dll" ALIAS "IsAsyncMoniker" ( BYVAL pmk AS IMoniker ) AS LONG
' Not currently implemented.
'STDAPI CreateURLBinding(LPCWSTR lpszUrl, IBindCtx *pbc, IBinding **ppBdg);
'DECLARE FUNCTION CreateURLBinding LIB "urlmon.dll" ALIAS "CreateURLBinding" ( ' BYREF lpszUrl AS WSTRINGZ
' , BYVAL pbc AS IBindCtx
' , BYREF ppBdg AS IBinding
' ) AS LONG
DECLARE FUNCTION RegisterMediaTypes LIB "urlmon.dll" ALIAS "RegisterMediaTypes" ( BYVAL ctypes AS DWORD
 , BYREF rgszTypes AS ASCIIZ
 , BYREF rgcfTypes AS DWORD
 ) AS LONG
DECLARE FUNCTION FindMediaType LIB "urlmon.dll" ALIAS "FindMediaType" ( BYREF rgszTypes AS ASCIIZ
 , BYREF rgcfTypes AS DWORD
 ) AS LONG
DECLARE FUNCTION CreateFormatEnumerator LIB "urlmon.dll" ALIAS "CreateFormatEnumerator" ( BYVAL cfmtetc AS DWORD
 , BYREF rgfmtetc AS FORMATETC
 , BYREF ppenumfmtetc AS IEnumFORMATETC
 ) AS LONG
DECLARE FUNCTION RegisterFormatEnumerator LIB "urlmon.dll" ALIAS "RegisterFormatEnumerator" ( BYVAL pbc AS IBindCtx
 , BYVAL pEFetc AS IEnumFORMATETC
 , BYVAL reserved AS DWORD
 ) AS LONG
DECLARE FUNCTION RevokeFormatEnumerator LIB "urlmon.dll" ALIAS "RevokeFormatEnumerator" ( BYVAL pbc AS IBindCtx
 , BYVAL pEFetc AS IEnumFORMATETC
 ) AS LONG
DECLARE FUNCTION RegisterMediaTypeClass LIB "urlmon.dll" ALIAS "RegisterMediaTypeClass" ( BYVAL pbc AS IBindCtx
 , BYVAL ctypes AS DWORD
 , BYREF rgszTypes AS ASCIIZ
 , BYREF rgclsID AS GUID
 , BYVAL reserved AS DWORD
 ) AS LONG
DECLARE FUNCTION FindMediaTypeClass LIB "urlmon.dll" ALIAS "FindMediaTypeClass" ( BYVAL pbc AS IBindCtx
 , BYREF szType AS ASCIIZ
 , BYREF pclsID AS GUID
 , BYVAL reserved AS DWORD
 ) AS LONG
DECLARE FUNCTION UrlMkSetSessionOption LIB "urlmon.dll" ALIAS "UrlMkSetSessionOption" ( BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYVAL dwBufferLength AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION UrlMkGetSessionOption LIB "urlmon.dll" ALIAS "UrlMkGetSessionOption" ( BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYVAL dwBufferLength AS DWORD
 , BYREF pdwBufferLength AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION FindMimeFromData LIB "urlmon.dll" ALIAS "FindMimeFromData" ( BYVAL pbc AS IBindCtx
 , BYREF pwzUrl AS WSTRINGZ
 , BYVAL pBuffer AS DWORD
 , BYVAL cbSize AS DWORD
 , BYREF pwzMimeProposed AS WSTRINGZ
 , BYVAL dwMimeFlags AS DWORD
 , BYREF ppwzMimeOut AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
%EQUATE `FMFD_DEFAULT = &H00000000
%EQUATE `FMFD_URLASFILENAME = &H00000001
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `FMFD_ENABLEMIMESNIFFING = &H00000002
%EQUATE `FMFD_IGNOREMIMETEXTPLAIN = &H00000004
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `FMFD_SERVERMIME = &H00000008
%EQUATE `UAS_EXACTLEGACY = &H00001000
DECLARE FUNCTION ObtainUserAgentString LIB "urlmon.dll" ALIAS "ObtainUserAgentString" ( BYVAL dwOption AS QUAD , BYREF pszUAOut AS ASCIIZ , BYVAL cbSize AS QUAD ) AS LONG
DECLARE FUNCTION CompareSecurityIds LIB "urlmon.dll" ALIAS "CompareSecurityIds" ( BYVAL pbSecurityId1 AS BYTE PTR
 , BYVAL dwLen1 AS DWORD
 , BYVAL pbSecurityId2 AS BYTE PTR
 , BYVAL dwLen2 AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION CompatFlagsFromClsid LIB "urlmon.dll" ALIAS "CompatFlagsFromClsid" ( BYREF pclsid AS GUID
 , BYREF pdwCompatFlags AS DWORD
 , BYREF pdwMiscStatusFlags AS DWORD
 ) AS LONG
'// URLMON-specific defines for UrlMkSetSessionOption() above
%EQUATE `URLMON_OPTION_USERAGENT = &H10000001
%EQUATE `URLMON_OPTION_USERAGENT_REFRESH = &H10000002
%EQUATE `URLMON_OPTION_URL_ENCODING = &H10000004
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `URLMON_OPTION_USE_BINDSTRINGCREDS = &H10000008
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
'#if (_WIN32_IE >= _WIN32_IE_IE70)
%EQUATE `URLMON_OPTION_USE_BROWSERAPPSDOCUMENTS = &H10000010
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#define CF_NULL 0
'#define CFSTR_MIME_NULL NULL
'#define CFSTR_MIME_TEXT (TEXT("text/plain"))
'#define CFSTR_MIME_RICHTEXT (TEXT("text/richtext"))
'#define CFSTR_MIME_X_BITMAP (TEXT("image/x-xbitmap"))
'#define CFSTR_MIME_POSTSCRIPT (TEXT("application/postscript"))
'#define CFSTR_MIME_AIFF (TEXT("audio/aiff"))
'#define CFSTR_MIME_BASICAUDIO (TEXT("audio/basic"))
'#define CFSTR_MIME_WAV (TEXT("audio/wav"))
'#define CFSTR_MIME_X_WAV (TEXT("audio/x-wav"))
'#define CFSTR_MIME_GIF (TEXT("image/gif"))
'#define CFSTR_MIME_PJPEG (TEXT("image/pjpeg"))
'#define CFSTR_MIME_JPEG (TEXT("image/jpeg"))
'#define CFSTR_MIME_TIFF (TEXT("image/tiff"))
'#define CFSTR_MIME_X_PNG (TEXT("image/x-png"))
'#define CFSTR_MIME_BMP (TEXT("image/bmp"))
'#define CFSTR_MIME_X_ART (TEXT("image/x-jg"))
'#define CFSTR_MIME_X_EMF (TEXT("image/x-emf"))
'#define CFSTR_MIME_X_WMF (TEXT("image/x-wmf"))
'#define CFSTR_MIME_AVI (TEXT("video/avi"))
'#define CFSTR_MIME_MPEG (TEXT("video/mpeg"))
'#define CFSTR_MIME_FRACTALS (TEXT("application/fractals"))
'#define CFSTR_MIME_RAWDATA (TEXT("application/octet-stream"))
'#define CFSTR_MIME_RAWDATASTRM (TEXT("application/octet-stream"))
'#define CFSTR_MIME_PDF (TEXT("application/pdf"))
'#define CFSTR_MIME_HTA (TEXT("application/hta"))
'#define CFSTR_MIME_X_AIFF (TEXT("audio/x-aiff"))
'#define CFSTR_MIME_X_REALAUDIO (TEXT("audio/x-pn-realaudio"))
'#define CFSTR_MIME_XBM (TEXT("image/xbm"))
'#define CFSTR_MIME_QUICKTIME (TEXT("video/quicktime"))
'#define CFSTR_MIME_X_MSVIDEO (TEXT("video/x-msvideo"))
'#define CFSTR_MIME_X_SGI_MOVIE (TEXT("video/x-sgi-movie"))
'#define CFSTR_MIME_HTML (TEXT("text/html"))
'#define CFSTR_MIME_XML (TEXT("text/xml"))
%EQUATE `CF_NULL = 0
%EQUATE `CFSTR_MIME_NULL = %NULL
$CFSTR_MIME_TEXT = "text/plain"
$CFSTR_MIME_RICHTEXT = "text/richtext"
$CFSTR_MIME_X_BITMAP = "image/x-xbitmap"
$CFSTR_MIME_POSTSCRIPT = "application/postscript"
$CFSTR_MIME_AIFF = "audio/aiff"
$CFSTR_MIME_BASICAUDIO = "audio/basic"
$CFSTR_MIME_WAV = "audio/wav"
$CFSTR_MIME_X_WAV = "audio/x-wav"
$CFSTR_MIME_GIF = "image/gif"
$CFSTR_MIME_PJPEG = "image/pjpeg"
$CFSTR_MIME_JPEG = "image/jpeg"
$CFSTR_MIME_TIFF = "image/tiff"
$CFSTR_MIME_X_PNG = "image/x-png"
$CFSTR_MIME_BMP = "image/bmp"
$CFSTR_MIME_X_ART = "image/x-jg"
$CFSTR_MIME_X_EMF = "image/x-emf"
$CFSTR_MIME_X_WMF = "image/x-wmf"
$CFSTR_MIME_AVI = "video/avi"
$CFSTR_MIME_MPEG = "video/mpeg"
$CFSTR_MIME_FRACTALS = "application/fractals"
$CFSTR_MIME_RAWDATA = "application/octet-stream"
$CFSTR_MIME_RAWDATASTRM = "application/octet-stream"
$CFSTR_MIME_PDF = "application/pdf"
$CFSTR_MIME_HTA = "application/hta"
$CFSTR_MIME_X_AIFF = "audio/x-aiff"
$CFSTR_MIME_X_REALAUDIO = "audio/x-pn-realaudio"
$CFSTR_MIME_XBM = "image/xbm"
$CFSTR_MIME_QUICKTIME = "video/quicktime"
$CFSTR_MIME_X_MSVIDEO = "video/x-msvideo"
$CFSTR_MIME_X_SGI_MOVIE = "video/x-sgi-movie"
$CFSTR_MIME_HTML = "text/html"
$CFSTR_MIME_XML = "text/xml"
'// MessageId: MK_S_ASYNCHRONOUS
'// MessageText: Operation is successful, but will complete asynchronously.
'//
'#define MK_S_ASYNCHRONOUS _HRESULT_TYPEDEF_(0x000401E8L)
'#ifndef S_ASYNCHRONOUS
'#define S_ASYNCHRONOUS MK_S_ASYNCHRONOUS
'#endif
'#ifndef E_PENDING
'#define E_PENDING _HRESULT_TYPEDEF_(0x8000000AL)
'#endif
%EQUATE `MK_S_ASYNCHRONOUS = &H000401E8&
#IF NOT %DEF(%S_ASYNCHRONOUS)
%EQUATE `S_ASYNCHRONOUS = %MK_S_ASYNCHRONOUS
#ENDIF
#IF NOT %DEF(%E_PENDING)
%EQUATE `E_PENDING = &H8000000A&
#ENDIF
'//
'//
'// WinINet and protocol specific errors are mapped to one of the following
'// error which are returned in IBSC::OnStopBinding
'//
'//
'// Note: FACILITY C is split into ranges of 1k
'// C0000 - C03FF INET_E_ (URLMON's original hresult)
'// C0400 - C07FF INET_E_CLIENT_xxx
'// C0800 - C0BFF INET_E_SERVER_xxx
'// C0C00 - C0FFF INET_E_????
'// C1000 - C13FF INET_E_AGENT_xxx (info delivery agents)
%EQUATE `INET_E_INVALID_URL = &H800C0002&
%EQUATE `INET_E_NO_SESSION = &H800C0003&
%EQUATE `INET_E_CANNOT_CONNECT = &H800C0004&
%EQUATE `INET_E_RESOURCE_NOT_FOUND = &H800C0005&
%EQUATE `INET_E_OBJECT_NOT_FOUND = &H800C0006&
%EQUATE `INET_E_DATA_NOT_AVAILABLE = &H800C0007&
%EQUATE `INET_E_DOWNLOAD_FAILURE = &H800C0008&
%EQUATE `INET_E_AUTHENTICATION_REQUIRED = &H800C0009&
%EQUATE `INET_E_NO_VALID_MEDIA = &H800C000A&
%EQUATE `INET_E_CONNECTION_TIMEOUT = &H800C000B&
%EQUATE `INET_E_INVALID_REQUEST = &H800C000C&
%EQUATE `INET_E_UNKNOWN_PROTOCOL = &H800C000D&
%EQUATE `INET_E_SECURITY_PROBLEM = &H800C000E&
%EQUATE `INET_E_CANNOT_LOAD_DATA = &H800C000F&
%EQUATE `INET_E_CANNOT_INSTANTIATE_OBJECT = &H800C0010&
%EQUATE `INET_E_INVALID_CERTIFICATE = &H800C0019&
%EQUATE `INET_E_REDIRECT_FAILED = &H800C0014&
%EQUATE `INET_E_REDIRECT_TO_DIR = &H800C0015&
%EQUATE `INET_E_CANNOT_LOCK_REQUEST = &H800C0016&
%EQUATE `INET_E_USE_EXTEND_BINDING = &H800C0017&
%EQUATE `INET_E_TERMINATED_BIND = &H800C0018&
%EQUATE `INET_E_RESERVED_1 = &H800C001A&
%EQUATE `INET_E_BLOCKED_REDIRECT_XSECURITYID = &H800C001B&
%EQUATE `INET_E_ERROR_FIRST = &H800C0002&
%EQUATE `INET_E_CODE_DOWNLOAD_DECLINED = &H800C0100&
%EQUATE `INET_E_RESULT_DISPATCHED = &H800C0200&
%EQUATE `INET_E_CANNOT_REPLACE_SFP_FILE = &H800C0300&
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `INET_E_CODE_INSTALL_SUPPRESSED = &H800C0400&
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `INET_E_CODE_INSTALL_BLOCKED_BY_HASH_POLICY = &H800C0500&
%EQUATE `INET_E_DOWNLOAD_BLOCKED_BY_INPRIVATE = &H800C0501&
%EQUATE `INET_E_ERROR_LAST = %INET_E_DOWNLOAD_BLOCKED_BY_INPRIVATE
' ########################################################################################
' IAsyncMoniker interface
' IID = 79EAC9D3-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface provides an implementation of the IUnknown interface, which allows client
' programs to determine if a moniker supports asynchronous binding. No additional methods
' are supported by this interface.
' Note: Removed from the Vista SDK.
' ########################################################################################
$IID_IAsyncMoniker = GUID$("{79EAC9D3-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IAsyncMoniker $IID_IAsyncMoniker
 INHERIT IUnknown
END INTERFACE
' ########################################################################################
' IPersistMoniker interface
' IID = 79EAC9C9-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface provides methods that offer more control over the binding of
' persistent data.
' ########################################################################################
#IF NOT %DEF(%IPersistMoniker_INTERFACE_DEFINED)
 %IPersistMoniker_INTERFACE_DEFINED = 1
$IID_IPersistMoniker = GUID$("{79EAC9C9-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IPersistMoniker $IID_IPersistMoniker
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetClassID ( ' VTable offset = 12
 BYREF pClassID AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD IsDirty ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Load ( ' VTable offset = 20
 BYVAL fFullyAvailable AS DWORD
 , BYVAL pimkName AS IMoniker
 , BYVAL pibc AS IBindCtx
 , BYVAL grfMode AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Save ( ' VTable offset = 24
 BYVAL pimkName AS IMoniker
 , BYVAL pbc AS IBindCtx
 , BYVAL fRemember AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SaveCompleted ( ' VTable offset = 28
 BYVAL pimkName AS IMoniker
 , BYVAL pibc AS IBindCtx
 ) AS LONG
 ' =====================================================================================
 METHOD GetCurMoniker ( ' VTable offset = 32
 BYREF ppimkName AS IMoniker
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IPersistMoniker_INTERFACE_DEFINED__ */
' ########################################################################################
' IMonikerProp interface
' IID = A5CA5F7F-1847-4D87-9C5B-918509F7511D
' Inherited interface = IUnknown
' This interface provides access to the properties of a moniker.
' This interface is implemented by persistent monikers, such as a MIME handler, to
' retrieve properties about the moniker being handled.
' ########################################################################################
#IF NOT %DEF(%IMonikerProp_INTERFACE_DEFINED)
 %IMonikerProp_INTERFACE_DEFINED = 1
' MONIKERPROPERTY enum
%EQUATE `MIMETYPEPROP = 0
%EQUATE `USE_SRC_URL = &H1
%EQUATE `CLASSIDPROP = &H2
%EQUATE `TRUSTEDDOWNLOADPROP = &H3
%EQUATE `POPUPLEVELPROP = &H4
$IID_IMonikerProp = GUID$("{A5CA5F7F-1847-4D87-9C5B-918509F7511D}")
INTERFACE IMonikerProp $IID_IMonikerProp
 INHERIT IUnknown
 ' =====================================================================================
 METHOD PutProperty ( ' VTable offset = 12
 BYVAL mkp AS DWORD
 , BYREF val AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IMonikerProp_INTERFACE_DEFINED__ */
' ########################################################################################
' IBindProtocol interface
' IID = 79EAC9CD-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' Nor currently supported.
' ########################################################################################
#IF NOT %DEF(%IBindProtocol_INTERFACE_DEFINED)
 %IBindProtocol_INTERFACE_DEFINED = 1
$IID_IBindProtocol = GUID$("{79EAC9CD-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IBindProtocol $IID_IBindProtocol
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateBinding ( ' VTable offset = 12
 BYREF szUrl AS WSTRINGZ
 , BYVAL pbc AS IBindCtx
 , BYREF ppb AS IBinding
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IBindProtocol_INTERFACE_DEFINED__ */
#IF NOT %DEF(%IBinding_INTERFACE_DEFINED)
 %IBinding_INTERFACE_DEFINED = 1
$IID_IBinding = GUID$("{79EAC9C0-BAF9-11CE-8C82-00AA004BA90B}")
' ########################################################################################
' IBinding interface
' IID = 79EAC9C0-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface provides methods that allow the client program using an asynchronous
' moniker to control the progress of the bind operation.
' An asynchronous moniker calls the client's IBindStatusCallback::OnStartBinding method to
' provide the client program with a pointer to the IBinding interface.
' ########################################################################################
INTERFACE IBinding $IID_IBinding
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Abort ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD Suspend ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
 METHOD SetPriority ( ' VTable offset = 24
 BYVAL nPriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriority ( ' VTable offset = 28
 BYREF pnPriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetBindResult ( ' VTable offset = 32
 BYREF pclsidProtocol AS GUID
 , BYREF pdwResult AS DWORD
 , BYREF pszResult AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IBinding_INTERFACE_DEFINED__ */
' ########################################################################################
' IBindStatusCallback interface
' IID = 79EAC9C1-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface accepts information on an asynchronous bind operation.
' A client requesting an asynchronous bind operation must provide a notification object
' exposing the IBindStatusCallback interface. The asynchronous moniker provides
' information on the bind operation to the client by calling notification methods on the
' client's IBindStatusCallback interface. This interface also allows the client to pass
' additional bind information to the moniker by calling the
' IBindStatusCallback::GetBindInfo and IBindStatusCallback::GetPriority methods after
' receiving a call from IMoniker::BindToObject or IMoniker::BindToStorage.
' Only the last IBindStatusCallback interface that was registered will be called.
' ########################################################################################
#IF NOT %DEF(%IBindStatusCallback_INTERFACE_DEFINED)
 %IBindStatusCallback_INTERFACE_DEFINED = 1
' BINDVERB enum
%EQUATE `BINDVERB_GET = 0
%EQUATE `BINDVERB_POST = &H1
%EQUATE `BINDVERB_PUT = &H2
%EQUATE `BINDVERB_CUSTOM = &H3
%EQUATE `BINDVERB_RESERVED1 = &H4
' BINDINFOF enum
%EQUATE `BINDINFOF_URLENCODESTGMEDDATA = &H1
%EQUATE `BINDINFOF_URLENCODEDEXTRAINFO = &H2
' BINDF enum
%EQUATE `BINDF_ASYNCHRONOUS = &H1
%EQUATE `BINDF_ASYNCSTORAGE = &H2
%EQUATE `BINDF_NOPROGRESSIVERENDERING = &H4
%EQUATE `BINDF_OFFLINEOPERATION = &H8
%EQUATE `BINDF_GETNEWESTVERSION = &H10
%EQUATE `BINDF_NOWRITECACHE = &H20
%EQUATE `BINDF_NEEDFILE = &H40
%EQUATE `BINDF_PULLDATA = &H80
%EQUATE `BINDF_IGNORESECURITYPROBLEM = &H100
%EQUATE `BINDF_RESYNCHRONIZE = &H200
%EQUATE `BINDF_HYPERLINK = &H400
%EQUATE `BINDF_NO_UI = &H800
%EQUATE `BINDF_SILENTOPERATION = &H1000
%EQUATE `BINDF_PRAGMA_NO_CACHE = &H2000
%EQUATE `BINDF_GETCLASSOBJECT = &H4000
%EQUATE `BINDF_RESERVED_1 = &H8000
%EQUATE `BINDF_FREE_THREADED = &H10000
%EQUATE `BINDF_DIRECT_READ = &H20000
%EQUATE `BINDF_FORMS_SUBMIT = &H40000
%EQUATE `BINDF_GETFROMCACHE_IF_NET_FAIL = &H80000
%EQUATE `BINDF_FROMURLMON = &H100000
%EQUATE `BINDF_FWD_BACK = &H200000
%EQUATE `BINDF_PREFERDEFAULTHANDLER = &H400000
%EQUATE `BINDF_ENFORCERESTRICTED = &H800000
%EQUATE `BINDF_DONTUSECACHE = %BINDF_GETNEWESTVERSION
%EQUATE `BINDF_DONTPUTINCACHE = %BINDF_NOWRITECACHE
%EQUATE `BINDF_NOCOPYDATA = %BINDF_PULLDATA
' URL_ENCODING enum
%EQUATE `URL_ENCODING_NONE = 0
%EQUATE `URL_ENCODING_ENABLE_UTF8 = &H10000000
%EQUATE `URL_ENCODING_DISABLE_UTF8 = &H20000000
' // Size = 84 bytes
TYPE BINDINFO DWORD
 cbSize AS DWORD ' ULONG cbSize
 szExtraInfo AS WSTRINGZ PTR ' LPWSTR szExtraInfo
 stgmedData AS STGMEDIUM ' STGMEDIUM stgmedData
 grfBindInfoF AS DWORD ' DWORD grfBindInfoF
 dwBindVerb AS DWORD ' DWORD dwBindVerb
 szCustomVerb AS WSTRINGZ PTR ' LPWSTR szCustomVerb
 cbStgmedData AS DWORD ' DWORD cbstgmedData
 dwOptions AS DWORD ' DWORD dwOptions
 dwOptionsFlags AS DWORD ' DWORD dwOptionsFlags
 dwCodePage AS DWORD ' DWORD dwCodePage
 securityAttributes AS SECURITY_ATTRIBUTES ' SECURITY_ATTRIBUTES securityAttributes
 iid AS GUID ' IID iid
 pUnk AS DWORD PTR ' IUnknown *pUnk
 dwReserved AS DWORD ' DWORD dwReserved
END TYPE
' BINDINFO_OPTIONS enum
%EQUATE `BINDINFO_OPTIONS_WININETFLAG = &H10000
%EQUATE `BINDINFO_OPTIONS_ENABLE_UTF8 = &H20000
%EQUATE `BINDINFO_OPTIONS_DISABLE_UTF8 = &H40000
%EQUATE `BINDINFO_OPTIONS_USE_IE_ENCODING = &H80000
%EQUATE `BINDINFO_OPTIONS_BINDTOOBJECT = &H100000
%EQUATE `BINDINFO_OPTIONS_SECURITYOPTOUT = &H200000
%EQUATE `BINDINFO_OPTIONS_IGNOREMIMETEXTPLAIN = &H400000
%EQUATE `BINDINFO_OPTIONS_USEBINDSTRINGCREDS = &H800000
%EQUATE `BINDINFO_OPTIONS_IGNOREHTTPHTTPSREDIRECTS = &H1000000
%EQUATE `BINDINFO_OPTIONS_IGNORE_SSLERRORS_ONCE = &H2000000
%EQUATE `BINDINFO_WPC_DOWNLOADBLOCKED = &H8000000
%EQUATE `BINDINFO_WPC_LOGGING_ENABLED = &H10000000
%EQUATE `BINDINFO_OPTIONS_ALLOWCONNECTDATA = &H20000000
%EQUATE `BINDINFO_OPTIONS_DISABLEAUTOREDIRECTS = &H40000000
%EQUATE `BINDINFO_OPTIONS_SHDOCVW_NAVIGATE = &H80000000& ' ( int )0x80000000
' BSCF enum
%EQUATE `BSCF_FIRSTDATANOTIFICATION = &H1
%EQUATE `BSCF_INTERMEDIATEDATANOTIFICATION = &H2
%EQUATE `BSCF_LASTDATANOTIFICATION = &H4
%EQUATE `BSCF_DATAFULLYAVAILABLE = &H8
%EQUATE `BSCF_AVAILABLEDATASIZEUNKNOWN = &H10
%EQUATE `BSCF_SKIPDRAINDATAFORFILEURLS = &H20
%EQUATE `BSCF_64BITLENGTHDOWNLOAD = &H40
' BINDSTATUS enum
%EQUATE `BINDSTATUS_FINDINGRESOURCE = 1
%EQUATE `BINDSTATUS_CONNECTING = %BINDSTATUS_FINDINGRESOURCE + 1
%EQUATE `BINDSTATUS_REDIRECTING = %BINDSTATUS_CONNECTING + 1
%EQUATE `BINDSTATUS_BEGINDOWNLOADDATA = %BINDSTATUS_REDIRECTING + 1
%EQUATE `BINDSTATUS_DOWNLOADINGDATA = %BINDSTATUS_BEGINDOWNLOADDATA + 1
%EQUATE `BINDSTATUS_ENDDOWNLOADDATA = %BINDSTATUS_DOWNLOADINGDATA + 1
%EQUATE `BINDSTATUS_BEGINDOWNLOADCOMPONENTS = %BINDSTATUS_ENDDOWNLOADDATA + 1
%EQUATE `BINDSTATUS_INSTALLINGCOMPONENTS = %BINDSTATUS_BEGINDOWNLOADCOMPONENTS + 1
%EQUATE `BINDSTATUS_ENDDOWNLOADCOMPONENTS = %BINDSTATUS_INSTALLINGCOMPONENTS + 1
%EQUATE `BINDSTATUS_USINGCACHEDCOPY = %BINDSTATUS_ENDDOWNLOADCOMPONENTS + 1
%EQUATE `BINDSTATUS_SENDINGREQUEST = %BINDSTATUS_USINGCACHEDCOPY + 1
%EQUATE `BINDSTATUS_CLASSIDAVAILABLE = %BINDSTATUS_SENDINGREQUEST + 1
%EQUATE `BINDSTATUS_MIMETYPEAVAILABLE = %BINDSTATUS_CLASSIDAVAILABLE + 1
%EQUATE `BINDSTATUS_CACHEFILENAMEAVAILABLE = %BINDSTATUS_MIMETYPEAVAILABLE + 1
%EQUATE `BINDSTATUS_BEGINSYNCOPERATION = %BINDSTATUS_CACHEFILENAMEAVAILABLE + 1
%EQUATE `BINDSTATUS_ENDSYNCOPERATION = %BINDSTATUS_BEGINSYNCOPERATION + 1
%EQUATE `BINDSTATUS_BEGINUPLOADDATA = %BINDSTATUS_ENDSYNCOPERATION + 1
%EQUATE `BINDSTATUS_UPLOADINGDATA = %BINDSTATUS_BEGINUPLOADDATA + 1
%EQUATE `BINDSTATUS_ENDUPLOADDATA = %BINDSTATUS_UPLOADINGDATA + 1
%EQUATE `BINDSTATUS_PROTOCOLCLASSID = %BINDSTATUS_ENDUPLOADDATA + 1
%EQUATE `BINDSTATUS_ENCODING = %BINDSTATUS_PROTOCOLCLASSID + 1
%EQUATE `BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE = %BINDSTATUS_ENCODING + 1
%EQUATE `BINDSTATUS_CLASSINSTALLLOCATION = %BINDSTATUS_VERIFIEDMIMETYPEAVAILABLE + 1
%EQUATE `BINDSTATUS_DECODING = %BINDSTATUS_CLASSINSTALLLOCATION + 1
%EQUATE `BINDSTATUS_LOADINGMIMEHANDLER = %BINDSTATUS_DECODING + 1
%EQUATE `BINDSTATUS_CONTENTDISPOSITIONATTACH = %BINDSTATUS_LOADINGMIMEHANDLER + 1
%EQUATE `BINDSTATUS_FILTERREPORTMIMETYPE = %BINDSTATUS_CONTENTDISPOSITIONATTACH + 1
%EQUATE `BINDSTATUS_CLSIDCANINSTANTIATE = %BINDSTATUS_FILTERREPORTMIMETYPE + 1
%EQUATE `BINDSTATUS_IUNKNOWNAVAILABLE = %BINDSTATUS_CLSIDCANINSTANTIATE + 1
%EQUATE `BINDSTATUS_DIRECTBIND = %BINDSTATUS_IUNKNOWNAVAILABLE + 1
%EQUATE `BINDSTATUS_RAWMIMETYPE = %BINDSTATUS_DIRECTBIND + 1
%EQUATE `BINDSTATUS_PROXYDETECTING = %BINDSTATUS_RAWMIMETYPE + 1
%EQUATE `BINDSTATUS_ACCEPTRANGES = %BINDSTATUS_PROXYDETECTING + 1
%EQUATE `BINDSTATUS_COOKIE_SENT = %BINDSTATUS_ACCEPTRANGES + 1
%EQUATE `BINDSTATUS_COMPACT_POLICY_RECEIVED = %BINDSTATUS_COOKIE_SENT + 1
%EQUATE `BINDSTATUS_COOKIE_SUPPRESSED = %BINDSTATUS_COMPACT_POLICY_RECEIVED + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_UNKNOWN = %BINDSTATUS_COOKIE_SUPPRESSED + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_ACCEPT = %BINDSTATUS_COOKIE_STATE_UNKNOWN + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_REJECT = %BINDSTATUS_COOKIE_STATE_ACCEPT + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_PROMPT = %BINDSTATUS_COOKIE_STATE_REJECT + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_LEASH = %BINDSTATUS_COOKIE_STATE_PROMPT + 1
%EQUATE `BINDSTATUS_COOKIE_STATE_DOWNGRADE = %BINDSTATUS_COOKIE_STATE_LEASH + 1
%EQUATE `BINDSTATUS_POLICY_HREF = %BINDSTATUS_COOKIE_STATE_DOWNGRADE + 1
%EQUATE `BINDSTATUS_P3P_HEADER = %BINDSTATUS_POLICY_HREF + 1
%EQUATE `BINDSTATUS_SESSION_COOKIE_RECEIVED = %BINDSTATUS_P3P_HEADER + 1
%EQUATE `BINDSTATUS_PERSISTENT_COOKIE_RECEIVED = %BINDSTATUS_SESSION_COOKIE_RECEIVED + 1
%EQUATE `BINDSTATUS_SESSION_COOKIES_ALLOWED = %BINDSTATUS_PERSISTENT_COOKIE_RECEIVED + 1
%EQUATE `BINDSTATUS_CACHECONTROL = %BINDSTATUS_SESSION_COOKIES_ALLOWED + 1
%EQUATE `BINDSTATUS_CONTENTDISPOSITIONFILENAME = %BINDSTATUS_CACHECONTROL + 1
%EQUATE `BINDSTATUS_MIMETEXTPLAINMISMATCH = %BINDSTATUS_CONTENTDISPOSITIONFILENAME + 1
%EQUATE `BINDSTATUS_PUBLISHERAVAILABLE = %BINDSTATUS_MIMETEXTPLAINMISMATCH + 1
%EQUATE `BINDSTATUS_DISPLAYNAMEAVAILABLE = %BINDSTATUS_PUBLISHERAVAILABLE + 1
%EQUATE `BINDSTATUS_SSLUX_NAVBLOCKED = %BINDSTATUS_DISPLAYNAMEAVAILABLE + 1
%EQUATE `BINDSTATUS_SERVER_MIMETYPEAVAILABLE = %BINDSTATUS_SSLUX_NAVBLOCKED + 1
%EQUATE `BINDSTATUS_SNIFFED_CLASSIDAVAILABLE = %BINDSTATUS_SERVER_MIMETYPEAVAILABLE + 1
%EQUATE `BINDSTATUS_64BIT_PROGRESS = %BINDSTATUS_SNIFFED_CLASSIDAVAILABLE + 1
$IID_IBindStatusCallback = GUID$("{79EAC9C1-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IBindStatusCallback $IID_IBindStatusCallback
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnStartBinding ( ' VTable offset = 12
 BYVAL dwReserved AS DWORD
 , BYVAL pib AS IBinding
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriority ( ' VTable offset = 16
 BYREF pnPriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnLowResource ( ' VTable offset = 20
 BYVAL reserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnProgress ( ' VTable offset = 24
 BYVAL ulProgress AS DWORD
 , BYVAL ulProgressMax AS DWORD
 , BYVAL ulStatusCode AS DWORD
 , BYREF szStatusText AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD OnStopBinding ( ' VTable offset = 28
 BYVAL hresult AS LONG
 , BYREF szError AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetBindInfo ( ' VTable offset = 32
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 ) AS LONG
 ' =====================================================================================
 METHOD OnDataAvailable ( ' VTable offset = 36
 BYVAL grfBSCF AS DWORD
 , BYVAL dwSize AS DWORD
 , BYREF pformatetc AS FORMATETC
 , BYREF pstgmed AS STGMEDIUM
 ) AS LONG
 ' =====================================================================================
 METHOD OnObjectAvailable ( ' VTable offset = 40
 BYREF riid AS GUID
 , BYVAL punk AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IBindStatusCallback_INTERFACE_DEFINED__ */
' ########################################################################################
' IBindStatusCallbackEx interface
' IID = AAA74EF9-8EE7-4659-88D9-F8C504DA73CC
' Inherited interface = IBindStatusCallback
' ########################################################################################
#IF NOT %DEF(%IBindStatusCallbackEx_INTERFACE_DEFINED)
 %IBindStatusCallbackEx_INTERFACE_DEFINED = 1
' enum BINDF2
%EQUATE `BINDF2_DISABLEBASICOVERHTTP = &H1
%EQUATE `BINDF2_DISABLEAUTOCOOKIEHANDLING = &H2
%EQUATE `BINDF2_READ_DATA_GREATER_THAN_4GB = &H4
%EQUATE `BINDF2_DISABLE_HTTP_REDIRECT_XSECURITYID = &H8
%EQUATE `BINDF2_RESERVED_3 = &H20000000
%EQUATE `BINDF2_RESERVED_2 = &H40000000
%EQUATE `BINDF2_RESERVED_1 = &H80000000
$IID_IBindStatusCallbackEx = GUID$("{AAA74EF9-8EE7-4659-88D9-F8C504DA73CC}")
INTERFACE IBindStatusCallbackEx $IID_IBindStatusCallbackEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IBindStatusCallback methods
 ' =====================================================================================
 METHOD OnStartBinding ( ' VTable offset = 12
 BYVAL dwReserved AS DWORD
 , BYVAL pib AS IBinding
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriority ( ' VTable offset = 16
 BYREF pnPriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD OnLowResource ( ' VTable offset = 20
 BYVAL reserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnProgress ( ' VTable offset = 24
 BYVAL ulProgress AS DWORD
 , BYVAL ulProgressMax AS DWORD
 , BYVAL ulStatusCode AS DWORD
 , BYREF szStatusText AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD OnStopBinding ( ' VTable offset = 28
 BYVAL hresult AS LONG
 , BYREF szError AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD GetBindInfo ( ' VTable offset = 32
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 ) AS LONG
 ' =====================================================================================
 METHOD OnDataAvailable ( ' VTable offset = 36
 BYVAL grfBSCF AS DWORD
 , BYVAL dwSize AS DWORD
 , BYREF pformatetc AS FORMATETC
 , BYREF pstgmed AS STGMEDIUM
 ) AS LONG
 ' =====================================================================================
 METHOD OnObjectAvailable ( ' VTable offset = 40
 BYREF riid AS GUID
 , BYVAL punk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IBindStatusCallbackEx methods
 ' =====================================================================================
 METHOD GetBindInfoEx ( ' VTable offset = 44
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 , BYREF grfBINDF2 AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IBindStatusCallbackEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IAuthenticate interface
' IID = 79EAC9D0-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface is implemented by the client application to provide the URL moniker with
' information to authenticate the user.
' Urlmon.dll uses the QueryInterface method on the client application's implementation of
' IBindStatusCallback to obtain a pointer to the client application's IAuthenticate
' interface. If the client application is hosting Mshtml.dll, Mshtml.dll will request a
' pointer to the client application's implementation of IAuthenticate interface by calling
' QueryInterface on the client application's IServiceProvider interface.
' ########################################################################################
#IF NOT %DEF(%IAuthenticate_INTERFACE_DEFINED)
 %IAuthenticate_INTERFACE_DEFINED = 1
$IID_IAuthenticate = GUID$("{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IAuthenticate $IID_IAuthenticate
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Authenticate ( ' VTable offset = 12
 BYREF phwnd AS DWORD
 , BYREF pszUsername AS DWORD
 , BYREF pszPassword AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAuthenticate_INTERFACE_DEFINED__ */
' ########################################################################################
' IAuthenticateEx interface
' IID = 2AD1EDAF-D83D-48B5-9ADF-03DBE19F53BD
' Inherited interface = IAuthenticate
' ########################################################################################
#IF NOT %DEF(%IAuthenticateEx_INTERFACE_DEFINED)
 %IAuthenticateEx_INTERFACE_DEFINED = 1
' enum AUTHENTICATEF
%EQUATE `AUTHENTICATEF_PROXY = &H1
%EQUATE `AUTHENTICATEF_BASIC = &H2
%EQUATE `AUTHENTICATEF_HTTP = &H4
TYPE AUTHENTICATEINFO DWORD
 dwFlags AS DWORD
 dwReserved AS DWORD
END TYPE
$IID_IAuthenticateEx = GUID$("{2AD1EDAF-D83D-48B5-9ADF-03DBE19F53BD}")
INTERFACE IAuthenticateEx $IID_IAuthenticateEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IAuthenticate method
 ' =====================================================================================
 METHOD Authenticate ( ' VTable offset = 12
 BYREF phwnd AS DWORD
 , BYREF pszUsername AS DWORD
 , BYREF pszPassword AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IAuthenticateEx method
 ' =====================================================================================
 METHOD AuthenticateEx ( ' VTable offset = 16
 BYREF phwnd AS DWORD
 , BYREF pszUsername AS DWORD
 , BYREF pszPassword AS DWORD
 , BYREF pauthinfo AS AUTHENTICATEINFO
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAuthenticateEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IHttpNegotiate interface
' IID = 79EAC9D2-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface is implemented by a client application to provide support for HTTP
' negotiations.
' Urlmon.dll uses the QueryInterface method on your implementation of IBindStatusCallback
' to obtain a pointer to your IHttpNegotiate interface.
' ########################################################################################
#IF NOT %DEF(%IHttpNegotiate_INTERFACE_DEFINED)
 %IHttpNegotiate_INTERFACE_DEFINED = 1
$IID_IHttpNegotiate = GUID$("{79EAC9D2-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IHttpNegotiate $IID_IHttpNegotiate
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginningTransaction ( ' VTable offset = 12
 BYREF szURL AS WSTRINGZ
 , BYREF szHeaders AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYREF pszAdditionalHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnResponse ( ' VTable offset = 16
 BYVAL dwResponseCode AS DWORD
 , BYREF szResponseHeaders AS WSTRINGZ
 , BYREF szRequestHeaders AS WSTRINGZ
 , BYREF pszAdditionalRequestHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHttpNegotiate_INTERFACE_DEFINED__ */
' ########################################################################################
' IHttpNegotiate2 interface
' IID = 4F9F9FCB-E0F4-48EB-B7AB-FA2EA9365CB4
' Inherited interface = IHttpNegotiate
' This interface is implemented by a client application to provide support for HTTP
' negotiations. It extends the IHttpNegotiate interface.
' ########################################################################################
#IF NOT %DEF(%IHttpNegotiate2_INTERFACE_DEFINED)
 %IHttpNegotiate2_INTERFACE_DEFINED = 1
$IID_IHttpNegotiate2 = GUID$("{4F9F9FCB-E0F4-48EB-B7AB-FA2EA9365CB4}")
INTERFACE IHttpNegotiate2 $IID_IHttpNegotiate2
 INHERIT IUnknown
 ' =====================================================================================
 METHOD BeginningTransaction ( ' VTable offset = 12
 BYREF szURL AS WSTRINGZ
 , BYREF szHeaders AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYREF pszAdditionalHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnResponse ( ' VTable offset = 16
 BYVAL dwResponseCode AS DWORD
 , BYREF szResponseHeaders AS WSTRINGZ
 , BYREF szRequestHeaders AS WSTRINGZ
 , BYREF pszAdditionalRequestHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRootSecurityId ( ' VTable offset = 20
 BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHttpNegotiate2_INTERFACE_DEFINED__ */
' ########################################################################################
' IHttpNegotiate3 interface
' IID = 57B6C80A-34C2-4602-BC26-66A02FC57153
' Inherited interface = IHttpNegotiate2
' ########################################################################################
#IF NOT %DEF(%IHttpNegotiate3_INTERFACE_DEFINED)
 %IHttpNegotiate3_INTERFACE_DEFINED = 1
$IID_IHttpNegotiate3 = GUID$("{57B6C80A-34C2-4602-BC26-66A02FC57153}")
INTERFACE IHttpNegotiate3 $IID_IHttpNegotiate3
 INHERIT IUnknown
 ' =====================================================================================
 ' IHttpNegotiate2 methods
 ' =====================================================================================
 METHOD BeginningTransaction ( ' VTable offset = 12
 BYREF szURL AS WSTRINGZ
 , BYREF szHeaders AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYREF pszAdditionalHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnResponse ( ' VTable offset = 16
 BYVAL dwResponseCode AS DWORD
 , BYREF szResponseHeaders AS WSTRINGZ
 , BYREF szRequestHeaders AS WSTRINGZ
 , BYREF pszAdditionalRequestHeaders AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetRootSecurityId ( ' VTable offset = 20
 BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IHttpNegotiate3 methods
 ' =====================================================================================
 METHOD GetSerializedClientCertContext ( ' VTable offset = 24
 BYREF ppbCert AS DWORD
 , BYREF pcbCert AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHttpNegotiate3_INTERFACE_DEFINED__ */
' ########################################################################################
' IWinInetFileStream interface
' IID = F134C4B7-B1F8-4E75-B886-74B90943BECB
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWinInetFileStream_INTERFACE_DEFINED)
 %IWinInetFileStream_INTERFACE_DEFINED = 1
$IID_IWinInetFileStream = GUID$("{F134C4B7-B1F8-4E75-B886-74B90943BECB}")
INTERFACE IWinInetFileStream $IID_IWinInetFileStream
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetHandleForUnlock ( ' VTable offset = 12
 BYVAL hWinInetLockHandle AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetDeleteFile ( ' VTable offset = 16
 BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWinInetFileStream_INTERFACE_DEFINED__ */
' ########################################################################################
' IWindowForBindingUI interface
' IID = 79EAC9D5-BAFA-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface allows clients of URL monikers to display information in the client's
' user interface when necessary.
' This interface is usually implemented by OLE containers that also implement the
' IBindHost interface.
' ########################################################################################
#IF NOT %DEF(%IWindowForBindingUI_INTERFACE_DEFINED)
 %IWindowForBindingUI_INTERFACE_DEFINED = 1
$IID_IWindowForBindingUI = GUID$("{79EAC9D5-BAFA-11CE-8C82-00AA004BA90B}")
INTERFACE IWindowForBindingUI $IID_IWindowForBindingUI
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetWindow ( ' VTable offset = 12
 BYREF rguidReason AS GUID
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWindowForBindingUI_INTERFACE_DEFINED__ */
' ########################################################################################
' ICodeInstall interface
' IID = 79EAC9D1-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IWindowForBindingUI
' Callback interface for problems with application installations or file downloads.
' ########################################################################################
#IF NOT %DEF(%ICodeInstall_INTERFACE_DEFINED)
 %ICodeInstall_INTERFACE_DEFINED = 1
' CIP_STATUS enum
%EQUATE `CIP_DISK_FULL = 0
%EQUATE `CIP_ACCESS_DENIED = %CIP_DISK_FULL + 1
%EQUATE `CIP_NEWER_VERSION_EXISTS = %CIP_ACCESS_DENIED + 1
%EQUATE `CIP_OLDER_VERSION_EXISTS = %CIP_NEWER_VERSION_EXISTS + 1
%EQUATE `CIP_NAME_CONFLICT = %CIP_OLDER_VERSION_EXISTS + 1
%EQUATE `CIP_TRUST_VERIFICATION_COMPONENT_MISSING = %CIP_NAME_CONFLICT + 1
%EQUATE `CIP_EXE_SELF_REGISTERATION_TIMEOUT = %CIP_TRUST_VERIFICATION_COMPONENT_MISSING + 1
%EQUATE `CIP_UNSAFE_TO_ABORT = %CIP_EXE_SELF_REGISTERATION_TIMEOUT + 1
%EQUATE `CIP_NEED_REBOOT = %CIP_UNSAFE_TO_ABORT + 1
%EQUATE `CIP_NEED_REBOOT_UI_PERMISSION = %CIP_NEED_REBOOT + 1
$IID_ICodeInstall = GUID$("{79EAC9D1-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE ICodeInstall $IID_ICodeInstall
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetWindow ( ' VTable offset = 12
 BYREF rguidReason AS GUID
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnCodeInstallProblem ( ' VTable offset = 16
 BYVAL ulStatusCode AS DWORD
 , BYREF szDestination AS WSTRINGZ
 , BYREF szSource AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICodeInstall_INTERFACE_DEFINED__ */
' ########################################################################################
' IUri interface
' IID = A39EE748-6A27-4817-A6F2-13914BEF5890
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUri_INTERFACE_DEFINED)
 %IUri_INTERFACE_DEFINED = 1
$IID_IUri = GUID$("{A39EE748-6A27-4817-A6F2-13914BEF5890}")
' enum Uri_PROPERTY
%EQUATE `Uri_PROPERTY_ABSOLUTE_URI = 0
%EQUATE `Uri_PROPERTY_STRING_START = %Uri_PROPERTY_ABSOLUTE_URI + 1
%EQUATE `Uri_PROPERTY_AUTHORITY = 1
%EQUATE `Uri_PROPERTY_DISPLAY_URI = 2
%EQUATE `Uri_PROPERTY_DOMAIN = 3
%EQUATE `Uri_PROPERTY_EXTENSION = 4
%EQUATE `Uri_PROPERTY_FRAGMENT = 5
%EQUATE `Uri_PROPERTY_HOST = 6
%EQUATE `Uri_PROPERTY_PASSWORD = 7
%EQUATE `Uri_PROPERTY_PATH = 8
%EQUATE `Uri_PROPERTY_PATH_AND_QUERY = 9
%EQUATE `Uri_PROPERTY_QUERY = 10
%EQUATE `Uri_PROPERTY_RAW_URI = 11
%EQUATE `Uri_PROPERTY_SCHEME_NAME = 12
%EQUATE `Uri_PROPERTY_USER_INFO = 13
%EQUATE `Uri_PROPERTY_USER_NAME = 14
%EQUATE `Uri_PROPERTY_STRING_LAST = %Uri_PROPERTY_USER_NAME
%EQUATE `Uri_PROPERTY_HOST_TYPE = 15
%EQUATE `Uri_PROPERTY_DWORD_START = %Uri_PROPERTY_HOST_TYPE
%EQUATE `Uri_PROPERTY_PORT = 16
%EQUATE `Uri_PROPERTY_SCHEME = 17
%EQUATE `Uri_PROPERTY_ZONE = 18
%EQUATE `Uri_PROPERTY_DWORD_LAST = %Uri_PROPERTY_ZONE
' enum Uri_HOST_TYPE
%EQUATE `Uri_HOST_UNKNOWN = 0
%EQUATE `Uri_HOST_DNS = %Uri_HOST_UNKNOWN + 1
%EQUATE `Uri_HOST_IPV4 = %Uri_HOST_DNS + 1
%EQUATE `Uri_HOST_IPV6 = %Uri_HOST_IPV4 + 1
%EQUATE `Uri_HOST_IDN = %Uri_HOST_IPV6 + 1
INTERFACE IUri $IID_IUri
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetPropertyBSTR ( ' VTable offset = 12
 BYVAL uriProp AS LONG
 , BYREF pbstrProperty AS WSTRING
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyLength ( ' VTable offset = 16
 BYVAL uriProp AS LONG
 , BYREF pcchProperty AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPropertyDWORD ( ' VTable offset = 20
 BYVAL uriProp AS LONG
 , BYREF pdwProperty AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD HasProperty ( ' VTable offset = 24
 BYVAL uriProp AS LONG
 , BYREF pfHasProperty AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetAbsoluteUri ( ' VTable offset = 28
 BYREF pbstrAbsoluteUri AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetAuthority ( ' VTable offset = 32
 BYREF pbstrAuthority AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDisplayUri ( ' VTable offset = 36
 BYREF pbstrDisplayString AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetDomain ( ' VTable offset = 40
 BYREF pbstrDomain AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetExtension ( ' VTable offset = 44
 BYREF pbstrExtension AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetFragment ( ' VTable offset = 48
 BYREF pbstrFragment AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetHost ( ' VTable offset = 52
 BYREF pbstrHost AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetPassword ( ' VTable offset = 56
 BYREF pbstrPassword AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetPath ( ' VTable offset = 60
 BYREF pbstrPath AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetPathAndQuery ( ' VTable offset = 64
 BYREF pbstrPathAndQuery AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetQuery ( ' VTable offset = 68
 BYREF pbstrQuery AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetRawUri ( ' VTable offset = 72
 BYREF pbstrRawUri AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetSchemeName ( ' VTable offset = 76
 BYREF pbstrSchemeName AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetUserInfo ( ' VTable offset = 80
 BYREF pbstrUserInfo AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetUserName ( ' VTable offset = 84
 BYREF pbstrUserName AS WSTRING
 ) AS LONG
 ' =====================================================================================
 METHOD GetHostType ( ' VTable offset = 88
 BYREF pdwHostType AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPort ( ' VTable offset = 92
 BYREF pdwPort AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetScheme ( ' VTable offset = 96
 BYREF pdwScheme AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZone ( ' VTable offset = 100
 BYREF pdwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetProperties ( ' VTable offset = 104
 BYREF pdwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 108
 BYVAL pUri AS IUri
 , BYREF pfEqual AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUri_INTERFACE_DEFINED__ */
DECLARE FUNCTION CreateUri LIB "urlmon.dll" ALIAS "CreateUri" ( BYVAL dwFlags AS QUAD , BYVAL dwReserved AS QUAD , BYREF ppURI AS IUri ) AS LONG
DECLARE FUNCTION CreateUriWithFragment LIB "urlmon.dll" ALIAS "CreateUriWithFragment" ( BYREF pwzURI AS WSTRINGZ
 , BYREF pwzFragment AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppURI AS IUri
 ) AS LONG
DECLARE FUNCTION CreateUriFromMultiByteString LIB "urlmon.dll" ALIAS "CreateUriFromMultiByteString" ( BYREF pszANSIInputUri AS ASCIIZ
 , BYVAL dwEncodingFlags AS DWORD
 , BYVAL dwCodePage AS DWORD
 , BYVAL dwCreateFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppUri AS IUri
 ) AS LONG
'//The following flags are used with IUri::GetProperties.
%EQUATE `Uri_HAS_ABSOLUTE_URI = &H00000001 ' (1 << Uri_PROPERTY_ABSOLUTE_URI)
%EQUATE `Uri_HAS_AUTHORITY = &H00000004 ' (1 << Uri_PROPERTY_AUTHORITY)
%EQUATE `Uri_HAS_DISPLAY_URI = &H00000008 ' (1 << Uri_PROPERTY_DISPLAY_URI)
%EQUATE `Uri_HAS_DOMAIN = &H00000010 ' (1 << Uri_PROPERTY_DOMAIN)
%EQUATE `Uri_HAS_EXTENSION = &H00000020 ' (1 << Uri_PROPERTY_EXTENSION)
%EQUATE `Uri_HAS_FRAGMENT = &H00000040 ' (1 << Uri_PROPERTY_FRAGMENT)
%EQUATE `Uri_HAS_HOST = &H00000080 ' (1 << Uri_PROPERTY_HOST)
%EQUATE `Uri_HAS_PASSWORD = &H00000100 ' (1 << Uri_PROPERTY_PASSWORD)
%EQUATE `Uri_HAS_PATH = &H00000200 ' (1 << Uri_PROPERTY_PATH)
%EQUATE `Uri_HAS_QUERY = &H00000800 ' (1 << Uri_PROPERTY_QUERY)
%EQUATE `Uri_HAS_RAW_URI = &H00001000 ' (1 << Uri_PROPERTY_RAW_URI)
%EQUATE `Uri_HAS_SCHEME_NAME = &H00002000 ' (1 << Uri_PROPERTY_SCHEME_NAME)
%EQUATE `Uri_HAS_USER_NAME = &H00008000 ' (1 << Uri_PROPERTY_USER_NAME)
%EQUATE `Uri_HAS_PATH_AND_QUERY = &H00000400 ' (1 << Uri_PROPERTY_PATH_AND_QUERY)
%EQUATE `Uri_HAS_USER_INFO = &H00004000 ' (1 << Uri_PROPERTY_USER_INFO)
%EQUATE `Uri_HAS_HOST_TYPE = &H00020000 ' (1 << Uri_PROPERTY_HOST_TYPE)
%EQUATE `Uri_HAS_PORT = &H00080000 ' (1 << Uri_PROPERTY_PORT)
%EQUATE `Uri_HAS_SCHEME = &H00100000 ' (1 << Uri_PROPERTY_SCHEME)
%EQUATE `Uri_HAS_ZONE = &H00200000 ' (1 << Uri_PROPERTY_ZONE)
'//The following public Uri_CREATE flags may be passed in
'//through the dwFlags parameter of the CreateUri functions.
'//Note that ALLOW_RELATIVE and ALLOW_IMPLICIT_WILDCARD_SCHEME are mutually exclusive and may not be passed together.
%EQUATE `Uri_CREATE_ALLOW_RELATIVE = &H00000001 ' // When the scheme is unspecified and not implicit file, assume relative.
%EQUATE `Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME = &H00000002 ' // When the scheme is unspecified and not implicit file, assume wildcard.
%EQUATE `Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME = &H00000004 ' // When the scheme is unspecified and it starts with X: or \\ assume its a file scheme.
%EQUATE `Uri_CREATE_NOFRAG = &H00000008 ' // If there's a query string don't look for a fragment
%EQUATE `Uri_CREATE_NO_CANONICALIZE = &H00000010 ' // Do not canonicalize the scheme, host, authority, or path
%EQUATE `Uri_CREATE_CANONICALIZE = &H00000100 ' // DEFAULT: Canonicalize the scheme, host, authority, and path
%EQUATE `Uri_CREATE_FILE_USE_DOS_PATH = &H00000020 ' // Use DOS path compat mode for file URI creation
%EQUATE `Uri_CREATE_DECODE_EXTRA_INFO = &H00000040 ' // Beta2 DEFAULT: Decode the contents of query and fragment, then re-encode reserved characters
%EQUATE `Uri_CREATE_NO_DECODE_EXTRA_INFO = &H00000080 ' // Beta1 DEFAULT: Neither decode nor re-encode any part of the query or fragment
%EQUATE `Uri_CREATE_CRACK_UNKNOWN_SCHEMES = &H00000200 ' // Beta2 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like heirarchical URIs
%EQUATE `Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES = &H00000400 ' // Beta1 DEFAULT: Heirarchical URIs with present and unknown schemes will be treated like opaque URIs
%EQUATE `Uri_CREATE_PRE_PROCESS_HTML_URI = &H00000800 ' // DEFAULT: Perform pre-processing on the URI to remove control characters and whitespace as if the URI comes from the raw href value of an HTML page.
%EQUATE `Uri_CREATE_NO_PRE_PROCESS_HTML_URI = &H00001000 ' // Don't perform pre-processing to remove control characters and whitespace as appropriate.
%EQUATE `Uri_CREATE_IE_SETTINGS = &H00002000 ' // Use IE registry settings for such things as whether or not to use IDN.
%EQUATE `Uri_CREATE_NO_IE_SETTINGS = &H00004000 ' // DEFAULT: Don't use IE registry settings.
%EQUATE `Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS = &H00008000 ' // Don't percent-encode characters that are forbidden by the RFC.
'' //The following flags may be passed in through the dwFlags
'' //parameter of the IUri::GetPropertyBSTR or IUri::GetPropertyLength functions.
'' //The following flags apply only to the property Uri_PROPERTY_DISPLAY_URI:
%EQUATE `Uri_DISPLAY_NO_FRAGMENT = &H00000001 ' // Exclude fragment from the DisplayUri, if one exists
%EQUATE `Uri_PUNYCODE_IDN_HOST = &H00000002 ' // Show the hostname encoded as punycode inside the Host, Domain, or AbsoluteUri properties, if the Uri is IDN
%EQUATE `Uri_DISPLAY_IDN_HOST = &H00000004 ' // Show the hostname encoded as punycode or Unicode as it would appear in the DisplayUri property. This applies to the Host, Domain, and AbsoluteUri properties.
'' // The following are Uri_ENCODING_ flags for use with the function CreateUriFromMultiByteString
%EQUATE `Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8 = &H00000001
%EQUATE `Uri_ENCODING_USER_INFO_AND_PATH_IS_CP = &H00000002
%EQUATE `Uri_ENCODING_HOST_IS_IDN = &H00000004
%EQUATE `Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8 = &H00000008
%EQUATE `Uri_ENCODING_HOST_IS_PERCENT_ENCODED_CP = &H00000010
%EQUATE `Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8 = &H00000020
%EQUATE `Uri_ENCODING_QUERY_AND_FRAGMENT_IS_CP = &H00000040
%EQUATE `Uri_ENCODING_RFC = %Uri_ENCODING_USER_INFO_AND_PATH_IS_PERCENT_ENCODED_UTF8 OR %Uri_ENCODING_HOST_IS_PERCENT_ENCODED_UTF8 OR %Uri_ENCODING_QUERY_AND_FRAGMENT_IS_PERCENT_ENCODED_UTF8
'' //The following flags may be passed in through the dwUriBuilderFlags
'' //parameter of the IUriBuilder::CreateUri
%EQUATE `UriBuilder_USE_ORIGINAL_FLAGS = &H00000001 ' // Use the create flags from the underlying IUri if they are available.
' ########################################################################################
' IUriContainer interface
' IID = A158A630-ED6F-45FB-B987-F68676F57752
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUriContainer_INTERFACE_DEFINED)
 %IUriContainer_INTERFACE_DEFINED = 1
$IID_IUriContainer = GUID$("{A158A630-ED6F-45FB-B987-F68676F57752}")
INTERFACE IUriContainer $IID_IUriContainer
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetIUri ( ' VTable offset = 12
 BYREF ppIUri AS IUri
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUriContainer_INTERFACE_DEFINED__ */
' ########################################################################################
' IUriBuilder interface
' IID = 4221B2E1-8955-46C0-BD5B-DE9897565DE7
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUriBuilder_INTERFACE_DEFINED)
 %IUriBuilder_INTERFACE_DEFINED = 1
$IID_IUriBuilder = GUID$("{4221B2E1-8955-46C0-BD5B-DE9897565DE7}")
INTERFACE IUriBuilder $IID_IUriBuilder
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateUriSimple ( ' VTable offset = 12
 BYVAL dwAllowEncodingPropertyMask AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppIUri AS IUri
 ) AS LONG
 ' =====================================================================================
 METHOD CreateUri ( ' VTable offset = 16
 BYVAL dwCreateFlags AS DWORD
 , BYVAL dwAllowEncodingPropertyMask AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppIUri AS IUri
 ) AS LONG
 ' =====================================================================================
 METHOD CreateUriWithFlags ( ' VTable offset = 20
 BYVAL dwCreateFlags AS DWORD
 , BYVAL dwUriBuilderFlags AS DWORD
 , BYVAL dwAllowEncodingPropertyMask AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppIUri AS IUri
 ) AS LONG
 ' =====================================================================================
 METHOD GetIUri ( ' VTable offset = 24
 BYREF ppIUri AS IUri
 ) AS LONG
 ' =====================================================================================
 METHOD SetIUri ( ' VTable offset = 28
 BYVAL pIUri AS IUri
 ) AS LONG
 ' =====================================================================================
 METHOD GetFragment ( ' VTable offset = 32
 BYREF pcchFragment AS DWORD
 , BYREF ppwzFragment AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetHost ( ' VTable offset = 36
 BYREF pcchHost AS DWORD
 , BYREF ppwzHost AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPassword ( ' VTable offset = 40
 BYREF pcchPassword AS DWORD
 , BYREF ppwzPassword AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPath ( ' VTable offset = 44
 BYREF pcchPath AS DWORD
 , BYREF ppwzPath AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetPort ( ' VTable offset = 48
 BYREF pfHasPort AS LONG
 , BYREF pdwPort AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetQuery ( ' VTable offset = 52
 BYREF pcchQuery AS DWORD
 , BYREF ppwzQuery AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSchemeName ( ' VTable offset = 56
 BYREF pcchSchemeName AS DWORD
 , BYREF ppwzSchemeName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetUserName ( ' VTable offset = 60
 BYREF pcchUserName AS DWORD
 , BYREF ppwzUserName AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetFragment ( ' VTable offset = 64
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetHost ( ' VTable offset = 68
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetPassword ( ' VTable offset = 72
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetPath ( ' VTable offset = 76
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetPort ( ' VTable offset = 80
 BYVAL fHasPort AS LONG
 , BYVAL dwNewValue AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetQuery ( ' VTable offset = 84
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetSchemeName ( ' VTable offset = 88
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD SetUserName ( ' VTable offset = 92
 BYREF pwzNewValue AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD RemoveProperties ( ' VTable offset = 96
 BYVAL dwPropertyMask AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD HasBeenModified ( ' VTable offset = 100
 BYREF pfModified AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUriBuilder_INTERFACE_DEFINED__ */
' ########################################################################################
' IUriBuilderFactory interface
' IID = E982CE48-0B96-440C-BC37-0C869B27A29E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IUriBuilderFactory_INTERFACE_DEFINED)
 %IUriBuilderFactory_INTERFACE_DEFINED = 1
$IID_IUriBuilderFactory = GUID$("{E982CE48-0B96-440C-BC37-0C869B27A29E}")
INTERFACE IUriBuilderFactory $IID_IUriBuilderFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateIUriBuilder ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppIUriBuilder AS IUriBuilder
 ) AS LONG
 ' =====================================================================================
 METHOD CreateInitializedIUriBuilder ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF ppIUriBuilder AS IUriBuilder
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IUriBuilderFactory_INTERFACE_DEFINED__ */
DECLARE FUNCTION CreateIUriBuilder LIB "urlmon.dll" ALIAS "CreateIUriBuilder" ( BYVAL pIUri AS IUri , BYVAL dwFlags AS QUAD , BYVAL dwReserved AS QUAD , BYREF ppIUriBuilder AS IUriBuilder ) AS LONG
' ########################################################################################
' IWinInetInfo interface
' IID = 79EAC9D6-BAFA-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' This interface retrieves option information used by the underlying Microsoft Win32
' Internet functions.
' Client applications can call QueryInterface on the IBinding interface to get a pointer
' to the IWinInetInfo interface after your implementation of the
' IBindStatusCallback::OnProgress method has been called. Not all protocol schemes support
' this interface.
' ########################################################################################
#IF NOT %DEF(%IWinInetInfo_INTERFACE_DEFINED)
 %IWinInetInfo_INTERFACE_DEFINED = 1
$IID_IWinInetInfo = GUID$("{79EAC9D6-BAFA-11CE-8C82-00AA004BA90B}")
INTERFACE IWinInetInfo $IID_IWinInetInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD QueryOption ( ' VTable offset = 12
 BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYREF pcbBuf AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWinInetInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IHttpSecurity interface
' IID = 79EAC9D7-BAFA-11CE-8C82-00AA004BA90B
' Inherited interface = IWindowForBindingUI
' This interface notifies a client application of authentication problems.
' Urlmon.dll uses the QueryInterface method on your implementation of IBindStatusCallback
' to obtain a pointer to your IHttpSecurity interface. If the application is hosting
' Mshtml.dll, Mshtml.dll will request a pointer to your IHttpSecurity interface by calling
' QueryInterface on your IServiceProvider interface.
' ########################################################################################
#IF NOT %DEF(%IHttpSecurity_INTERFACE_DEFINED)
 %IHttpSecurity_INTERFACE_DEFINED = 1
$IID_IHttpSecurity = GUID$("{79EAC9D7-BAFA-11CE-8C82-00AA004BA90B}")
INTERFACE IHttpSecurity $IID_IHttpSecurity
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetWindow ( ' VTable offset = 12
 BYREF rguidReason AS GUID
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnSecurityProblem ( ' VTable offset = 16
 BYVAL dwProblem AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IHttpSecurity_INTERFACE_DEFINED__ */
' ########################################################################################
' IWinInetHttpInfo interface
' IID = 79EAC9D8-BAFA-11CE-8C82-00AA004BA90B
' Inherited interface = IWinInetInfo
' This interface checks information on HTTP requests made through the underlying Microsoft
' Win32 Internet functions.
' Client applications can call QueryInterface on the IBinding interface to get a pointer
' to the IWinInetHttpInfo interface after your implementation of the
' IBindStatusCallback::OnProgress method has been called.
' ########################################################################################
#IF NOT %DEF(%IWinInetHttpInfo_INTERFACE_DEFINED)
 %IWinInetHttpInfo_INTERFACE_DEFINED = 1
$IID_IWinInetHttpInfo = GUID$("{79EAC9D8-BAFA-11CE-8C82-00AA004BA90B}")
INTERFACE IWinInetHttpInfo $IID_IWinInetHttpInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD QueryOption ( ' VTable offset = 12
 BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYREF pcbBuf AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInfo ( ' VTable offset = 16
 BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYREF pcbBuf AS DWORD
 , BYREF pdwFlags AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWinInetHttpInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IWinInetCacheHints interface
' IID = 79EAC9D8-BAFA-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' Allows an URLMON client to change the file extension on the Microsoft Win32 Internet
' (WinInet) cache file.
' The IWinInetCacheHints interface was introduced in Internet Explorer 6 for Microsoft
' Windows XP Service Pack 2 (SP2).
' ########################################################################################
#IF NOT %DEF(%IWinInetCacheHints_INTERFACE_DEFINED)
 %IWinInetCacheHints_INTERFACE_DEFINED = 1
$IID_IWinInetCacheHints = GUID$("{79EAC9D8-BAFA-11CE-8C82-00AA004BA90B}")
INTERFACE IWinInetCacheHints $IID_IWinInetCacheHints
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetCacheExtension ( ' VTable offset = 12
 BYREF pwzExt AS WSTRINGZ
 , BYVAL pszCacheFile AS DWORD
 , BYREF pcbCacheFile AS DWORD
 , BYREF pdwWinInetError AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWinInetCacheHints_INTERFACE_DEFINED__ */
' ########################################################################################
' IWinInetCacheHints2 interface
' IID = 7857AEAC-D31F-49BF-884E-DD46DF36780A
' Inherited interface = IWinInetCacheHints
' ########################################################################################
#IF NOT %DEF(%IWinInetCacheHints2_INTERFACE_DEFINED)
 %IWinInetCacheHints2_INTERFACE_DEFINED = 1
$IID_IWinInetCacheHints2 = GUID$("{7857AEAC-D31F-49BF-884E-DD46DF36780A}")
INTERFACE IWinInetCacheHints2 $IID_IWinInetCacheHints2
 INHERIT IUnknown
 ' =====================================================================================
 ' IWinInetCacheHints Method
 ' =====================================================================================
 METHOD SetCacheExtension ( ' VTable offset = 12
 BYREF pwzExt AS WSTRINGZ
 , BYVAL pszCacheFile AS DWORD
 , BYREF pcbCacheFile AS DWORD
 , BYREF pdwWinInetError AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IWinInetCacheHints2 Method
 ' =====================================================================================
 METHOD SetCacheExtension2 ( ' VTable offset = 16
 BYREF pwzExt AS WSTRINGZ
 , BYREF pwzCacheFile AS IWinInetCacheHints2
 , BYREF pcchCacheFile AS DWORD
 , BYREF pdwWinInetError AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWinInetCacheHints2_INTERFACE_DEFINED__ */
' ########################################################################################
' IBindHost interface
' IID = FC4801A1-2BA9-11CF-A229-00AA003D7352
' Inherited interface = IUnknown
' This interface is implemented by an Microsoft ActiveX container to allow controls to
' perform asynchronous data transfers through the container.
' ########################################################################################
#IF NOT %DEF(%IBindHost_INTERFACE_DEFINED)
 %IBindHost_INTERFACE_DEFINED = 1
$IID_IBindHost = GUID$("{FC4801A1-2BA9-11CF-A229-00AA003D7352}")
$SID_IBindHost = GUID$("{FC4801A1-2BA9-11CF-A229-00AA003D7352}")
INTERFACE IBindHost $IID_IBindHost
 INHERIT IUnknown
 ' =====================================================================================
 METHOD CreateMoniker ( ' VTable offset = 12
 BYVAL szName AS DWORD
 , BYVAL pbc AS IBindCtx
 , BYREF ppmk AS IMoniker
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD MonikerBindToStorage ( ' VTable offset = 16
 BYVAL pMk AS IMoniker
 , BYVAL pbc AS IBindCtx
 , BYVAL pbsc AS IBindStatusCallback
 , BYREF riid AS GUID
 , BYREF ppvObj AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD MonikerBindToObject ( ' VTable offset = 20
 BYVAL pMk AS IMoniker
 , BYVAL pbc AS IBindCtx
 , BYVAL pbsc AS IBindStatusCallback
 , BYREF riid AS GUID
 , BYREF ppvObj AS IUnknown
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IBindHost_INTERFACE_DEFINED__ */
'// These are for backwards compatibility with previous URLMON versions
'// Flags for the UrlDownloadToCacheFile
%EQUATE `URLOSTRM_USECACHEDCOPY_ONLY = &H1 ' // Only get from cache
%EQUATE `URLOSTRM_USECACHEDCOPY = &H2 ' // Get from cache if available else download
%EQUATE `URLOSTRM_GETNEWESTVERSION = &H3 ' // Get new version only. But put it in cache too
'struct IBindStatusCallback;
DECLARE FUNCTION HlinkSimpleNavigateToString LIB "urlmon.dll" ALIAS "HlinkSetSimpleNavigateToString" ( BYREF szTarget AS WSTRINGZ , BYREF szLocation AS WSTRINGZ , BYREF szTargetFrameName AS WSTRINGZ , BYVAL pUnk AS IUnknown , BYVAL pbc AS IBindCtx , BYVAL pbsc AS IBindStatusCallback , BYVAL grfHLNF AS QUAD , BYVAL dwReserved AS QUAD ) AS LONG
DECLARE FUNCTION HlinkSimpleNavigateToMoniker LIB "urlmon.dll" ALIAS "HlinkSetSimpleNavigateToMoniker" ( BYVAL pmkTarget AS IMoniker
 , BYREF szLocation AS WSTRINGZ
 , BYREF szTargetFrameName AS WSTRINGZ
 , BYVAL pUnk AS IUnknown
 , BYVAL pbc AS IBindCtx
 , BYVAL pbsc AS IBindStatusCallback
 , BYVAL grfHLNF AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION URLOpenStreamA LIB "urlmon.dll" ALIAS "URLOpenStreamA" ( BYVAL pCaller AS IUnknown
 , BYREF szURL AS ASCIIZ
 , BYVAL dwReserved AS DWORD
 , BYVAL lpfnCB AS IBindStatusCallback
 ) AS LONG
DECLARE FUNCTION URLOpenStreamW LIB "urlmon.dll" ALIAS "URLOpenStreamW" ( BYVAL pCaller AS IUnknown
 , BYREF szURL AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYVAL lpfnCB AS IBindStatusCallback
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO URLOpenStream = URLOpenStreamW
#ELSE
 MACRO URLOpenStream = URLOpenStreamA
#ENDIF
DECLARE FUNCTION URLOpenPullStreamA LIB "urlmon.dll" ALIAS "URLOpenPullStreamA" ( BYVAL pCaller AS IUnknown , BYREF szURL AS ASCIIZ , BYVAL dwReserved AS QUAD , BYVAL lpfnCB AS IBindStatusCallback ) AS LONG
DECLARE FUNCTION URLOpenPullStreamW LIB "urlmon.dll" ALIAS "URLOpenPullStreamW" ( BYVAL pCaller AS IUnknown
 , BYREF szURL AS WSTRINGZ
 , BYVAL dwReserved AS DWORD
 , BYVAL lpfnCB AS IBindStatusCallback
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO URLOpenPullStream = URLOpenPullStreamW
#ELSE
 MACRO URLOpenPullStream = URLOpenPullStreamA
#ENDIF
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION URLDownloadToFileA LIB "UrlMon.dll" ALIAS "URLDownloadToFileA" ( BYVAL pCaller AS QUAD, szURL AS ASCIIZ, szFileName AS ASCIIZ, BYVAL dwReserved AS QUAD, BYVAL lpfnCB AS QUAD) AS LONG
#ELSE
DECLARE FUNCTION URLDownloadToFileA LIB "urlmon.dll" ALIAS "URLDownloadToFileA" ( BYVAL pCaller AS IUnknown , BYREF szURL AS ASCIIZ , BYREF szFileName AS ASCIIZ , BYVAL dwReserved AS QUAD , BYVAL lpfnCB AS IBindStatusCallback ) AS LONG
#ENDIF
#IF %DEF(%USEPBDECL)
DECLARE FUNCTION URLDownloadToFileW LIB "UrlMon.dll" ALIAS "URLDownloadToFileW" ( BYVAL pCaller AS QUAD, szURL AS WSTRINGZ, szFileName AS WSTRINGZ, BYVAL dwReserved AS QUAD, BYVAL lpfnCB AS QUAD) AS LONG
#ELSE
DECLARE FUNCTION URLDownloadToFileW LIB "urlmon.dll" ALIAS "URLDownloadToFileW" ( BYVAL pCaller AS IUnknown , BYREF szURL AS WSTRINGZ , BYREF szFileName AS WSTRINGZ , BYVAL dwReserved AS QUAD , BYVAL lpfnCB AS IBindStatusCallback ) AS LONG
#ENDIF
#IF %DEF(%UNICODE)
 MACRO URLDownloadToFile = URLDownloadToFileW
#ELSE
 MACRO URLDownloadToFile = URLDownloadToFileA
#ENDIF
DECLARE FUNCTION URLDownloadToCacheFileA LIB "urlmon.dll" ALIAS "URLDownloadToCacheFileA" ( BYVAL lpUnkcaller AS IUnknown , BYREF szURL AS ASCIIZ , BYREF szFileName AS ASCIIZ , BYVAL dwBufLength AS QUAD , BYVAL dwReserved AS QUAD , BYVAL pbsc AS IBindStatusCallback ) AS LONG
DECLARE FUNCTION URLDownloadToCacheFileW LIB "urlmon.dll" ALIAS "URLDownloadToCacheFileW" ( BYVAL lpUnkcaller AS IUnknown
 , BYREF szURL AS WSTRINGZ
 , BYREF szFileName AS WSTRINGZ
 , BYVAL dwBufLength AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYVAL pbsc AS IBindStatusCallback
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO URLDownloadToCacheFile = URLDownloadToCacheFileW
#ELSE
 MACRO URLDownloadToCacheFile = URLDownloadToCacheFileA
#ENDIF
DECLARE FUNCTION URLOpenBlockingStreamA LIB "urlmon.dll" ALIAS "URLOpenBlockingStreamA" ( BYVAL pCaller AS IUnknown , BYREF szURL AS ASCIIZ , BYREF ppStream AS IStream , BYVAL dwReserved AS QUAD , BYVAL lpfnCB AS IBindStatusCallback ) AS LONG
DECLARE FUNCTION URLOpenBlockingStreamW LIB "urlmon.dll" ALIAS "URLOpenBlockingStreamW" ( BYVAL pCaller AS IUnknown
 , BYREF szURL AS WSTRINGZ
 , BYREF ppStream AS IStream
 , BYVAL dwReserved AS DWORD
 , BYVAL lpfnCB AS IBindStatusCallback
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO URLOpenBlockingStream = URLOpenBlockingStreamW
#ELSE
 MACRO URLOpenBlockingStream = URLOpenBlockingStreamA
#ENDIF
DECLARE FUNCTION HlinkGoBack LIB "urlmon.dll" ALIAS "HlinkGoBack" ( BYVAL pUnk AS IUnknown ) AS LONG
DECLARE FUNCTION HlinkGoForward LIB "urlmon.dll" ALIAS "HlinkGoForward" ( BYVAL pUnk AS IUnknown
 ) AS LONG
DECLARE FUNCTION HlinkNavigateString LIB "urlmon.dll" ALIAS "HlinkNavigateString" ( BYVAL pUnk AS IUnknown
 , BYREF szTarget AS WSTRINGZ
 ) AS LONG
DECLARE FUNCTION HlinkNavigateMoniker LIB "urlmon.dll" ALIAS "HlinkNavigateMoniker" ( BYVAL pUnk AS IUnknown
 , BYVAL pmkTarget AS IMoniker
 ) AS LONG
#IF NOT %DEF(%URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS)
 %URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS = 1
' ########################################################################################
' IInternet interface
' IID = 79EAC9E0-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternet_INTERFACE_DEFINED)
 %IInternet_INTERFACE_DEFINED = 1
$IID_IInternet = GUID$("{79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternet $IID_IInternet
 INHERIT IUnknown
END INTERFACE
#ENDIF ' /* __IInternet_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetBindInfo interface
' IID = 79EAC9E1-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetBindInfo_INTERFACE_DEFINED)
 %IInternetBindInfo_INTERFACE_DEFINED = 1
' BINDSTRING enum
%EQUATE `BINDSTRING_HEADERS = 1
%EQUATE `BINDSTRING_ACCEPT_MIMES = %BINDSTRING_HEADERS + 1
%EQUATE `BINDSTRING_EXTRA_URL = %BINDSTRING_ACCEPT_MIMES + 1
%EQUATE `BINDSTRING_LANGUAGE = %BINDSTRING_EXTRA_URL + 1
%EQUATE `BINDSTRING_USERNAME = %BINDSTRING_LANGUAGE + 1
%EQUATE `BINDSTRING_PASSWORD = %BINDSTRING_USERNAME + 1
%EQUATE `BINDSTRING_UA_PIXELS = %BINDSTRING_PASSWORD + 1
%EQUATE `BINDSTRING_UA_COLOR = %BINDSTRING_UA_PIXELS + 1
%EQUATE `BINDSTRING_OS = %BINDSTRING_UA_COLOR + 1
%EQUATE `BINDSTRING_USER_AGENT = %BINDSTRING_OS + 1
%EQUATE `BINDSTRING_ACCEPT_ENCODINGS = %BINDSTRING_USER_AGENT + 1
%EQUATE `BINDSTRING_POST_COOKIE = %BINDSTRING_ACCEPT_ENCODINGS + 1
%EQUATE `BINDSTRING_POST_DATA_MIME = %BINDSTRING_POST_COOKIE + 1
%EQUATE `BINDSTRING_URL = %BINDSTRING_POST_DATA_MIME + 1
%EQUATE `BINDSTRING_IID = %BINDSTRING_URL + 1
%EQUATE `BINDSTRING_FLAG_BIND_TO_OBJECT = %BINDSTRING_IID + 1
%EQUATE `BINDSTRING_PTR_BIND_CONTEXT = %BINDSTRING_FLAG_BIND_TO_OBJECT + 1
%EQUATE `BINDSTRING_XDR_ORIGIN = %BINDSTRING_PTR_BIND_CONTEXT + 1
$IID_IInternetBindInfo = GUID$("{79EAC9E1-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetBindInfo $IID_IInternetBindInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetBindInfo ( ' VTable offset = 12
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetBindString ( ' VTable offset = 16
 BYVAL ulStringType AS DWORD
 , BYREF ppwzStr AS DWORD
 , BYVAL cEl AS DWORD
 , BYREF pcElFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetBindInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetBindInfoEx interface
' IID = A3E015B7-A82C-4DCD-A150-569AEEED36AB
' Inherited interface = IInternetBindInfo
' ########################################################################################
#IF NOT %DEF(%IInternetBindInfoEx_INTERFACE_DEFINED)
 %IInternetBindInfoEx_INTERFACE_DEFINED = 1
$IID_IInternetBindInfoEx = GUID$("{A3E015B7-A82C-4DCD-A150-569AEEED36AB}")
INTERFACE IInternetBindInfoEx $IID_IInternetBindInfoEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetBindInfo methods
 ' =====================================================================================
 METHOD GetBindInfo ( ' VTable offset = 12
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetBindString ( ' VTable offset = 16
 BYVAL ulStringType AS DWORD
 , BYREF ppwzStr AS DWORD
 , BYVAL cEl AS DWORD
 , BYREF pcElFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetBindInfoEx methods
 ' =====================================================================================
 METHOD GetBindInfoEx ( ' VTable offset = 20
 BYREF grfBINDF AS DWORD
 , BYREF pbindinfo AS BINDINFO
 , BYREF grfBINDF2 AS DWORD
 , BYREF pdwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetBindInfoEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocolRoot interface
' IID = 79EAC9E3-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetProtocolRoot_INTERFACE_DEFINED)
 %IInternetProtocolRoot_INTERFACE_DEFINED = 1
' PI_FLAGS enum
%EQUATE `PI_PARSE_URL = &H1
%EQUATE `PI_FILTER_MODE = &H2
%EQUATE `PI_FORCE_ASYNC = &H4
%EQUATE `PI_USE_WORKERTHREAD = &H8
%EQUATE `PI_MIMEVERIFICATION = &H10
%EQUATE `PI_CLSIDLOOKUP = &H20
%EQUATE `PI_DATAPROGRESS = &H40
%EQUATE `PI_SYNCHRONOUS = &H80
%EQUATE `PI_APARTMENTTHREADED = &H100
%EQUATE `PI_CLASSINSTALL = &H200
%EQUATE `PI_PASSONBINDCTX = &H2000
%EQUATE `PI_NOMIMEHANDLER = &H8000
%EQUATE `PI_LOADAPPDIRECT = &H4000
%EQUATE `PD_FORCE_SWITCH = &H10000
%EQUATE `PI_PREFERDEFAULTHANDLER = &H20000
%EQUATE `PI_DOCFILECLSIDLOOKUP = %PI_CLSIDLOOKUP
' // Size = 16 bytes
TYPE PROTOCOLDATA DWORD
 grfFlags AS DWORD ' DWORD grfFlags
 dwState AS DWORD ' DWORD dwState
 pData AS DWORD ' LPVOID pData
 cbData AS DWORD ' ULONG cbData
END TYPE
' // Size = 24 bytes
TYPE StartParam DWORD
 iid AS GUID ' IID iid
 pIBindCtx AS DWORD PTR ' IBindCtx *pIBindCtx
 pItf AS DWORD PTR ' IUnknown *pItf
END TYPE
$IID_IInternetProtocolRoot = GUID$("{79EAC9E3-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetProtocolRoot $IID_IInternetProtocolRoot
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 12
 BYREF szUrl AS WSTRINGZ
 , BYVAL pOIProtSink AS IInternetProtocolSink
 , BYVAL pOIBindInfo AS IInternetBindInfo
 , BYVAL grfPI AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Continue ( ' VTable offset = 16
 BYREF pProtocolData AS PROTOCOLDATA
 ) AS LONG
 ' =====================================================================================
 METHOD Abort ( ' VTable offset = 20
 BYVAL hrReason AS DWORD
 , BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Terminate ( ' VTable offset = 24
 BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Suspend ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocolRoot_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocol interface
' IID = 79EAC9E4-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IInternetProtocolRoot
' ########################################################################################
#IF NOT %DEF(%IInternetProtocol_INTERFACE_DEFINED)
 %IInternetProtocol_INTERFACE_DEFINED = 1
$IID_IInternetProtocol = GUID$("{79EAC9E4-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetProtocol $IID_IInternetProtocol
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetProtocolRoot Methods
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 12
 BYREF szUrl AS WSTRINGZ
 , BYVAL pOIProtSink AS IInternetProtocolSink
 , BYVAL pOIBindInfo AS IInternetBindInfo
 , BYVAL grfPI AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Continue ( ' VTable offset = 16
 BYREF pProtocolData AS PROTOCOLDATA
 ) AS LONG
 ' =====================================================================================
 METHOD Abort ( ' VTable offset = 20
 BYVAL hrReason AS DWORD
 , BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Terminate ( ' VTable offset = 24
 BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Suspend ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetProtocol Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 36
 BYREF pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 40
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD LockRequest ( ' VTable offset = 44
 BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRequest ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocol_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocolEx interface
' IID = C7A98E66-1010-492C-A1C8-C809E1F75905
' Inherited interface = IInternetProtocol
' ########################################################################################
#IF NOT %DEF(%IInternetProtocolEx_INTERFACE_DEFINED)
 %IInternetProtocol_INTERFACE_DEFINED = 1
$IID_IInternetProtocolEx = GUID$("{C7A98E66-1010-492C-A1C8-C809E1F75905}")
INTERFACE IInternetProtocolEx $IID_IInternetProtocolEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetProtocolRoot Methods
 ' =====================================================================================
 METHOD Start ( ' VTable offset = 12
 BYREF szUrl AS WSTRINGZ
 , BYVAL pOIProtSink AS IInternetProtocolSink
 , BYVAL pOIBindInfo AS IInternetBindInfo
 , BYVAL grfPI AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Continue ( ' VTable offset = 16
 BYREF pProtocolData AS PROTOCOLDATA
 ) AS LONG
 ' =====================================================================================
 METHOD Abort ( ' VTable offset = 20
 BYVAL hrReason AS DWORD
 , BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Terminate ( ' VTable offset = 24
 BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Suspend ( ' VTable offset = 28
 ) AS LONG
 ' =====================================================================================
 METHOD Resume ( ' VTable offset = 32
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetProtocol Methods
 ' =====================================================================================
 METHOD Read ( ' VTable offset = 36
 BYREF pv AS DWORD
 , BYVAL cb AS DWORD
 , BYREF pcbRead AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Seek ( ' VTable offset = 40
 BYVAL dlibMove AS QUAD
 , BYVAL dwOrigin AS DWORD
 , BYREF plibNewPosition AS QUAD
 ) AS LONG
 ' =====================================================================================
 METHOD LockRequest ( ' VTable offset = 44
 BYVAL dwOptions AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnlockRequest ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetProtocolEx Methods
 ' =====================================================================================
 METHOD StartEx ( ' VTable offset = 52
 BYVAL pUri AS IUri
 , BYVAL pOIProtSink AS IInternetProtocolSink
 , BYVAL pOIBindInfo AS IInternetBindInfo
 , BYVAL grfPI AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocolEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocolSink interface
' IID = 79EAC9E5-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetProtocolSink_INTERFACE_DEFINED)
 %IInternetProtocolSink_INTERFACE_DEFINED = 1
$IID_IInternetProtocolSink = GUID$("{79EAC9E5-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetProtocolSink $IID_IInternetProtocolSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Switch ( ' VTable offset = 12
 BYREF pProtocolData AS PROTOCOLDATA
 ) AS LONG
 ' =====================================================================================
 METHOD ReportProgress ( ' VTable offset = 20
 BYVAL ulStatusCode AS DWORD
 , BYREF szStatusText AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD ReportData ( ' VTable offset = 24
 BYVAL grfBSCF AS DWORD
 , BYVAL ulProgress AS DWORD
 , BYVAL ulProgressMax AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ReportResult ( ' VTable offset = 28
 BYVAL hrResult AS LONG
 , BYVAL dwError AS DWORD
 , BYREF szResult AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocolSink_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocolSinkStackable interface
' IID = 79EAC9F0-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetProtocolSinkStackable_INTERFACE_DEFINED)
 %IInternetProtocolSinkStackable_INTERFACE_DEFINED = 1
$IID_IInternetProtocolSinkStackable = GUID$("{79EAC9F0-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetProtocolSinkStackable $IID_IInternetProtocolSinkStackable
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SwitchSink ( ' VTable offset = 12
 BYVAL pOIProtSink AS IInternetProtocolSink
 ) AS LONG
 ' =====================================================================================
 METHOD CommitSwitch ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD RollbackSwitch ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocolSinkStackable_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetSession interface
' IID = 79EAC9E7-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetSession_INTERFACE_DEFINED)
 %IInternetSession_INTERFACE_DEFINED = 1
' OIBDG_FLAGS enum
%EQUATE `OIBDG_APARTMENTTHREADED = &H100
%EQUATE `OIBDG_DATAONLY = &H1000
$IID_IInternetSession = GUID$("{79EAC9E7-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetSession $IID_IInternetSession
 INHERIT IUnknown
 ' =====================================================================================
 METHOD RegisterNameSpace ( ' VTable offset = 12
 BYVAL pCF AS IClassFactory
 , BYREF rclsid AS GUID
 , BYREF pwzProtocol AS WSTRINGZ
 , BYVAL cPatterns AS DWORD
 , BYREF ppwzPatterns AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterNameSpace ( ' VTable offset = 16
 BYVAL pCF AS IClassFactory
 , BYREF pszProtocol AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD RegisterMimeFilter ( ' VTable offset = 20
 BYVAL pCF AS IClassFactory
 , BYREF rclsid AS GUID
 , BYREF pwzType AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD UnregisterMimeFilter ( ' VTable offset = 24
 BYVAL pCF AS IClassFactory
 , BYREF pwzType AS WSTRINGZ
 ) AS LONG
 ' =====================================================================================
 METHOD CreateBinding ( ' VTable offset = 28
 BYVAL pBC AS IBindCtx
 , BYREF szUrl AS WSTRINGZ
 , BYVAL pUnkOuter AS IUnknown
 , BYREF ppUnk AS IUnknown
 , BYREF ppOInetProt AS IInternetProtocol
 , BYVAL dwOption AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSessionOption ( ' VTable offset = 32
 BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYVAL dwBufferLength AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSessionOption ( ' VTable offset = 36
 BYVAL dwOption AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYREF pdwBufferLength AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetSession_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetThreadSwitch interface
' IID = 79EAC9E8-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetThreadSwitch_INTERFACE_DEFINED)
 %IInternetThreadSwitch_INTERFACE_DEFINED = 1
$IID_IInternetThreadSwitch = GUID$("{79EAC9E8-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetThreadSwitch $IID_IInternetThreadSwitch
 INHERIT IUnknown
 ' =====================================================================================
 METHOD Prepare ( ' VTable offset = 12
 ) AS LONG
 ' =====================================================================================
 METHOD Continue ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetThreadSwitch_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetPriority interface
' IID = 79EAC9EB-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetPriority_INTERFACE_DEFINED)
 %IInternetPriority_INTERFACE_DEFINED = 1
$IID_IInternetPriority = GUID$("{79EAC9EB-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetPriority $IID_IInternetPriority
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetPriority ( ' VTable offset = 12
 BYVAL nPriority AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetPriority ( ' VTable offset = 16
 BYREF pnPriority AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetPriority_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetProtocolInfo interface
' IID = 79EAC9EC-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetProtocolInfo_INTERFACE_DEFINED)
 %IInternetProtocolInfo_INTERFACE_DEFINED = 1
' PARSEACTION enum
%EQUATE `PARSE_CANONICALIZE = 1
%EQUATE `PARSE_FRIENDLY = %PARSE_CANONICALIZE + 1
%EQUATE `PARSE_SECURITY_URL = %PARSE_FRIENDLY + 1
%EQUATE `PARSE_ROOTDOCUMENT = %PARSE_SECURITY_URL + 1
%EQUATE `PARSE_DOCUMENT = %PARSE_ROOTDOCUMENT + 1
%EQUATE `PARSE_ANCHOR = %PARSE_DOCUMENT + 1
%EQUATE `PARSE_ENCODE = %PARSE_ANCHOR + 1
%EQUATE `PARSE_DECODE = %PARSE_ENCODE + 1
%EQUATE `PARSE_PATH_FROM_URL = %PARSE_DECODE + 1
%EQUATE `PARSE_URL_FROM_PATH = %PARSE_PATH_FROM_URL + 1
%EQUATE `PARSE_MIME = %PARSE_URL_FROM_PATH + 1
%EQUATE `PARSE_SERVER = %PARSE_MIME + 1
%EQUATE `PARSE_SCHEMA = %PARSE_SERVER + 1
%EQUATE `PARSE_SITE = %PARSE_SCHEMA + 1
%EQUATE `PARSE_DOMAIN = %PARSE_SITE + 1
%EQUATE `PARSE_LOCATION = %PARSE_DOMAIN + 1
%EQUATE `PARSE_SECURITY_DOMAIN = %PARSE_LOCATION + 1
%EQUATE `PARSE_ESCAPE = %PARSE_SECURITY_DOMAIN + 1
%EQUATE `PARSE_UNESCAPE = %PARSE_ESCAPE + 1
' PSUACTION enum
%EQUATE `PSU_DEFAULT = 1
%EQUATE `PSU_SECURITY_URL_ONLY = %PSU_DEFAULT + 1
' QUERYOPTION enum
%EQUATE `QUERY_EXPIRATION_DATE = 1
%EQUATE `QUERY_TIME_OF_LAST_CHANGE = %QUERY_EXPIRATION_DATE + 1
%EQUATE `QUERY_CONTENT_ENCODING = %QUERY_TIME_OF_LAST_CHANGE + 1
%EQUATE `QUERY_CONTENT_TYPE = %QUERY_CONTENT_ENCODING + 1
%EQUATE `QUERY_REFRESH = %QUERY_CONTENT_TYPE + 1
%EQUATE `QUERY_RECOMBINE = %QUERY_REFRESH + 1
%EQUATE `QUERY_CAN_NAVIGATE = %QUERY_RECOMBINE + 1
%EQUATE `QUERY_USES_NETWORK = %QUERY_CAN_NAVIGATE + 1
%EQUATE `QUERY_IS_CACHED = %QUERY_USES_NETWORK + 1
%EQUATE `QUERY_IS_INSTALLEDENTRY = %QUERY_IS_CACHED + 1
%EQUATE `QUERY_IS_CACHED_OR_MAPPED = %QUERY_IS_INSTALLEDENTRY + 1
%EQUATE `QUERY_USES_CACHE = %QUERY_IS_CACHED_OR_MAPPED + 1
%EQUATE `QUERY_IS_SECURE = %QUERY_USES_CACHE + 1
%EQUATE `QUERY_IS_SAFE = %QUERY_IS_SECURE + 1
%EQUATE `QUERY_USES_HISTORYFOLDER = %QUERY_IS_SAFE + 1
$IID_IInternetProtocolInfo = GUID$("{79EAC9EC-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetProtocolInfo $IID_IInternetProtocolInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ParseUrl ( ' VTable offset = 12
 BYREF pwzUrl AS WSTRINGZ
 , BYVAL ParseAction AS DWORD
 , BYVAL dwParseFlags AS DWORD
 , BYREF pwzResult AS WSTRINGZ
 , BYVAL cchResult AS DWORD
 , BYREF pcchResult AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CombineUrl ( ' VTable offset = 16
 BYREF pwzBaseUrl AS WSTRINGZ
 , BYREF pwzRelativeUrl AS WSTRINGZ
 , BYVAL dwCombineFlags AS DWORD
 , BYREF pwzResult AS WSTRINGZ
 , BYVAL cchResult AS DWORD
 , BYREF pcchResult AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CompareUrl ( ' VTable offset = 20
 BYREF pwzUrl1 AS WSTRINGZ
 , BYREF pwzUrl2 AS WSTRINGZ
 , BYVAL dwCompareFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInfo ( ' VTable offset = 24
 BYREF pwzUrl AS WSTRINGZ
 , BYVAL OueryOption AS DWORD
 , BYVAL dwQueryFlags AS DWORD
 , BYVAL pBuffer AS DWORD
 , BYVAL cbBuffer AS DWORD
 , BYREF pcbBuf AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetProtocolInfo_INTERFACE_DEFINED__ */
'#ifndef URLMON_STRICT
'// PARSE_ENCODE was misnamed and is deprecated for PARSE_UNESCAPE
'#define PARSE_ENCODE PARSE_ENCODE_IS_UNESCAPE
'// PARSE_DECODE was misnamed and is deprecated for PARSE_ESCAPE
'#define PARSE_DECODE PARSE_DECODE_IS_ESCAPE
'#endif //!URLMON_STRICT
'#endif
'#define IOInet IInternet
'#define IOInetBindInfo IInternetBindInfo
'#define IOInetBindInfoEx IInternetBindInfoEx
'#define IOInetProtocolRoot IInternetProtocolRoot
'#define IOInetProtocol IInternetProtocol
'#if (_WIN32_IE >= _WIN32_IE_IE70)
'#define IOInetProtocolEx IInternetProtocolEx
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#define IOInetProtocolSink IInternetProtocolSink
'#define IOInetProtocolInfo IInternetProtocolInfo
'#define IOInetSession IInternetSession
'#define IOInetPriority IInternetPriority
'#define IOInetThreadSwitch IInternetThreadSwitch
'#define IOInetProtocolSinkStackable IInternetProtocolSinkStackable
'#define LPOINET LPIINTERNET
'#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO
'#define LPOINETBINDINFO LPIINTERNETBINDINFO
'#define LPOINETPROTOCOLROOT LPIINTERNETPROTOCOLROOT
'#define LPOINETPROTOCOL LPIINTERNETPROTOCOL
'#if (_WIN32_IE >= _WIN32_IE_IE70)
'#define LPOINETPROTOCOLEX LPIINTERNETPROTOCOLEX
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#define LPOINETPROTOCOLSINK LPIINTERNETPROTOCOLSINK
'#define LPOINETSESSION LPIINTERNETSESSION
'#define LPOINETTHREADSWITCH LPIINTERNETTHREADSWITCH
'#define LPOINETPRIORITY LPIINTERNETPRIORITY
'#define LPOINETPROTOCOLINFO LPIINTERNETPROTOCOLINFO
'#define LPOINETPROTOCOLSINKSTACKABLE LPIINTERNETPROTOCOLSINKSTACKABLE
'#define IID_IOInet IID_IInternet
'#define IID_IOInetBindInfo IID_IInternetBindInfo
'#define IID_IOInetBindInfoEx IID_IInternetBindInfoEx
'#define IID_IOInetProtocolRoot IID_IInternetProtocolRoot
'#define IID_IOInetProtocol IID_IInternetProtocol
'#if (_WIN32_IE >= _WIN32_IE_IE70)
'#define IID_IOInetProtocolEx IID_IInternetProtocolEx
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#define IID_IOInetProtocolSink IID_IInternetProtocolSink
'#define IID_IOInetProtocolInfo IID_IInternetProtocolInfo
'#define IID_IOInetSession IID_IInternetSession
'#define IID_IOInetPriority IID_IInternetPriority
'#define IID_IOInetThreadSwitch IID_IInternetThreadSwitch
'#define IID_IOInetProtocolSinkStackable IID_IInternetProtocolSinkStackable
DECLARE FUNCTION CoInternetParseUrl LIB "urlmon.dll" ALIAS "CoInternetParseUrl" ( BYREF pwzUrl AS WSTRINGZ , BYVAL ParseAction AS QUAD , BYVAL dwFlags AS QUAD , BYREF pszResult AS WSTRINGZ , BYVAL cchResult AS QUAD , BYREF pcchResult AS QUAD , BYVAL dwReserved AS QUAD ) AS LONG
'#if (_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CoInternetParseIUri LIB "urlmon.dll" ALIAS "CoInternetParseIUri" ( BYVAL pIUri AS IUri , BYREF ParseAction AS QUAD , BYVAL dwFlags AS QUAD , BYREF pwzResult AS WSTRINGZ , BYVAL cchResult AS QUAD , BYREF pcchResult AS QUAD , BYVAL dwReserved AS QUAD ) AS LONG
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CoInternetCombineUrl LIB "urlmon.dll" ALIAS "CoInternetCombineUrl" ( BYREF pwzBaseUrl AS WSTRINGZ , BYREF pwzRelativeUrl AS WSTRINGZ , BYVAL dwCombineFlags AS QUAD , BYREF pszResult AS WSTRINGZ , BYVAL cchResult AS QUAD , BYREF pcchResult AS QUAD , BYVAL dwReserved AS QUAD ) AS LONG
'#if (_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CoInternetCombineUrlEx LIB "urlmon.dll" ALIAS "CoInternetCombineUrlEx" ( BYVAL pBaseUri AS IUri , BYREF pwzRelativeUrl AS WSTRINGZ , BYVAL dwCombineFlags AS QUAD , BYREF ppCombinedUri AS IUri , BYVAL dwReserved AS QUAD ) AS LONG
DECLARE FUNCTION CoInternetCombineIUri LIB "urlmon.dll" ALIAS "CoInternetCombineIUri" ( BYVAL pBaseUri AS IUri
 , BYVAL pRelativeUri AS IUri
 , BYVAL dwCombineFlags AS DWORD
 , BYREF ppCombinedUri AS IUri
 , BYVAL dwReserved AS DWORD
 ) AS LONG
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CoInternetCompareUrl LIB "urlmon.dll" ALIAS "CoInternetCompareUrl" ( BYREF pwzUrl1 AS WSTRINGZ , BYREF pwzUrl2 AS WSTRINGZ , BYVAL dwFlags AS QUAD ) AS LONG
DECLARE FUNCTION CoInternetGetProtocolFlags LIB "urlmon.dll" ALIAS "CoInternetGetProtocolFlags" ( BYREF pwzUrl AS WSTRINGZ
 , BYREF pdwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION CoInternetQueryInfo LIB "urlmon.dll" ALIAS "CoInternetQueryInfo" ( BYREF pwzUrl AS WSTRINGZ
 , BYVAL QueryOptions AS DWORD
 , BYVAL dwQueryFlags AS DWORD
 , BYVAL pvBuffer AS DWORD
 , BYVAL cbBuffer AS DWORD
 , BYREF pcbBuffer AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION CoInternetGetSession LIB "urlmon.dll" ALIAS "CoInternetGetSession" ( BYVAL dwSessionMode AS DWORD
 , BYREF ppIInternetSession AS IInternetSession
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION CoInternetGetSecurityUrl LIB "urlmon.dll" ALIAS "CoInternetGetSecurityUrl" ( BYREF pwzUrl AS WSTRINGZ
 , BYREF ppwzSecUrl AS DWORD
 , BYVAL psuAction AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
DECLARE FUNCTION AsyncInstallDistributionUnit LIB "urlmon.dll" ALIAS "AsyncInstallDistributionUnit" ( BYREF szDistUnit AS WSTRINGZ
 , BYREF szTYPE AS WSTRINGZ
 , BYREF szExt AS WSTRINGZ
 , BYVAL dwFileVersionMS AS DWORD
 , BYVAL dwFileVersionLS AS DWORD
 , BYREF szURL AS WSTRINGZ
 , BYVAL pbc AS IBindCtx
 , BYVAL pvReserved AS DWORD
 , BYVAL flags AS DWORD
 ) AS LONG
'#if (_WIN32_IE >= _WIN32_IE_IE70)
DECLARE FUNCTION CoInternetGetSecurityUrlEx LIB "urlmon.dll" ALIAS "CoInternetGetSecurityUrlEx" ( BYVAL pUri AS IUri , BYREF ppSecUri AS IUri , BYVAL psuAction AS LONG , BYVAL dwReserved AS QUAD ) AS LONG
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
'#ifndef _INTERNETFEATURELIST_DEFINED
'#define _INTERNETFEATURELIST_DEFINED
' INTERNETFEATURELIST enum
%EQUATE `FEATURE_OBJECT_CACHING = 0
%EQUATE `FEATURE_ZONE_ELEVATION = %FEATURE_OBJECT_CACHING + 1
%EQUATE `FEATURE_MIME_HANDLING = %FEATURE_ZONE_ELEVATION + 1
%EQUATE `FEATURE_MIME_SNIFFING = %FEATURE_MIME_HANDLING + 1
%EQUATE `FEATURE_WINDOW_RESTRICTIONS = %FEATURE_MIME_SNIFFING + 1
%EQUATE `FEATURE_WEBOC_POPUPMANAGEMENT = %FEATURE_WINDOW_RESTRICTIONS + 1
%EQUATE `FEATURE_BEHAVIORS = %FEATURE_WEBOC_POPUPMANAGEMENT + 1
%EQUATE `FEATURE_DISABLE_MK_PROTOCOL = %FEATURE_BEHAVIORS + 1
%EQUATE `FEATURE_LOCALMACHINE_LOCKDOWN = %FEATURE_DISABLE_MK_PROTOCOL + 1
%EQUATE `FEATURE_SECURITYBAND = %FEATURE_LOCALMACHINE_LOCKDOWN + 1
%EQUATE `FEATURE_RESTRICT_ACTIVEXINSTALL = %FEATURE_SECURITYBAND + 1
%EQUATE `FEATURE_VALIDATE_NAVIGATE_URL = %FEATURE_RESTRICT_ACTIVEXINSTALL + 1
%EQUATE `FEATURE_RESTRICT_FILEDOWNLOAD = %FEATURE_VALIDATE_NAVIGATE_URL + 1
%EQUATE `FEATURE_ADDON_MANAGEMENT = %FEATURE_RESTRICT_FILEDOWNLOAD + 1
%EQUATE `FEATURE_PROTOCOL_LOCKDOWN = %FEATURE_ADDON_MANAGEMENT + 1
%EQUATE `FEATURE_HTTP_USERNAME_PASSWORD_DISABLE = %FEATURE_PROTOCOL_LOCKDOWN + 1
%EQUATE `FEATURE_SAFE_BINDTOOBJECT = %FEATURE_HTTP_USERNAME_PASSWORD_DISABLE + 1
%EQUATE `FEATURE_UNC_SAVEDFILECHECK = %FEATURE_SAFE_BINDTOOBJECT + 1
%EQUATE `FEATURE_GET_URL_DOM_FILEPATH_UNENCODED = %FEATURE_UNC_SAVEDFILECHECK + 1
%EQUATE `FEATURE_TABBED_BROWSING = %FEATURE_GET_URL_DOM_FILEPATH_UNENCODED + 1
%EQUATE `FEATURE_SSLUX = %FEATURE_TABBED_BROWSING + 1
%EQUATE `FEATURE_DISABLE_NAVIGATION_SOUNDS = %FEATURE_SSLUX + 1
%EQUATE `FEATURE_DISABLE_LEGACY_COMPRESSION = %FEATURE_DISABLE_NAVIGATION_SOUNDS + 1
%EQUATE `FEATURE_FORCE_ADDR_AND_STATUS = %FEATURE_DISABLE_LEGACY_COMPRESSION + 1
%EQUATE `FEATURE_XMLHTTP = %FEATURE_FORCE_ADDR_AND_STATUS + 1
%EQUATE `FEATURE_DISABLE_TELNET_PROTOCOL = %FEATURE_XMLHTTP + 1
%EQUATE `FEATURE_FEEDS = %FEATURE_DISABLE_TELNET_PROTOCOL + 1
%EQUATE `FEATURE_BLOCK_INPUT_PROMPTS = %FEATURE_FEEDS + 1
%EQUATE `FEATURE_ENTRY_COUNT = %FEATURE_BLOCK_INPUT_PROMPTS + 1
'// CoInternetSetFeatureEnabled can be used to set/reset features.
'// The following flags control where the feature is set
%EQUATE `SET_FEATURE_ON_THREAD = &H00000001
%EQUATE `SET_FEATURE_ON_PROCESS = &H00000002
%EQUATE `SET_FEATURE_IN_REGISTRY = &H00000004
%EQUATE `SET_FEATURE_ON_THREAD_LOCALMACHINE = &H00000008
%EQUATE `SET_FEATURE_ON_THREAD_INTRANET = &H00000010
%EQUATE `SET_FEATURE_ON_THREAD_TRUSTED = &H00000020
%EQUATE `SET_FEATURE_ON_THREAD_INTERNET = &H00000040
%EQUATE `SET_FEATURE_ON_THREAD_RESTRICTED = &H00000080
'// CoInternetIsFeatureEnabled can be used to get features.
'// The following flags control where the feature is obtained from
'// default is from process
%EQUATE `GET_FEATURE_FROM_THREAD = &H00000001
%EQUATE `GET_FEATURE_FROM_PROCESS = &H00000002
%EQUATE `GET_FEATURE_FROM_REGISTRY = &H00000004
%EQUATE `GET_FEATURE_FROM_THREAD_LOCALMACHINE = &H00000008
%EQUATE `GET_FEATURE_FROM_THREAD_INTRANET = &H00000010
%EQUATE `GET_FEATURE_FROM_THREAD_TRUSTED = &H00000020
%EQUATE `GET_FEATURE_FROM_THREAD_INTERNET = &H00000040
%EQUATE `GET_FEATURE_FROM_THREAD_RESTRICTED = &H00000080
'#endif
DECLARE FUNCTION CoInternetSetFeatureEnabled LIB "urlmon.dll" ALIAS "CoInternetSetFeatureEnabled" ( BYVAL FeatureEntry AS QUAD , BYVAL dwFlags AS QUAD , BYVAL fEnable AS QUAD ) AS LONG
DECLARE FUNCTION CoInternetIsFeatureEnabled LIB "urlmon.dll" ALIAS "CoInternetIsFeatureEnabled" ( BYVAL FeatureEntry AS QUAD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
DECLARE FUNCTION CoInternetIsFeatureEnabledForUrl LIB "urlmon.dll" ALIAS "CoInternetIsFeatureEnabledForUrl" ( BYVAL FeatureEntry AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF szURL AS WSTRINGZ
 , BYVAL pSecMgr AS IInternetSecurityManager
 ) AS LONG
DECLARE FUNCTION CoInternetIsFeatureZoneElevationEnabled LIB "urlmon.dll" ALIAS "CoInternetIsFeatureZoneElevationEnabled" ( BYREF szFromURL AS WSTRINGZ
 , BYREF szToURL AS WSTRINGZ
 , BYVAL pSecMgr AS IInternetSecurityManager
 , BYVAL dwFlags AS DWORD
 ) AS LONG
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
DECLARE FUNCTION CopyStgMedium LIB "urlmon.dll" ALIAS "CopyStgMedium" ( BYREF pcstgmedSrc AS STGMEDIUM , BYREF pstgmedDest AS STGMEDIUM ) AS LONG
DECLARE FUNCTION CopyBindInfo LIB "urlmon.dll" ALIAS "CopyBindInfo" ( BYREF pcbiSrc AS BINDINFO
 , BYREF pbiDest AS BINDINFO
 ) AS LONG
DECLARE SUB ReleaseBindInfo LIB "urlmon.dll" ALIAS "ReleaseBindInfo" ( BYREF pbindinfo AS BINDINFO
 ) ' void
%EQUATE `INET_E_USE_DEFAULT_PROTOCOLHANDLER = &H800C0011
%EQUATE `INET_E_USE_DEFAULT_SETTING = &H800C0012
%EQUATE `INET_E_DEFAULT_ACTION = %INET_E_USE_DEFAULT_PROTOCOLHANDLER
%EQUATE `INET_E_QUERYOPTION_UNKNOWN = &H800C0013
%EQUATE `INET_E_REDIRECTING = &H800C0014
'#define OInetParseUrl CoInternetParseUrl
'#define OInetCombineUrl CoInternetCombineUrl
'#if (_WIN32_IE >= _WIN32_IE_IE70)
'#define OInetCombineUrlEx CoInternetCombineUrlEx
'#define OInetCombineIUri CoInternetCombineIUri
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'#define OInetCompareUrl CoInternetCompareUrl
'#define OInetQueryInfo CoInternetQueryInfo
'#define OInetGetSession CoInternetGetSession
#ENDIF ' // !_URLMON_NO_ASYNC_PLUGABLE_PROTOCOLS_
'//
'// Static Protocol flags
'//
%EQUATE `PROTOCOLFLAG_NO_PICS_CHECK = &H00000001
'// Creates the security manager object. The first argument is the Service provider
'// to allow for delegation
DECLARE FUNCTION CoInternetCreateSecurityManager LIB "urlmon.dll" ALIAS "CoInternetCreateSecurityManager" ( BYVAL pSP AS IServiceProvider , BYREF ppSM AS IInternetSecurityManager , BYVAL dwReserved AS QUAD ) AS LONG
DECLARE FUNCTION CoInternetCreateZoneManager LIB "urlmon.dll" ALIAS "CoInternetCreateZoneManager" ( BYVAL pSP AS IServiceProvider
 , BYREF ppZM AS IInternetZoneManager
 , BYVAL dwReserved AS DWORD
 ) AS LONG
'// Security manager CLSID's
'EXTERN_C const IID CLSID_InternetZoneManager;
'EXTERN_C const IID CLSID_PersistentZoneIdentifier;
$CLSID_InternetZoneManager = GUID$("{7B8A2D95-0AC9-11D1-896C-00C04FB6BFC4}")
$CLSID_SBS_InternetZoneManager = $CLSID_InternetZoneManager
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
$CLSID_PersistentZoneIdentifier = GUID$("{0968E258-16C7-4DBA-AA86-462DD61E31A3}")
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
' ########################################################################################
' IInternetSecurityMgrSite interface
' IID = 79EAC9ED-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetSecurityMgrSite_INTERFACE_DEFINED)
 %IInternetSecurityMgrSite_INTERFACE_DEFINED = 1
$IID_IInternetSecurityMgrSite = GUID$("{79EAC9ED-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetSecurityMgrSite $IID_IInternetSecurityMgrSite
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetWindow ( ' VTable offset = 12
 BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD EnableModeless ( ' VTable offset = 16
 BYVAL fEnable AS LONG
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetSecurityMgrSite_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetSecurityManager interface
' IID = 79EAC9EE-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetSecurityManager_INTERFACE_DEFINED)
 %IInternetSecurityManager_INTERFACE_DEFINED = 1
$CLSID_InternetSecurityManager = GUID$("{7B8A2D94-0AC9-11D1-896C-00C04FB6BFC4}")
$CLSID_SBS_InternetSecurityManager = $CLSID_InternetSecurityManager
$IID_IInternetSecurityManager = GUID$("{79EAC9EE-BAF9-11CE-8C82-00AA004BA90B}")
$SID_SInternetSecurityManager = $IID_IInternetSecurityManager
%EQUATE `MUTZ_NOSAVEDFILECHECK = &H00000001 ' // don't check file: for saved file comment
%EQUATE `MUTZ_ISFILE = &H00000002 ' // Assume URL if File, url does not need file: ' //
%EQUATE `MUTZ_ACCEPT_WILDCARD_SCHEME = &H00000080 ' // Accept a wildcard scheme
%EQUATE `MUTZ_ENFORCERESTRICTED = &H00000100 ' // enforce restricted zone independent of URL
%EQUATE `MUTZ_RESERVED = &H00000200 ' // This is same as PUAF_NOSAVEDFILECHECK. However we already have MUTZ_NOSAVEDFILECHECK for this.
%EQUATE `MUTZ_REQUIRESAVEDFILECHECK = &H00000400 ' // always check the file for MOTW (overriding FEATURE_UNC_SAVEDFILECHECK)
%EQUATE `MUTZ_DONT_UNESCAPE = &H00000800 ' // Do not unescape the url
%EQUATE `MUTZ_DONT_USE_CACHE = &H00001000 ' // Do not check the cache
%EQUATE `MUTZ_FORCE_INTRANET_FLAGS = &H00002000 ' // Force the intranet flags to be active
%EQUATE `MUTZ_IGNORE_ZONE_MAPPINGS = &H00004000 ' // Don't look up the Zone Mappings
'// MapUrlToZone returns the zone index given a URL
%EQUATE `MAX_SIZE_SECURITY_ID = 512 ' // bytes
' PUAF enum
%EQUATE `PUAF_DEFAULT = 0
%EQUATE `PUAF_NOUI = &H1
%EQUATE `PUAF_ISFILE = &H2
%EQUATE `PUAF_WARN_IF_DENIED = &H4
%EQUATE `PUAF_FORCEUI_FOREGROUND = &H8
%EQUATE `PUAF_CHECK_TIFS = &H10
%EQUATE `PUAF_DONTCHECKBOXINDIALOG = &H20
%EQUATE `PUAF_TRUSTED = &H40
%EQUATE `PUAF_ACCEPT_WILDCARD_SCHEME = &H80
%EQUATE `PUAF_ENFORCERESTRICTED = &H100
%EQUATE `PUAF_NOSAVEDFILECHECK = &H200
%EQUATE `PUAF_REQUIRESAVEDFILECHECK = &H400
%EQUATE `PUAF_DONT_USE_CACHE = &H1000
%EQUATE `PUAF_RESERVED1 = &H2000
%EQUATE `PUAF_RESERVED2 = &H4000
%EQUATE `PUAF_LMZ_UNLOCKED = &H10000
%EQUATE `PUAF_LMZ_LOCKED = &H20000
%EQUATE `PUAF_DEFAULTZONEPOL = &H40000
%EQUATE `PUAF_NPL_USE_LOCKED_IF_RESTRICTED = &H80000
%EQUATE `PUAF_NOUIIFLOCKED = &H100000
%EQUATE `PUAF_DRAGPROTOCOLCHECK = &H200000
' PUAFOUT enum
%EQUATE `PUAFOUT_DEFAULT = 0
%EQUATE `PUAFOUT_ISLOCKZONEPOLICY = &H1
'// This is the wrapper function that most clients will use.
'// It figures out the current Policy for the passed in Action,
'// and puts up UI if the current Policy indicates that the user
'// should be queried. It returns back the Policy which the caller
'// will use to determine if the action should be allowed
'// This is the wrapper function to conveniently read a custom policy.
' SZM_FLAGS enum
%EQUATE `SZM_CREATE = 0
%EQUATE `SZM_DELETE = &H1
'// SetZoneMapping
'// lpszPattern: string denoting a URL pattern
'// Examples of valid patterns:
'// *://*.msn.com
'// http://*.sony.co.jp
'// *://et.msn.com
'// ftp://157.54.23.41/
'// https://localsvr
'// file:\localsvr\share
'// *://157.54.100-200.*
'// Examples of invalid patterns:
'// http://*.lcs.mit.edu
'// ftp://*
'// dwFlags: SZM_FLAGS values
INTERFACE IInternetSecurityManager $IID_IInternetSecurityManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetSecuritySite ( ' VTable offset = 12
 BYVAL pSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecuritySite ( ' VTable offset = 16
 BYREF ppSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD MapUrlToZone ( ' VTable offset = 20
 BYREF pwszUrl AS WSTRINGZ
 , BYREF pdwZone AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecurityId ( ' VTable offset = 24
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessUrlAction ( ' VTable offset = 28
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryCustomPolicy ( ' VTable offset = 32
 BYREF pwszUrl AS WSTRINGZ
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneMapping ( ' VTable offset = 36
 BYVAL dwZone AS DWORD
 , BYREF lpszPattern AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneMappings ( ' VTable offset = 40
 BYVAL dwZone AS DWORD
 , BYREF ppenumString AS IEnumString
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetSecurityManager_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetSecurityManagerEx interface
' IID = F164EDF1-CC7C-4f0d-9A94-34222625C393
' Inherited interface = IInternetSecurityManager
' ########################################################################################
#IF NOT %DEF(%IInternetSecurityManagerEx_INTERFACE_DEFINED)
 %IInternetSecurityManagerEx_INTERFACE_DEFINED = 1
'/* interface IInternetSecurityManagerEx */
'/* [object][unique][helpstring][uuid] */
'// This is the wrapper function that most clients will use.
'// It figures out the current Policy for the passed in Action,
'// and puts up UI if the current Policy indicates that the user
'// should be queried. It returns back the Policy which the caller
'// will use to determine if the action should be allowed
$IID_IInternetSecurityManagerEx = GUID$("{F164EDF1-CC7C-4f0d-9A94-34222625C393}")
$SID_SInternetSecurityManagerEx = $IID_IInternetSecurityManagerEx
INTERFACE IInternetSecurityManagerEx $IID_IInternetSecurityManagerEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetSecurityManager Methods
 ' =====================================================================================
 METHOD SetSecuritySite ( ' VTable offset = 12
 BYVAL pSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecuritySite ( ' VTable offset = 16
 BYREF ppSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD MapUrlToZone ( ' VTable offset = 20
 BYREF pwszUrl AS WSTRINGZ
 , BYREF pdwZone AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecurityId ( ' VTable offset = 24
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessUrlAction ( ' VTable offset = 28
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryCustomPolicy ( ' VTable offset = 32
 BYREF pwszUrl AS WSTRINGZ
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneMapping ( ' VTable offset = 36
 BYVAL dwZone AS DWORD
 , BYREF lpszPattern AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneMappings ( ' VTable offset = 40
 BYVAL dwZone AS DWORD
 , BYREF ppenumString AS IEnumString
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetSecurityManagerEx Methods
 ' =====================================================================================
 METHOD ProcessUrlActionEx ( ' VTable offset = 44
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF pdwOutFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetSecurityManagerEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetSecurityManagerEx2 interface
' IID = F164EDF1-CC7C-4f0d-9A94-34222625C393
' Inherited interface = IInternetSecurityManagerEx
' ########################################################################################
#IF NOT %DEF(%IInternetSecurityManagerEx2_INTERFACE_DEFINED)
 %IInternetSecurityManagerEx2_INTERFACE_DEFINED = 1
$IID_IInternetSecurityManagerEx2 = GUID$("{F164EDF1-CC7C-4f0d-9A94-34222625C393}")
$SID_SInternetSecurityManagerEx2 = $IID_IInternetSecurityManagerEx2
INTERFACE IInternetSecurityManagerEx2 $IID_IInternetSecurityManagerEx2
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetSecurityManager Methods
 ' =====================================================================================
 METHOD SetSecuritySite ( ' VTable offset = 12
 BYVAL pSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecuritySite ( ' VTable offset = 16
 BYREF ppSite AS IInternetSecurityMgrSite
 ) AS LONG
 ' =====================================================================================
 METHOD MapUrlToZone ( ' VTable offset = 20
 BYREF pwszUrl AS WSTRINGZ
 , BYREF pdwZone AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecurityId ( ' VTable offset = 24
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessUrlAction ( ' VTable offset = 28
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryCustomPolicy ( ' VTable offset = 32
 BYREF pwszUrl AS WSTRINGZ
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneMapping ( ' VTable offset = 36
 BYVAL dwZone AS DWORD
 , BYREF lpszPattern AS WSTRINGZ
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneMappings ( ' VTable offset = 40
 BYVAL dwZone AS DWORD
 , BYREF ppenumString AS IEnumString
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetSecurityManagerEx Methods
 ' =====================================================================================
 METHOD ProcessUrlActionEx ( ' VTable offset = 44
 BYREF pwszUrl AS WSTRINGZ
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF pdwOutFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetSecurityManagerEx2 Methods
 ' =====================================================================================
 METHOD MapUrlToZoneEx2 ( ' VTable offset = 48
 BYVAL pUri AS IUri
 , BYREF pdwZone AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYREF ppwszMappedUrl AS DWORD
 , BYREF pdwOutFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessUrlActionEx2 ( ' VTable offset = 52
 BYVAL pUri AS IUri
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 , BYREF pdwOutFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetSecurityIdEx2 ( ' VTable offset = 56
 BYVAL pUri AS IUri
 , BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryCustomPolicyEx2 ( ' VTable offset = 60
 BYVAL pUri AS IUri
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetSecurityManagerEx2_INTERFACE_DEFINED__ */
' ########################################################################################
' IZoneIdentifier interface
' IID = CD45F185-1B21-48E2-967B-EAD743A8914E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IZoneIdentifier_INTERFACE_DEFINED)
 %IZoneIdentifier_INTERFACE_DEFINED = 1
$IID_IZoneIdentifier = GUID$("{CD45F185-1B21-48E2-967B-EAD743A8914E}")
INTERFACE IZoneIdentifier $IID_IZoneIdentifier
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetId ( ' VTable offset = 12
 BYREF pdwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetId ( ' VTable offset = 16
 BYVAL dwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD Remove ( ' VTable offset = 20
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IZoneIdentifier_INTERFACE_DEFINED__ */
'//This is the interface MSHTML exposes to its clients
'//The clients need not pass in a URL to these functions
'//since MSHTML maintains the notion of the current URL
' ########################################################################################
' IInternetHostSecurityManager interface
' IID = 3AF280B6-CB3F-11D0-891E-00C04FB6BFC4
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetHostSecurityManager_INTERFACE_DEFINED)
 %IInternetHostSecurityManager_INTERFACE_DEFINED = 1
$IID_IInternetHostSecurityManager = GUID$("{3AF280B6-CB3F-11D0-891E-00C04FB6BFC4}")
$SID_SInternetHostSecurityManager = $IID_IInternetHostSecurityManager
INTERFACE IInternetHostSecurityManager $IID_IInternetHostSecurityManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetSecurityId ( ' VTable offset = 12
 BYVAL pbSecurityId AS BYTE PTR
 , BYREF pcbSecurityId AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ProcessUrlAction ( ' VTable offset = 16
 BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwFlags AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryCustomPolicy ( ' VTable offset = 20
 BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL pContext AS BYTE PTR
 , BYVAL cbContext AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetHostSecurityManager_INTERFACE_DEFINED__ */
'// The zone manager maintains policies for a set of standard actions.
'// These actions are identified by integral values (called action indexes)
'// specified below.
'// Minimum legal value for an action
%EQUATE `URLACTION_MIN = &H00001000
%EQUATE `URLACTION_DOWNLOAD_MIN = &H00001000
%EQUATE `URLACTION_DOWNLOAD_SIGNED_ACTIVEX = &H00001001
%EQUATE `URLACTION_DOWNLOAD_UNSIGNED_ACTIVEX = &H00001004
%EQUATE `URLACTION_DOWNLOAD_CURR_MAX = &H00001004
%EQUATE `URLACTION_DOWNLOAD_MAX = &H000011FF
%EQUATE `URLACTION_ACTIVEX_MIN = &H00001200
%EQUATE `URLACTION_ACTIVEX_RUN = &H00001200
%EQUATE `URLPOLICY_ACTIVEX_CHECK_LIST = &H00010000
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_OBJECT_SAFETY = &H00001201 ' // aggregate next four
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_DATA_SAFETY = &H00001202 ' //
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_SCRIPT_SAFETY = &H00001203 ' //
%EQUATE `URLACTION_SCRIPT_OVERRIDE_SAFETY = &H00001401 ' //
%EQUATE `URLACTION_ACTIVEX_CONFIRM_NOOBJECTSAFETY = &H00001204 ' //
%EQUATE `URLACTION_ACTIVEX_TREATASUNTRUSTED = &H00001205
%EQUATE `URLACTION_ACTIVEX_NO_WEBOC_SCRIPT = &H00001206
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_REPURPOSEDETECTION = &H00001207
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_OPTIN = &H00001208
%EQUATE `URLACTION_ACTIVEX_SCRIPTLET_RUN = &H00001209
%EQUATE `URLACTION_ACTIVEX_DYNSRC_VIDEO_AND_ANIMATION = &H0000120A ' //
%EQUATE `URLACTION_ACTIVEX_OVERRIDE_DOMAINLIST = &H0000120B
%EQUATE `URLACTION_ACTIVEX_CURR_MAX = &H0000120B
%EQUATE `URLACTION_ACTIVEX_MAX = &H000013ff
%EQUATE `URLACTION_SCRIPT_MIN = &H00001400
%EQUATE `URLACTION_SCRIPT_RUN = &H00001400
%EQUATE `URLACTION_SCRIPT_JAVA_USE = &H00001402
%EQUATE `URLACTION_SCRIPT_SAFE_ACTIVEX = &H00001405
%EQUATE `URLACTION_CROSS_DOMAIN_DATA = &H00001406
%EQUATE `URLACTION_SCRIPT_PASTE = &H00001407
%EQUATE `URLACTION_ALLOW_XDOMAIN_SUBFRAME_RESIZE = &H00001408
%EQUATE `URLACTION_SCRIPT_XSSFILTER = &H00001409
%EQUATE `URLACTION_SCRIPT_CURR_MAX = &H00001409
%EQUATE `URLACTION_SCRIPT_MAX = &H000015ff
%EQUATE `URLACTION_HTML_MIN = &H00001600
%EQUATE `URLACTION_HTML_SUBMIT_FORMS = &H00001601 ' // aggregate next two
%EQUATE `URLACTION_HTML_SUBMIT_FORMS_FROM = &H00001602 ' //
%EQUATE `URLACTION_HTML_SUBMIT_FORMS_TO = &H00001603 ' //
%EQUATE `URLACTION_HTML_FONT_DOWNLOAD = &H00001604
%EQUATE `URLACTION_HTML_JAVA_RUN = &H00001605 ' // derive from Java custom policy
%EQUATE `URLACTION_HTML_USERDATA_SAVE = &H00001606
%EQUATE `URLACTION_HTML_SUBFRAME_NAVIGATE = &H00001607
%EQUATE `URLACTION_HTML_META_REFRESH = &H00001608
%EQUATE `URLACTION_HTML_INCLUDE_FILE_PATH = &H0000160A
%EQUATE `URLACTION_HTML_MIXED_CONTENT = &H00001609
%EQUATE `URLACTION_HTML_INCLUDE_FILE_PATH = &H0000160A
%EQUATE `URLACTION_HTML_MAX = &H000017ff
%EQUATE `URLACTION_SHELL_MIN = &H00001800
%EQUATE `URLACTION_SHELL_INSTALL_DTITEMS = &H00001800
%EQUATE `URLACTION_SHELL_MOVE_OR_COPY = &H00001802
%EQUATE `URLACTION_SHELL_FILE_DOWNLOAD = &H00001803
%EQUATE `URLACTION_SHELL_VERB = &H00001804
%EQUATE `URLACTION_SHELL_WEBVIEW_VERB = &H00001805
%EQUATE `URLACTION_SHELL_SHELLEXECUTE = &H00001806
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `URLACTION_SHELL_EXECUTE_HIGHRISK = &H00001806
%EQUATE `URLACTION_SHELL_EXECUTE_MODRISK = &H00001807
%EQUATE `URLACTION_SHELL_EXECUTE_LOWRISK = &H00001808
%EQUATE `URLACTION_SHELL_POPUPMGR = &H00001809
%EQUATE `URLACTION_SHELL_RTF_OBJECTS_LOAD = &H0000180A
%EQUATE `URLACTION_SHELL_ENHANCED_DRAGDROP_SECURITY = &H0000180B
%EQUATE `URLACTION_SHELL_EXTENSIONSECURITY = &H0000180C
%EQUATE `URLACTION_SHELL_SECURE_DRAGSOURCE = &H0000180D
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
'#if (_WIN32_IE >= _WIN32_IE_WIN7)
%EQUATE `URLACTION_SHELL_REMOTEQUERY = &H0000180E
%EQUATE `URLACTION_SHELL_PREVIEW = &H0000180F
'#endif //(_WIN32_IE >= _WIN32_IE_WIN7)
%EQUATE `URLACTION_SHELL_CURR_MAX = &H0000180F
%EQUATE `URLACTION_SHELL_MAX = &H000019ff
%EQUATE `URLACTION_NETWORK_MIN = &H00001A00
%EQUATE `URLACTION_CREDENTIALS_USE = &H00001A00
%EQUATE `URLPOLICY_CREDENTIALS_SILENT_LOGON_OK = &H00000000
%EQUATE `URLPOLICY_CREDENTIALS_MUST_PROMPT_USER = &H00010000
%EQUATE `URLPOLICY_CREDENTIALS_CONDITIONAL_PROMPT = &H00020000
%EQUATE `URLPOLICY_CREDENTIALS_ANONYMOUS_ONLY = &H00030000
%EQUATE `URLACTION_AUTHENTICATE_CLIENT = &H00001A01
%EQUATE `URLPOLICY_AUTHENTICATE_CLEARTEXT_OK = &H00000000
%EQUATE `URLPOLICY_AUTHENTICATE_CHALLENGE_RESPONSE = &H00010000
%EQUATE `URLPOLICY_AUTHENTICATE_MUTUAL_ONLY = &H00030000
%EQUATE `URLACTION_COOKIES = &H00001A02
%EQUATE `URLACTION_COOKIES_SESSION = &H00001A03
%EQUATE `URLACTION_CLIENT_CERT_PROMPT = &H00001A04
%EQUATE `URLACTION_COOKIES_THIRD_PARTY = &H00001A05
%EQUATE `URLACTION_COOKIES_SESSION_THIRD_PARTY = &H00001A06
%EQUATE `URLACTION_COOKIES_ENABLED = &H00001A10
%EQUATE `URLACTION_NETWORK_CURR_MAX = &H00001A10
%EQUATE `URLACTION_NETWORK_MAX = &H00001Bff
%EQUATE `URLACTION_JAVA_MIN = &H00001C00
%EQUATE `URLACTION_JAVA_PERMISSIONS = &H00001C00
%EQUATE `URLPOLICY_JAVA_PROHIBIT = &H00000000
%EQUATE `URLPOLICY_JAVA_HIGH = &H00010000
%EQUATE `URLPOLICY_JAVA_MEDIUM = &H00020000
%EQUATE `URLPOLICY_JAVA_LOW = &H00030000
%EQUATE `URLPOLICY_JAVA_CUSTOM = &H00800000
%EQUATE `URLACTION_JAVA_CURR_MAX = &H00001C00
%EQUATE `URLACTION_JAVA_MAX = &H00001Cff
'// The following Infodelivery actions should have no default policies
'// in the registry. They assume that no default policy means fall
'// back to the global restriction. If an admin sets a policy per
'// zone, then it overrides the global restriction.
%EQUATE `URLACTION_INFODELIVERY_MIN = &H00001D00
%EQUATE `URLACTION_INFODELIVERY_NO_ADDING_CHANNELS = &H00001D00
%EQUATE `URLACTION_INFODELIVERY_NO_EDITING_CHANNELS = &H00001D01
%EQUATE `URLACTION_INFODELIVERY_NO_REMOVING_CHANNELS = &H00001D02
%EQUATE `URLACTION_INFODELIVERY_NO_ADDING_SUBSCRIPTIONS = &H00001D03
%EQUATE `URLACTION_INFODELIVERY_NO_EDITING_SUBSCRIPTIONS = &H00001D04
%EQUATE `URLACTION_INFODELIVERY_NO_REMOVING_SUBSCRIPTIONS = &H00001D05
%EQUATE `URLACTION_INFODELIVERY_NO_CHANNEL_LOGGING = &H00001D06
%EQUATE `URLACTION_INFODELIVERY_CURR_MAX = &H00001D06
%EQUATE `URLACTION_INFODELIVERY_MAX = &H00001Dff
%EQUATE `URLACTION_CHANNEL_SOFTDIST_MIN = &H00001E00
%EQUATE `URLACTION_CHANNEL_SOFTDIST_PERMISSIONS = &H00001E05
%EQUATE `URLPOLICY_CHANNEL_SOFTDIST_PROHIBIT = &H00010000
%EQUATE `URLPOLICY_CHANNEL_SOFTDIST_PRECACHE = &H00020000
%EQUATE `URLPOLICY_CHANNEL_SOFTDIST_AUTOINSTALL = &H00030000
%EQUATE `URLACTION_CHANNEL_SOFTDIST_MAX = &H00001Eff
'#if (_WIN32_IE >= _WIN32_IE_IE80)
%EQUATE `URLACTION_DOTNET_USERCONTROLS = &H00002005
'#endif //(_WIN32_IE >= _WIN32_IE_IE80)
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
%EQUATE `URLACTION_BEHAVIOR_MIN = &H00002000
%EQUATE `URLACTION_BEHAVIOR_RUN = &H00002000
%EQUATE `URLPOLICY_BEHAVIOR_CHECK_LIST = &H00010000
'// The following actions correspond to the Feature options above.
'// However, they are NOT in the same order.
%EQUATE `URLACTION_FEATURE_MIN = &H00002100
%EQUATE `URLACTION_FEATURE_MIME_SNIFFING = &H00002100
%EQUATE `URLACTION_FEATURE_ZONE_ELEVATION = &H00002101
%EQUATE `URLACTION_FEATURE_WINDOW_RESTRICTIONS = &H00002102
%EQUATE `URLACTION_FEATURE_SCRIPT_STATUS_BAR = &H00002103
%EQUATE `URLACTION_FEATURE_FORCE_ADDR_AND_STATUS = &H00002104
%EQUATE `URLACTION_FEATURE_BLOCK_INPUT_PROMPTS = &H00002105
%EQUATE `URLACTION_FEATURE_DATA_BINDING = &H00002106
%EQUATE `URLACTION_AUTOMATIC_DOWNLOAD_UI_MIN = &H00002200
%EQUATE `URLACTION_AUTOMATIC_DOWNLOAD_UI = &H00002200
%EQUATE `URLACTION_AUTOMATIC_ACTIVEX_UI = &H00002201
%EQUATE `URLACTION_ALLOW_RESTRICTEDPROTOCOLS = &H00002300
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
'#if (_WIN32_IE >= _WIN32_IE_IE70)
'// Whether to do the Anti-Phishing check.
%EQUATE `URLACTION_ALLOW_APEVALUATION = &H00002301
'// The following ExpressAPP and XPS actions are trumped by registry in
'// case of Internet Explorer upgrade from IE 6.0 which honors registry.
%EQUATE `URLACTION_WINDOWS_BROWSER_APPLICATIONS = &H00002400
%EQUATE `URLACTION_XPS_DOCUMENTS = &H00002401
%EQUATE `URLACTION_LOOSE_XAML = &H00002402
%EQUATE `URLACTION_LOWRIGHTS = &H00002500
'// The following action belong to WinFX Bootstrapper
%EQUATE `URLACTION_WINFX_SETUP = &H00002600
%EQUATE `URLACTION_INPRIVATE_BLOCKING = &H00002700
'#endif //(_WIN32_IE >= _WIN32_IE_IE70)
'// For each action specified above the system maintains
'// a set of policies for the action.
'// The only policies supported currently are permissions (i.e. is something allowed)
'// and logging status.
'// IMPORTANT: If you are defining your own policies don't overload the meaning of the
'// loword of the policy. You can use the hiword to store any policy bits which are only
'// meaningful to your action.
'// For an example of how to do this look at the URLPOLICY_JAVA above
'// Permissions
%EQUATE `URLPOLICY_ALLOW = &H00
%EQUATE `URLPOLICY_QUERY = &H01
%EQUATE `URLPOLICY_DISALLOW = &H03
'// Notifications are not done when user already queried.
%EQUATE `URLPOLICY_NOTIFY_ON_ALLOW = &H10
%EQUATE `URLPOLICY_NOTIFY_ON_DISALLOW = &H20
'// Logging is done regardless of whether user was queried.
%EQUATE `URLPOLICY_LOG_ON_ALLOW = &H40
%EQUATE `URLPOLICY_LOG_ON_DISALLOW = &H80
%EQUATE `URLPOLICY_MASK_PERMISSIONS = &H0f
'#define GetUrlPolicyPermissions(dw) (dw & URLPOLICY_MASK_PERMISSIONS)
'#define SetUrlPolicyPermissions(dw,dw2) ((dw) = ((dw) & ~(URLPOLICY_MASK_PERMISSIONS)) | (dw2))
MACRO GetUrlPolicyPermissions(dw_) = dw_ AND %URLPOLICY_MASK_PERMISSIONS
MACRO SetUrlPolicyPermissions(dw_,dw2) = dw_ = ((dw_ AND (NOT %URLPOLICY_MASK_PERMISSIONS) OR dw2)
%EQUATE `URLPOLICY_DONTCHECKDLGBOX = &H100
'// The ordinal #'s that define the predefined zones internet explorer knows about.
'// When we support user-defined zones their zone numbers should be between
'// URLZONE_USER_MIN and URLZONE_USER_MAX
'// Custom policy to query whether the local machine zone
'// has been unlocked for current document.
'#if (_WIN32_IE >= _WIN32_IE_IE60SP2)
'// Custom policy to query whether the local machine zone
'// has been unlocked for current document.
'EXTERN_C const GUID GUID_CUSTOM_LOCALMACHINEZONEUNLOCKED;
'#endif //(_WIN32_IE >= _WIN32_IE_IE60SP2)
' ########################################################################################
' IInternetZoneManager interface
' IID = 79EAC9EF-BAF9-11CE-8C82-00AA004BA90B
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IInternetZoneManager_INTERFACE_DEFINED)
 %IInternetZoneManager_INTERFACE_DEFINED = 1
' URLZONE enum
%EQUATE `URLZONE_PREDEFINED_MIN = 0
%EQUATE `URLZONE_LOCAL_MACHINE = 0
%EQUATE `URLZONE_INTRANET = %URLZONE_LOCAL_MACHINE + 1
%EQUATE `URLZONE_TRUSTED = %URLZONE_INTRANET + 1
%EQUATE `URLZONE_INTERNET = %URLZONE_TRUSTED + 1
%EQUATE `URLZONE_UNTRUSTED = %URLZONE_INTERNET + 1
%EQUATE `URLZONE_PREDEFINED_MAX = 999
%EQUATE `URLZONE_USER_MIN = 1000
%EQUATE `URLZONE_USER_MAX = 10000
'// Enhanced Security Configuration zone mapping flag for IInternetSecurityManager::SetZoneMapping
%EQUATE `URLZONE_ESC_FLAG = &H100
' URLTEMPLATE enum
%EQUATE `URLTEMPLATE_CUSTOM = 0
%EQUATE `URLTEMPLATE_PREDEFINED_MIN = &H10000
%EQUATE `URLTEMPLATE_LOW = &H10000
%EQUATE `URLTEMPLATE_MEDLOW = &H10500
%EQUATE `URLTEMPLATE_MEDIUM = &H11000
%EQUATE `URLTEMPLATE_MEDHIGH = &H11500
%EQUATE `URLTEMPLATE_HIGH = &H12000
%EQUATE `URLTEMPLATE_PREDEFINED_MAX = &H20000
%EQUATE `MAX_ZONE_PATH = 260
%EQUATE `MAX_ZONE_DESCRIPTION = 200
' ZAFLAGS enum
%EQUATE `ZAFLAGS_CUSTOM_EDIT = &H1
%EQUATE `ZAFLAGS_ADD_SITES = &H2
%EQUATE `ZAFLAGS_REQUIRE_VERIFICATION = &H4
%EQUATE `ZAFLAGS_INCLUDE_PROXY_OVERRIDE = &H8
%EQUATE `ZAFLAGS_INCLUDE_INTRANET_SITES = &H10
%EQUATE `ZAFLAGS_NO_UI = &H20
%EQUATE `ZAFLAGS_SUPPORTS_VERIFICATION = &H40
%EQUATE `ZAFLAGS_UNC_AS_INTRANET = &H80
%EQUATE `ZAFLAGS_DETECT_INTRANET = &H100
%EQUATE `ZAFLAGS_USE_LOCKED_ZONES = &H10000
%EQUATE `ZAFLAGS_VERIFY_TEMPLATE_SETTINGS = &H20000
%EQUATE `ZAFLAGS_NO_CACHE = &H40000
' // Size = 1460 bytes
TYPE ZONEATTRIBUTES DWORD
 cbSize AS DWORD ' ULONG cbSize
 szDisplayName AS WSTRINGZ * 260 ' WCHAR szDisplayName[ 260 ]
 szDescription AS WSTRINGZ * 200 ' WCHAR szDescription[ 200 ]
 szIconPath AS WSTRINGZ * 260 ' WCHAR szIconPath[ 260 ]
 dwTemplateMinLevel AS DWORD ' DWORD dwTemplateMinLevel
 dwTemplateRecommended AS DWORD ' DWORD dwTemplateRecommended
 dwTemplateCurrentLevel AS DWORD ' DWORD dwTemplateCurrentLevel
 dwFlags AS DWORD ' DWORD dwFlags
END TYPE
'// Gets the zone attributes (information in registry other than actual security
'// policies associated with the zone). Zone attributes are fixed as:
'// Sets the zone attributes (information in registry other than actual security
'// policies associated with the zone). Zone attributes as above.
'// Returns S_OK or ??? if failed to write the zone attributes.
'/* Registry Flags
' When reading, default behavior is:
' If HKLM allows override and HKCU value exists
' Then use HKCU value
' Else use HKLM value
' When writing, default behavior is same as HKCU
' If HKLM allows override
' Then Write to HKCU
' Else Fail
'*/
' URLZONEREG enum
%EQUATE `URLZONEREG_DEFAULT = 0
%EQUATE `URLZONEREG_HKLM = %URLZONEREG_DEFAULT + 1
%EQUATE `URLZONEREG_HKCU = %URLZONEREG_HKLM + 1
'// Gets a named custom policy associated with a zone;
'// e.g. the Java VM settings can be defined with a unique key such as 'Java'.
'// Custom policy support is intended to allow extensibility from the predefined
'// set of policies that IE4 has built in.
'//
'// pwszKey is the string name designating the custom policy. Components are
'// responsible for having unique names.
'// ppPolicy is the callee allocated buffer for the policy byte blob; caller is
'// responsible for freeing this buffer eventually.
'// pcbPolicy is the size of the byte blob returned.
'// dwRegFlags determines how registry is accessed (see above).
'// Returns S_OK if key is found and buffer allocated; ??? if key is not found (no buffer alloced).
'// Sets a named custom policy associated with a zone;
'// e.g. the Java VM settings can be defined with a unique key such as 'Java'.
'// Custom policy support is intended to allow extensibility from the predefined
'// set of policies that IE4 has built in.
'//
'// pwszKey is the string name designating the custom policy. Components are
'// responsible for having unique names.
'// ppPolicy is the caller allocated buffer for the policy byte blob.
'// pcbPolicy is the size of the byte blob to be set.
'// dwRegFlags determines if HTCU or HKLM is set.
'// Returns S_OK or ??? if failed to write the zone custom policy.
'// Gets action policy associated with a zone, the builtin, fixed-length policies info.
'// dwAction is the action code for the action as defined above.
'// pPolicy is the caller allocated buffer for the policy data.
'// cbPolicy is the size of the caller allocated buffer.
'// dwRegFlags determines how registry is accessed (see above).
'// Returns S_OK if action is valid; ??? if action is not valid.
$IID_IInternetZoneManager = GUID$("{79EAC9EF-BAF9-11CE-8C82-00AA004BA90B}")
INTERFACE IInternetZoneManager $IID_IInternetZoneManager
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetZoneAttributes ( ' VTable offset = 12
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneAttributes ( ' VTable offset = 16
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneCustomPolicy ( ' VTable offset = 20
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneCustomPolicy ( ' VTable offset = 24
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneActionPolicy ( ' VTable offset = 28
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneActionPolicy ( ' VTable offset = 32
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PromptAction ( ' VTable offset = 36
 BYVAL dwAction AS DWORD
 , BYVAL hwndParent AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwPromptFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LogAction ( ' VTable offset = 40
 BYVAL dwAction AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwLogFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateZoneEnumerator ( ' VTable offset = 44
 BYREF pdwEnum AS DWORD
 , BYREF pdwCount AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneAt ( ' VTable offset = 48
 BYVAL dwEnum AS DWORD
 , BYVAL dwIndex AS DWORD
 , BYREF pdwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DestroyZoneEnumerator ( ' VTable offset = 52
 BYVAL dwEnum AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTemplatePoliciesToZone ( ' VTable offset = 56
 BYVAL dwTemplate AS DWORD
 , BYVAL dwZone AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetZoneManager_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetZoneManagerEx interface
' IID = A4C23339-8E06-431E-9BF4-7E711C085648
' Inherited interface = IInternetZoneManager
' ########################################################################################
#IF NOT %DEF(%IInternetZoneManagerEx_INTERFACE_DEFINED)
 %IInternetZoneManagerEx_INTERFACE_DEFINED = 1
'// Gets action policy associated with a zone, the builtin, fixed-length policies info.
'// dwAction is the action code for the action as defined above.
'// pPolicy is the caller allocated buffer for the policy data.
'// cbPolicy is the size of the caller allocated buffer.
'// dwRegFlags determines how registry is accessed (see above).
'// dwFlags determine which registry policies are accessed (see above).
'// Returns S_OK if action is valid; ??? if action is not valid.
$IID_IInternetZoneManagerEx = GUID$("{A4C23339-8E06-431E-9BF4-7E711C085648}")
INTERFACE IInternetZoneManagerEx $IID_IInternetZoneManagerEx
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetZoneManager Methods
 ' =====================================================================================
 METHOD GetZoneAttributes ( ' VTable offset = 12
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneAttributes ( ' VTable offset = 16
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneCustomPolicy ( ' VTable offset = 20
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneCustomPolicy ( ' VTable offset = 24
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneActionPolicy ( ' VTable offset = 28
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneActionPolicy ( ' VTable offset = 32
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PromptAction ( ' VTable offset = 36
 BYVAL dwAction AS DWORD
 , BYVAL hwndParent AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwPromptFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LogAction ( ' VTable offset = 40
 BYVAL dwAction AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwLogFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateZoneEnumerator ( ' VTable offset = 44
 BYREF pdwEnum AS DWORD
 , BYREF pdwCount AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneAt ( ' VTable offset = 48
 BYVAL dwEnum AS DWORD
 , BYVAL dwIndex AS DWORD
 , BYREF pdwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DestroyZoneEnumerator ( ' VTable offset = 52
 BYVAL dwEnum AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTemplatePoliciesToZone ( ' VTable offset = 56
 BYVAL dwTemplate AS DWORD
 , BYVAL dwZone AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetZoneManagerEx Methods
 ' =====================================================================================
 METHOD GetZoneActionPolicyEx ( ' VTable offset = 60
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneActionPolicyEx ( ' VTable offset = 64
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetZoneManagerEx_INTERFACE_DEFINED__ */
' ########################################################################################
' IInternetZoneManagerEx2 interface
' IID = EDC17559-DD5D-4846-8EEF-8BECBA5A4ABF
' Inherited interface = IInternetZoneManagerEx
' ########################################################################################
#IF NOT %DEF(%IInternetZoneManagerEx2_INTERFACE_DEFINED)
 %IInternetZoneManagerEx2_INTERFACE_DEFINED = 1
'// Gets the zone attributes (information in registry other than actual security
'// policies associated with the zone). Zone attributes are fixed as:
'// Can also verify template settings by matching current settings with security template
$IID_IInternetZoneManagerEx2 = GUID$("{EDC17559-DD5D-4846-8EEF-8BECBA5A4ABF}")
INTERFACE IInternetZoneManagerEx2 $IID_IInternetZoneManagerEx2
 INHERIT IUnknown
 ' =====================================================================================
 ' IInternetZoneManager Methods
 ' =====================================================================================
 METHOD GetZoneAttributes ( ' VTable offset = 12
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneAttributes ( ' VTable offset = 16
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneCustomPolicy ( ' VTable offset = 20
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYREF ppPolicy AS DWORD
 , BYREF pcbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneCustomPolicy ( ' VTable offset = 24
 BYVAL dwZone AS DWORD
 , BYREF guidKey AS GUID
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneActionPolicy ( ' VTable offset = 28
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneActionPolicy ( ' VTable offset = 32
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD PromptAction ( ' VTable offset = 36
 BYVAL dwAction AS DWORD
 , BYVAL hwndParent AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwPromptFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD LogAction ( ' VTable offset = 40
 BYVAL dwAction AS DWORD
 , BYREF pwszUrl AS WSTRINGZ
 , BYREF pwszText AS WSTRINGZ
 , BYVAL dwLogFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CreateZoneEnumerator ( ' VTable offset = 44
 BYREF pdwEnum AS DWORD
 , BYREF pdwCount AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneAt ( ' VTable offset = 48
 BYVAL dwEnum AS DWORD
 , BYVAL dwIndex AS DWORD
 , BYREF pdwZone AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DestroyZoneEnumerator ( ' VTable offset = 52
 BYVAL dwEnum AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD CopyTemplatePoliciesToZone ( ' VTable offset = 56
 BYVAL dwTemplate AS DWORD
 , BYVAL dwZone AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetZoneManagerEx Methods
 ' =====================================================================================
 METHOD GetZoneActionPolicyEx ( ' VTable offset = 60
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetZoneActionPolicyEx ( ' VTable offset = 64
 BYVAL dwZone AS DWORD
 , BYVAL dwAction AS DWORD
 , BYVAL pPolicy AS BYTE PTR
 , BYVAL cbPolicy AS DWORD
 , BYVAL urlZoneReg AS DWORD
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 ' =====================================================================================
 ' IInternetZoneManagerEx2 Methods
 ' =====================================================================================
 METHOD GetZoneAttributesEx ( ' VTable offset = 68
 BYVAL dwZone AS DWORD
 , BYREF pZoneAttributes AS ZONEATTRIBUTES
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetZoneSecurityState ( ' VTable offset = 72
 BYVAL dwZoneIndex AS DWORD
 , BYVAL fRespectPolicy AS LONG
 , BYREF pdwState AS DWORD
 , BYREF pfPolicyEncountered AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetIESecurityState ( ' VTable offset = 76
 BYVAL fRespectPolicy AS LONG
 , BYREF pdwState AS DWORD
 , BYREF pfPolicyEncountered AS LONG
 , BYVAL fNoCache AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD FixUnsecureSettings ( ' VTable offset = 80
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IInternetZoneManagerEx2_INTERFACE_DEFINED__ */
%EQUATE `SOFTDIST_FLAG_USAGE_EMAIL = &H00000001
%EQUATE `SOFTDIST_FLAG_USAGE_PRECACHE = &H00000002
%EQUATE `SOFTDIST_FLAG_USAGE_AUTOINSTALL = &H00000004
%EQUATE `SOFTDIST_FLAG_DELETE_SUBSCRIPTION = &H00000008
%EQUATE `SOFTDIST_ADSTATE_NONE = &H00000000
%EQUATE `SOFTDIST_ADSTATE_AVAILABLE = &H00000001
%EQUATE `SOFTDIST_ADSTATE_DOWNLOADED = &H00000002
%EQUATE `SOFTDIST_ADSTATE_INSTALLED = &H00000003
' // Size = 24 bytes
TYPE CODEBASEHOLD DWORD
 cbSize AS DWORD ' ULONG cbSize
 szDistUnit AS WSTRINGZ PTR ' LPWSTR szDistUnit
 szCodeBase AS WSTRINGZ PTR ' LPWSTR szCodeBase
 dwVersionMS AS DWORD ' DWORD dwVersionMS
 dwVersionLS AS DWORD ' DWORD dwVersionLS
 dwStyle AS DWORD ' DWORD dwStyle
END TYPE
' // Size = 52 bytes
TYPE SOFTDISTINFO DWORD
 cbSize AS DWORD ' ULONG cbSize
 dwFlags AS DWORD ' DWORD dwFlags
 dwAdState AS DWORD ' DWORD dwAdState
 szTitle AS WSTRINGZ PTR ' LPWSTR szTitle
 szAbstract AS WSTRINGZ PTR ' LPWSTR szAbstract
 szHREF AS WSTRINGZ PTR ' LPWSTR szHREF
 dwInstalledVersionMS AS DWORD ' DWORD dwInstalledVersionMS
 dwInstalledVersionLS AS DWORD ' DWORD dwInstalledVersionLS
 dwUpdateVersionMS AS DWORD ' DWORD dwUpdateVersionMS
 dwUpdateVersionLS AS DWORD ' DWORD dwUpdateVersionLS
 dwAdvertisedVersionMS AS DWORD ' DWORD dwAdvertisedVersionMS
 dwAdvertisedVersionLS AS DWORD ' DWORD dwAdvertisedVersionLS
 dwReserved AS DWORD ' DWORD dwReserved
END TYPE
' ########################################################################################
' ISoftDistExt interface
' IID = B15B8DC1-C7E1-11D0-8680-00AA00BDCB71
' Inherited interface = IUnknown
' Not currently implemented.
' ########################################################################################
#IF NOT %DEF(%ISoftDistExt_INTERFACE_DEFINED)
 %ISoftDistExt_INTERFACE_DEFINED = 1
$IID_ISoftDistExt = GUID$("{B15B8DC1-C7E1-11D0-8680-00AA00BDCB71}")
$CLSID_SBS_SoftDistExt = $IID_ISoftDistExt
INTERFACE ISoftDistExt $IID_ISoftDistExt
 INHERIT IUnknown
 ' =====================================================================================
 METHOD ProcessSoftDist ( ' VTable offset = 12
 BYREF szCDFURL AS WSTRINGZ
 , BYVAL pSoftDistElement AS IXMLElement
 , BYREF lpsdi AS SOFTDISTINFO
 ) AS LONG
 ' =====================================================================================
 METHOD GetFirstCodeBase ( ' VTable offset = 16
 BYREF szCodeBase AS DWORD
 , BYVAL dwMaxSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetNextCodeBase ( ' VTable offset = 20
 BYREF szCodeBase AS DWORD
 , BYVAL dwMaxSize AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD AsyncInstallDistributionUnit ( ' VTable offset = 24
 BYVAL pbc AS IBindCtx
 , BYVAL pvReserved AS DWORD
 , BYVAL flags AS DWORD
 , BYREF lpcbh AS CODEBASEHOLD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ISoftDistExt_INTERFACE_DEFINED__ */
DECLARE FUNCTION GetSoftwareUpdateInfo LIB "urlmon.dll" ALIAS "GetSoftwareUpdateInfo" ( BYREF szDistUnit AS WSTRINGZ , BYREF psdi AS SOFTDISTINFO ) AS LONG
DECLARE FUNCTION SetSoftwareUpdateAdvertisementState LIB "urlmon.dll" ALIAS "GetSoftwareUpdateInfo" ( BYREF szDistUnit AS WSTRINGZ
 , BYVAL dwAdState AS DWORD
 , BYVAL dwAdvertisedVersionMS AS DWORD
 , BYVAL dwAdvertisedVersionLS AS DWORD
 ) AS LONG
' ########################################################################################
' ICatalogFileInfo interface
' IID = 711C7600-6B48-11D1-B403-00AA00B92AF1
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ICatalogFileInfo_INTERFACE_DEFINED)
 %ICatalogFileInfo_INTERFACE_DEFINED = 1
$IID_ICatalogFileInfo = GUID$("{711C7600-6B48-11D1-B403-00AA00B92AF1}")
INTERFACE ICatalogFileInfo $IID_ICatalogFileInfo
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetCatalogFile ( ' VTable offset = 12
 BYREF ppszCatalogFile AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetJavaTrust ( ' VTable offset = 16
 BYREF ppJavaTrust AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ICatalogFileInfo_INTERFACE_DEFINED__ */
' ########################################################################################
' IDataFilter interface
' IID = 69D14C80-C18E-11D0-A9CE-006097942311
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IDataFilter_INTERFACE_DEFINED)
 %IDataFilter_INTERFACE_DEFINED = 1
$IID_IDataFilter = GUID$("{69D14C80-C18E-11D0-A9CE-006097942311}")
INTERFACE IDataFilter $IID_IDataFilter
 INHERIT IUnknown
 ' =====================================================================================
 METHOD DoEncode ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYVAL lInBufferSize AS LONG
 , BYVAL pbInBuffer AS BYTE PTR
 , BYVAL lOutBufferSize AS LONG
 , BYVAL pbOutBuffer AS BYTE PTR
 , BYVAL lInBytesAvailable AS DWORD
 , BYREF plInBytesRead AS LONG
 , BYREF plOutBytesWritten AS LONG
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD DoDecode ( ' VTable offset = 16
 BYVAL dwFlags AS DWORD
 , BYVAL lInBufferSize AS LONG
 , BYVAL pbInBuffer AS BYTE PTR
 , BYVAL lOutBufferSize AS LONG
 , BYVAL pbOutBuffer AS BYTE PTR
 , BYVAL lInBytesAvailable AS DWORD
 , BYREF plInBytesRead AS LONG
 , BYREF plOutBytesWritten AS LONG
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetEncodingLevel ( ' VTable offset = 20
 BYVAL dwEncLevel AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IDataFilter_INTERFACE_DEFINED__ */
' // Size = 20 bytes
TYPE PROTOCOLFILTERDATA DWORD
 cbSize AS DWORD ' DWORD cbSize
 pProtocolSink AS DWORD PTR ' IInternetProtocolSink *pProtocolSink
 pProtocol AS DWORD PTR ' IInternetProtocol *pProtocol
 pUnk AS DWORD PTR ' IUnknown *pUnk
 dwFilterFlags AS DWORD ' DWORD dwFilterFlags
END TYPE
' ########################################################################################
' IEncodingFilterFactory interface
' IID = 70BDDE00-C18E-11D0-A9CE-006097942311
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IEncodingFilterFactory_INTERFACE_DEFINED)
 %IEncodingFilterFactory_INTERFACE_DEFINED = 1
' // Size = 16 bytes
TYPE DATAINFO DWORD
 ulTotalSize AS DWORD ' ULONG ulTotalSize
 ulavrPacketSize AS DWORD ' ULONG ulavrPacketSize
 ulConnectSpeed AS DWORD ' ULONG ulConnectSpeed
 ulProcessorSpeed AS DWORD ' ULONG ulProcessorSpeed
END TYPE
$IID_IEncodingFilterFactory = GUID$("{70BDDE00-C18E-11D0-A9CE-006097942311}")
INTERFACE IEncodingFilterFactory $IID_IEncodingFilterFactory
 INHERIT IUnknown
 ' =====================================================================================
 METHOD FindBestFilter ( ' VTable offset = 12
 BYREF pwzCodeIn AS WSTRINGZ
 , BYREF pwzCodeOut AS WSTRINGZ
 , BYREF info AS DATAINFO
 , BYREF ppDF AS IDataFilter
 ) AS LONG
 ' =====================================================================================
 METHOD GetDefaultFilter ( ' VTable offset = 16
 BYREF pwzCodeIn AS WSTRINGZ
 , BYREF pwzCodeOut AS WSTRINGZ
 , BYREF ppDF AS IDataFilter
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IEncodingFilterFactory_INTERFACE_DEFINED__ */
'// Logging-specific apis
DECLARE FUNCTION IsLoggingEnabledA LIB "urlmon.dll" ALIAS "IsLoggingEnabledA" ( BYREF pszUrl AS ASCIIZ ) AS LONG
DECLARE FUNCTION IsLoggingEnabledW LIB "urlmon.dll" ALIAS "IsLoggingEnabledW" ( BYREF pszUrl AS WSTRINGZ
 ) AS LONG
#IF %DEF(%UNICODE)
 MACRO IsLoggingEnabled = IsLoggingEnabledW
#ELSE
 MACRO IsLoggingEnabled = IsLoggingEnabledA
#ENDIF
' // Size = 44 bytes
TYPE HIT_LOGGING_INFO DWORD
 dwStructSize AS DWORD ' DWORD dwStructSize
 lpszLoggedUrlName AS ASCIIZ PTR ' LPSTR lpszLoggedUrlName
 StartTime AS SYSTEMTIME ' SYSTEMTIME StartTime
 EndTime AS SYSTEMTIME ' SYSTEMTIME EndTime
 lpszExtendedInfo AS ASCIIZ PTR ' LPSTR lpszExtendedInfo
END TYPE
DECLARE FUNCTION WriteHitLogging LIB "urlmon.dll" ALIAS "WriteHitLogging" ( BYREF lpLogginginfo AS HIT_LOGGING_INFO ) AS LONG
%EQUATE `CONFIRMSAFETYACTION_LOADOBJECT = &H00000001
' // Size = 24 bytes
TYPE CONFIRMSAFETY DWORD
 clsid AS GUID ' CLSID clsid
 pUnk AS DWORD PTR ' IUnknown *pUnk
 dwFlags AS DWORD ' DWORD dwFlags
END TYPE
'EXTERN_C const GUID GUID_CUSTOM_CONFIRMOBJECTSAFETY;
$GUID_CUSTOM_CONFIRMOBJECTSAFETY = GUID$("{10200490-FA38-11D0-AC0E-00A0C90FFF00}")
' ########################################################################################
' IWrappedProtocol interface
' IID = 53C84785-8425-4DC5-971B-E58D9C19F9B6
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IWrappedProtocol_INTERFACE_DEFINED)
 %IWrappedProtocol_INTERFACE_DEFINED = 1
$IID_IWrappedProtocol = GUID$("{53C84785-8425-4DC5-971B-E58D9C19F9B6}")
INTERFACE IWrappedProtocol $IID_IWrappedProtocol
 INHERIT IUnknown
 ' =====================================================================================
 METHOD GetWrapperCode ( ' VTable offset = 12
 BYREF pnCode AS DWORD
 , BYVAL dwReserved AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IWrappedProtocol_INTERFACE_DEFINED__ */
#ENDIF
