|
|
|
IConnectionPoint Interface |
|
IID_IConnectionPoint |
{B196B286-BAB4-101A-B69C-00AA00341D07} |
|
The IConnectionPoint interface supports connection points for connectable objects.
Connectable objects support the following features:
A client can use the IConnectionPointContainer interface:
|
|
Methods in VTable order |
|
|
IUnknown Methods |
Description |
|
QueryInterface |
Returns pointers to supported interfaces. |
|
AddRef |
Increments reference count. |
|
Release |
Decrements reference count. |
|
IConnectionPoint Methods |
Description |
|
GetConnectionInterface |
Returns the IID of the outgoing interface managed by this connection point. |
|
GetConnectionPointContainer |
Returns the parent (connectable) object's IConnectionPointContainer interface pointer. |
|
Advise |
Creates a connection between a connection point and a client's sink, where the sink implements the outgoing interface supported by this connection point. |
|
Unadvise |
Terminates a notification previously set up with Advise. |
|
EnumConnections |
Returns an object to enumerate the current advisory connections for this connection point. |
|
QueryInterface |
|
FUNCTION IConectionPoint_QueryInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF riid AS GUID _ , BYREF ppvObj AS DWORD _ ) AS LONG
END FUNCTION
|
|
FUNCTION
IConnectionPoint_QueryInterface ( _
|
|
AddRef |
|
FUNCTION IConnectionPoint_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS LONG END FUNCTION
|
|
FUNCTION IConnectionPoint_AddRef ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
! mov eax, pthis END FUNCTION
|
|
Release |
|
FUNCTION IConnectionPoint_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
LOCAL DWRESULT
AS DWORD END FUNCTION
|
|
FUNCTION IConnectionPoint_Release ( _ BYVAL pthis AS DWORD PTR _
)
AS DWORD
! mov eax, pthis END FUNCTION
|
|
GetConnectionInterface |
|
FUNCTION IConnectionPoint_GetConnectionInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF pIID AS GUID _
) AS LONG
|
|
FUNCTION IConnectionPoint_GetConnectionInterface ( _ BYVAL pthis AS DWORD PTR _ , BYREF pIID AS GUID _
) AS LONG
|
|
GetConnectionPointContainer |
|
FUNCTION IConnectionPoint_GetConnectionPointContainer ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppCPC AS DWORD _
) AS LONG
|
|
FUNCTION IConnectionPoint_GetConnectionPointContainer ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppCPC AS DWORD _
) AS LONG
|
|
Advise |
|
FUNCTION IConnectionPoint_Advise ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pUnkSink AS DWORD _ , BYREF pdwCookie AS DWORD _
) AS
LONG |
|
FUNCTION IConnectionPoint_Advise ( _ BYVAL pthis AS DWORD PTR _ , BYVAL pUnkSink AS DWORD _ , BYREF pdwCookie AS DWORD _
) AS
LONG
! push pUnkSink |
|
Example |
|
FUNCTION AtlAdvise ( _ BYVAL pUnkCP AS DWORD PTR _ , BYVAL pUnk AS DWORD _ , BYREF iid AS GUID _ , BYREF pdw AS DWORD _
) AS
LONG LOCAL pCP AS DWORD LOCAL IID_IConnectionPointContainer AS GUID IID_IConnectionPointContainer = GUID$("{B196B284-BAB4-101A-B69C-00AA00341D07}") IF pUnkCP = %NULL THEN FUNCTION = %E_INVALIDARG EXIT FUNCTION END IF hr = IUmknown_QueryInterface(pUnkCP, IID_IConnectionPointContainer, pCPC) IF SUCCEEDED(hr) THEN hr = IConnectionPointContainer_FindConnectionPoint(pCPC, iid, pCP) IF SUCCEEDED(hr) THEN hr = IConnectionPoint_Advise(pCP, pUnk, pdw) END IF
END IF |
|
Unadvise |
|
FUNCTION IConnectionPoint_Unadvise ( _ BYVAL pthis AS DWORD PTR _ , BYVAL dwCookie AS DWORD _
)
AS LONG
|
|
FUNCTION IConnectionPoint_Unadvise ( _ BYVAL pthis AS DWORD PTR _ , BYVAL dwCookie AS DWORD _
)
AS LONG
! mov eax, pthis
|
|
Example |
|
FUNCTION AtlUnadvise ( _ BYVAL pUnkCP AS DWORD PTR _ , BYREF iid AS GUID _ , BYVAL dw AS DWORD _
) AS
LONG LOCAL pCP AS DWORD LOCAL IID_IConnectionPointContainer AS GUID IID_IConnectionPointContainer = GUID$("{B196B284-BAB4-101A-B69C-00AA00341D07}") IF pUnkCP = %NULL THEN FUNCTION = %E_INVALIDARG EXIT FUNCTION END IF hr = IUnknown_QueryInterface(pUnkCP, IID_IConnectionPointContainer, pCPC) IF SUCCEEDED(hr) THEN hr = IConnectionPointContainer_FindConnectionPoint(pCPC, iid, pCP) IF SUCCEEDED(hr) THEN hr = IConnectionPoint_Unadvise(pCP, dw) END IF
END IF |
|
EnumConnections |
|
FUNCTION IConnectionPoint_EnumConnections ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppenum AS DWORD _
) AS LONG
|
|
FUNCTION IConnectionPoint_EnumConnections ( _ BYVAL pthis AS DWORD PTR _ , BYREF ppenum AS DWORD _
) AS LONG
! mov eax, pthis
|
Page last updated on Friday, 17 March 2006 21:36:23 +0100