|
|
|
IWindowForBindingUI Interface |
|
IID_IWindowForBindingUI |
{79EAC9D5-BAFA-11CE-8C82-00AA004BA90B} |
|
This interface allows clients of URL monikers to display information in the client's user interface when necessary.
|
|
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. |
|
GetWindow |
|
FUNCTION
IWindowForBindingUI_GetWindow ( _
LOCAL HRESULT AS LONG |
|
IWindowForBindingUI interface implementation |
$IID_IWindowForBindingUI = GUID$("{79EAC9D5-BAFA-11CE-8C82-00AA004BA90B}")
' ****************************************************************************************
' IWindowForBindingUI interface virtual table
' ****************************************************************************************
TYPE IWindowForBindingUIVtbl
' IUnknown methods
pQueryInterface AS DWORD ' // QueryInterface method
pAddRef AS DWORD ' // AddRef method
pRelease AS DWORD ' // Release method
' IWindowForBindingUI method
pGetWindow AS DWORD ' // GetWindow method
' Custom data
pVtblAddr AS DWORD ' // Address of the virtual table
cRef AS DWORD ' // Reference count
END TYPE
' ****************************************************************************************
' ****************************************************************************************
' Builds the IWindowForBindingUI Virtual Table
' Returns a cookie that is a pointer to a IWindowForBindingUIVtbl structure.
' ****************************************************************************************
FUNCTION IWindowForBindingUI_BuildVtbl () AS DWORD
LOCAL pVtbl AS IWindowForBindingUIVtbl PTR
LOCAL pUnk AS IWindowForBindingUIVtbl PTR
pVtbl = HeapAlloc(GetProcessHeap(), %HEAP_ZERO_MEMORY, SIZEOF(@pVtbl))
IF pVtbl = 0 THEN EXIT FUNCTION
@pVtbl.pQueryInterface = CODEPTR(IWindowForBindingUI_QueryInterface)
@pVtbl.pAddRef = CODEPTR(IWindowForBindingUI_AddRef)
@pVtbl.pRelease = CODEPTR(IWindowForBindingUI_Release)
@pVtbl.pGetWindow = CODEPTR(IWindowForBindingUI_GetWindow)
@pVtbl.pVtblAddr = pVtbl
@pVtbl.cRef = 1
pUnk = VARPTR(@pVtbl.pVtblAddr)
FUNCTION = pUnk
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IWindowForBindingUI_QueryInterface method
' Returns the IUnknown of our class and increments the reference counter.
' ****************************************************************************************
FUNCTION IWindowForBindingUI_QueryInterface (BYVAL pCookie AS IWindowForBindingUIVtbl PTR, BYREF riid AS GUID, BYREF ppvObj AS DWORD) AS LONG
IF riid = $IID_IWindowForBindingUI THEN
ppvObj = pCookie
INCR @@pCookie.cRef
FUNCTION = %S_OK
ELSE
FUNCTION = %E_NOINTERFACE
END IF
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IWindowForBindingUI_IUnknown_AddRef method
' Increments the reference counter.
' ****************************************************************************************
FUNCTION IWindowForBindingUI_AddRef (BYVAL pCookie AS IWindowForBindingUIVtbl PTR) AS DWORD
INCR @@pCookie.cRef
FUNCTION = @@pCookie.cRef
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' IWindowForBindingUI_IUnknown_Release method
' Releases our class if there is only a reference to him and decrements the reference counter.
' ****************************************************************************************
FUNCTION IWindowForBindingUI_Release (BYVAL pCookie AS IWindowForBindingUIVtbl 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 IWindowForBindingUI_GetWindow (BYVAL pCookie AS IWindowForBindingUIVtbl PTR, BYREF rguidReason AS GUID, BYREF phwnd AS DWORD) AS LONG
' Put your code here
' FUNCTION = %S_OK or %E_INVALIDARG
END FUNCTION
' ****************************************************************************************
|
Page last updated on Monday, 03 April 2006 20:06:36 +0200