DispCallByIDProc Variable
var DispCallByIDProc: Pointer; type PDispRec = ^TDispRec; TCallDesc = packed record CallType: Byte; ArgCount: Byte; NamedArgCount: Byte; Args: array[0.255] of Byte; end; TDispDesc = packed record Dispid: Integer; ResultType: Byte; CallDesc: TCallDesc; end; procedureCallProc
(Result: Pointer; const Dispatch: IDispatch; DispDesc: PDispDesc; Params: Pointer); cdecl; DispCallByIDProc := @CallProc
;
Delphi
calls the DispCallByIDProc
procedure to call a
dispatch method that is identified by dispatch identifier in a
dispinterface
. Delphi fills the
DispDesc
record with the necessary information
about the dispatch identifier and the method’s formal
parameters. Params
points to the actual arguments
for the method call. The procedure must store the result in the
memory buffer pointed to by Result
. The type of
Result
’s buffer is dictated by the dispatch
descriptor.
The default value of DispCallByIDProc
is a
procedure that raises runtime error 17
(EVariantError
).