|
IInterfaceHandler The
IInterfaceHandler interface identifies the connection point for brokered
interfaces.
When to Implement
Implement this interface as part of your support for "brokered" objects.
Essentially this interface is used to identify the object responsible for
"handling" a brokered interface, i.e., the object that will receive all
calls associated with a specific interface. The IInterfaceHandler
implementation of your object receives the IUnknown calls (QueryInterface,
AddRef and Release) from the interface being brokered, and your objects
implementation of the interface identifier registered with
ComBrokerRegisterInterface will receive all other method calls.
When to Use
IInterfaceHandler must be implemented by any object intended for
registration as an interface handler. If your object does not support
IInterfaceHandler,
ComBrokerRegisterInterface will fail.
Methods in Vtable Order
| IUnknown Methods |
Description |
| QueryInterface |
Returns pointers to supported interfaces. |
| AddRef |
Increments reference count. |
| Release |
Decrements reference count. |
| Please refer
to Microsoft's documentation for more information regarding IUnknown. |
| IInterfaceHandler
Methods |
Description |
|
IntfQueryInterface |
Called in place of the brokered interface's implementation of
QueryInterface. |
|
IntfAddRef |
Called in place of the brokered interface's implementation of AddRef. |
|
IntfRelease |
Called in place of the brokered interface's implementation of Release. |
|
InitializeHandler |
Called upon successful registration of your interface handler. |
|
Interface Definition
|
|
Interface ID: {DED4CD01-3654-4BD0-9635-58D534D24BF1} |
|
Delphi
|
IInterfaceHandler = interface
['{DED4CD01-3654-4BD0-9635-58D534D24BF1}']
function
IntfQueryInterface(
const IID: TGUID;
out Obj): HResult; stdcall;
function IntfAddRef: Integer; stdcall;
function IntfRelease: Integer; stdcall;
procedure InitializeHandler(
lpBroker: IInterfaceBroker;
lpBrokeredInterface: IUnknown); stdcall;
end; |
|