//+----------------------------------------------------------- // Microsoft Windows // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ [ uuid(4b5f1df6-79fc-470c-8a09-02b5e31ebdc4), helpstring("UrlMon Type Library") ] library UrlMonTypeLib { interface IInternetSecurityManager; }; [ local, object, uuid(79eac9ed-baf9-11ce-8c82-00aa004ba90b), helpstring("IInternetSecurityMgrSite Interface"), pointer_default(unique) ] interface IInternetSecurityMgrSite : IUnknown { HRESULT GetWindow ( [out] HWND* phwnd); HRESULT EnableModeless ( [in] BOOL fEnable); }; [ uuid(79eac9ee-baf9-11ce-8c82-00aa004ba90b), helpstring("IInternetSecurityManager Interface"), pointer_default(unique) ] interface IInternetSecurityManager : IUnknown { HRESULT SetSecuritySite ( [in,unique] IInternetSecurityMgrSite *pSite ); HRESULT GetSecuritySite ( [out] IInternetSecurityMgrSite **ppSite ); HRESULT MapUrlToZone ( [in] LPCWSTR pwszUrl, [out] DWORD* pdwZone, [in] DWORD dwFlags ); HRESULT GetSecurityId ( [in] LPCWSTR pwszUrl, [out, size_is(*pcbSecurityId)] BYTE* pbSecurityId, [in, out] DWORD* pcbSecurityId, [in] DWORD_PTR dwReserved ); // Flags passed into ProcessUrlAction. typedef enum { PUAF_DEFAULT = 0x00000000, PUAF_NOUI = 0x00000001, PUAF_ISFILE = 0x00000002, // Assume URL if File, url does not need file:// PUAF_WARN_IF_DENIED = 0x00000004, PUAF_FORCEUI_FOREGROUND = 0x00000008, PUAF_CHECK_TIFS = 0x00000010, PUAF_DONTCHECKBOXINDIALOG = 0x00000020, PUAF_TRUSTED = 0x00000040, PUAF_ACCEPT_WILDCARD_SCHEME = 0x00000080, PUAF_ENFORCERESTRICTED = 0x00000100, PUAF_NOSAVEDFILECHECK = 0x00000200, // don't check file: for saved comment PUAF_REQUIRESAVEDFILECHECK = 0x00000400, // always check the file for MOTW (overriding FEATURE_UNC_SAVEDFILECHECK) PUAF_DONT_USE_CACHE = 0x00001000, // don't use the MUTZ zone cache - recompute the zone. PUAF_RESERVED1 = 0x00002000, // RESERVED for MUTZ_FORCE_INTRANET_FLAGS. PUAF_RESERVED2 = 0x00004000, // RESERVED for MUTZ_IGNORE_ZONE_MAPPINGS. PUAF_LMZ_UNLOCKED = 0x00010000, // flag to retrieve local machine policies when LMZL is on PUAF_LMZ_LOCKED = 0x00020000, // flag to force retrieving locked down local machine policies when LMZL is on PUAF_DEFAULTZONEPOL = 0x00040000, // flag to retrieve Default Security Zone policies when NPL is on PUAF_NPL_USE_LOCKED_IF_RESTRICTED = 0x00080000, // flag to tell urlmon that trident wants to use locked zones if needed. PUAF_NOUIIFLOCKED = 0x00100000, // flag to turn off UI if Urlmon figures it is using the locked zone. PUAF_DRAGPROTOCOLCHECK = 0x00200000 // flag to check for whitelist drag protcols when URLACTION_SHELL_MOVE_OR_COPY is allow } PUAF ; typedef enum { PUAFOUT_DEFAULT = 0x00000000, PUAFOUT_ISLOCKZONEPOLICY = 0x00000001 } PUAFOUT ; HRESULT ProcessUrlAction ( [in] LPCWSTR pwszUrl, [in] DWORD dwAction, [out, size_is(cbPolicy)] BYTE* pPolicy, // output buffer pointer [in] DWORD cbPolicy, // output buffer size [in] BYTE* pContext, // context (used by the delegation routines) [in] DWORD cbContext, // size of the Context [in] DWORD dwFlags, // See enum PUAF for details. [in] DWORD dwReserved ); HRESULT QueryCustomPolicy ( [in] LPCWSTR pwszUrl, [in] REFGUID guidKey, [out, size_is(,*pcbPolicy)] // allocation via IMemAlloc; caller frees BYTE** ppPolicy, // pointer to output buffer pointer [out] DWORD* pcbPolicy, // pointer to output buffer size [in] BYTE* pContext, // context (used by the delegation routines) [in] DWORD cbContext, // size of the Context [in] DWORD dwReserved ); // create/enumerate mappings typedef enum { SZM_CREATE = 0x00000000, // create new mapping, error's if mapping already exists. SZM_DELETE = 0x00000001, // delete the mapping } SZM_FLAGS; HRESULT SetZoneMapping ( [in] DWORD dwZone, // absolute zone index [in] LPCWSTR lpszPattern, // URL pattern with limited wildcarding [in] DWORD dwFlags // add, change, delete ); HRESULT GetZoneMappings ( [in] DWORD dwZone, // absolute zone index [out] IEnumString **ppenumString, // output buffer size [in] DWORD dwFlags // reserved, pass 0 ); // Returns an enumerator of strings for the mappings of a zone. // dwFlags is for future use; pass in 0. };