Microsoft SDK for Java

DispatchProxy Class Constructors

The DispatchProxy Class contains the following constructors:

DispatchProxy(Class exposedInterface, Object dispatch)
DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[])
DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[], boolean filterNonDispatchErrors)

DispatchProxy(Class exposedInterface, Object dispatch)

Allocates a new DispatchProxy object.

Syntax

public DispatchProxy(Class exposedInterface, Object dispatch);

Parameters

exposedInterface The signature of the IDispatch call.
dispatch The object that IDispatch calls.

Remarks

Calls against the object on the exposed interface are translated to IDispatch::Invoke calls on the supplied dispatchable object. For this constructor, the first call to each method calls IDispatch::GetIDsOfNames to find the DISPID of the method, which is then cached. The IDispatch calls are made on the object's IID_IDispatch identity.

DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[])

Allocates a new DispatchProxy object. All calls against this object on the exposed interface are translated to IDispatch::Invoke calls on the supplied dispatchable object.

The parameters dispIDMethods and DispIDs supply lists of methods and DISPIDs. These lists are used to pre-assign the DISPIDs to the methods in the exposed interface. Unassigned methods call IDispatch::GetIDsOfNames to find the DISPID of the method, which is then cached. IDispatch calls are made on the supplied interface identifier, which defaults to IID_IDispatch.

Syntax

public DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[]);

Parameters

exposedInterface The signature of the IDispatch call.
dispatch The object that IDispatch calls.
iid The supplied interface identifier, which defaults to IID_IDispatch.
dispIDMethods The list of methods used to pre-assign the DISPIDs to the methods of the exposed interface.
dispIDs The list of DISPIDs used to pre-assign the DISPIDs to the methods of the exposed interface.

DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[], boolean filterNonDispatchErrors)

Allocates a new DispatchProxy object. All calls against this object on the exposed interface are translated to IDispatch::Invoke calls on the supplied dispatchable object.

The parameters dispIDMethods and DispIDs supply lists of methods and DISPIDs. These lists are used to pre-assign the DISPIDs to the methods in the exposed interface. Unassigned methods call IDispatch::GetIDsOfNames to find the DISPID of the method, which is then cached. IDispatch calls are made on the supplied interface identifier, which defaults to IID_IDispatch.

Syntax

public DispatchProxy(Class exposedInterface, Object dispatch, _Guid iid, Method dispIDMethods[], int dispIDs[],

        boolean filterNonDspatchErrors);

Parameters

exposedInterface The signature of the IDispatch call.
dispatch The object that IDispatch calls.
iid The dispatch interface identifier, which defaults to IID_IDispatch if null is passed.
dispIDMethods The list of methods used to pre-assign the DISPIDs to the methods of the exposed interface.
dispIDs The list of DISPIDs used to pre-assign the DISPIDs to the methods of the exposed interface.
filterNonDispatchErrors Indicates whether an error HRESULT besides DISP_E_EXCEPTION should generate Java exceptions when calling IDispatch.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.