|
|
|
IHttpSecurity Interface |
|
IID_IHttpSecurity |
{79EAC9D7-BAFA-11CE-8C82-00AA004BA90B} |
|
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.
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IWindowForBindingUI Method |
Description |
|
GetWindow |
Retrieves a handle to a window to present information in the user interface during a bind operation. |
|
IHttpSecurity Method |
Description |
|
OnSecurityProblem |
Notifies the client application about an authentication problem. |
|
IHttpSecurity interface implementation |
$IID_IHttpSecurity = GUID$("{79EAC9D7-BAFA-11CE-8C82-00AA004BA90B}")
' ****************************************************************************************
' IHttpSecurity interface virtual table
' ****************************************************************************************
TYPE IHttpSecurityVtbl
' IUnknown methods
pQueryInterface AS DWORD ' // QueryInterface method
pAddRef AS DWORD ' // AddRef method
pRelease AS DWORD ' // Release method
' IWindowForBindingUI method
pGetWindow AS DWORD ' // GetWindow method
' IHttpSecurity method
pOnSecurityProblem AS DWORD ' // OnSecurityProblem method
' Custom data
pVtblAddr AS DWORD ' // Address of the virtual table
cRef AS DWORD ' // Reference count
END TYPE
' ****************************************************************************************
' ****************************************************************************************
' Builds the IHttpSecurity Virtual Table
' Returns a cookie that is a pointer to a IHttpSecurityVtbl structure.
' ****************************************************************************************
FUNCTION IHttpSecurity_BuildVtbl () AS DWORD
LOCAL pVtbl AS IHttpSecurityVtbl PTR
LOCAL pUnk AS IHttpSecurityVtbl PTR
pVtbl = HeapAlloc(GetProcessHeap(), %HEAP_ZERO_MEMORY, SIZEOF(@pVtbl))
IF pVtbl = 0 THEN EXIT FUNCTION
@pVtbl.pQueryInterface = CODEPTR(IHttpSecurity_QueryInterface)
@pVtbl.pAddRef = CODEPTR(IHttpSecurity_AddRef)
@pVtbl.pRelease = CODEPTR(IHttpSecurity_Release)
@pVtbl.pGetWindow = CODEPTR(IHttpSecurity_GetWindow)
@pVtbl.pOnSecurityProblem = CODEPTR(IHttpSecurity_OnSecurityProblem)
@pVtbl.pVtblAddr = pVtbl
@pVtbl.cRef = 1
pUnk = VARPTR(@pVtbl.pVtblAddr)
FUNCTION = pUnk
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IHttpSecurity_QueryInterface method
' Returns the IUnknown of our class and increments the reference counter.
' ****************************************************************************************
FUNCTION IHttpSecurity_QueryInterface (BYVAL pCookie AS IHttpSecurityVtbl PTR, BYREF riid AS GUID, BYREF ppvObj AS DWORD) AS LONG
IF riid = $IID_IHttpSecurity THEN
ppvObj = pCookie
INCR @@pCookie.cRef
FUNCTION = %S_OK
ELSE
FUNCTION = %E_NOINTERFACE
END IF
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IHttpSecurity_IUnknown_AddRef method
' Increments the reference counter.
' ****************************************************************************************
FUNCTION IHttpSecurity_AddRef (BYVAL pCookie AS IHttpSecurityVtbl PTR) AS DWORD
INCR @@pCookie.cRef
FUNCTION = @@pCookie.cRef
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IHttpSecurity_IUnknown_Release method
' Releases our class if there is only a reference to him and decrements the reference counter.
' ****************************************************************************************
FUNCTION IHttpSecurity_Release (BYVAL pCookie AS IHttpSecurityVtbl PTR) AS DWORD
DECR @@pCookie.cRef
FUNCTION = @@pCookie.cRef
IF @@pCookie.cRef = 0 THEN
IF ISTRUE @@pCookie.pVtblAddr THEN
HeapFree(GetProcessHeap(), 0, BYVAL @@pCookie.pVtblAddr)
END IF
END IF
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Retrieves a handle to a window to present information in the user interface during a
' bind operation.
' ****************************************************************************************
FUNCTION IHttpSecurity_GetWindow (BYVAL pCookie AS IHttpSecurityVtbl PTR, BYREF rguidReason AS GUID, BYREF phwnd AS DWORD) AS LONG
' Put your code here
' FUNCTION = %S_OK or %E_INVALIDARG
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Notifies the client application about an authentication problem.
' ****************************************************************************************
FUNCTION IHttpSecurity_OnSecurityProblem (BYVAL pCookie AS IHttpSecurityVtbl PTR, BYVAL dwProblem AS DWORD) AS LONG
' Put your code here
' FUNCTION = %RPC_RETRY or %S_FALSE or %E_ABORT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Monday, 03 April 2006 19:59:11 +0200