mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 19:29:24 +02:00
+ infrastructure for DispInterface call dispatching
git-svn-id: trunk@5793 -
This commit is contained in:
parent
abcf865224
commit
21955282d0
@ -313,6 +313,7 @@ procedure fpc_intf_assign(var D: pointer; const S: pointer); compilerproc;
|
||||
procedure fpc_intf_assign_by_iid(var D: pointer; const S: pointer; const iid: TGUID); compilerproc;
|
||||
function fpc_intf_as(const S: pointer; const iid: TGUID): IInterface; compilerproc;
|
||||
function fpc_class_as_intf(const S: pointer; const iid: TGUID): IInterface; compilerproc;
|
||||
procedure fpc_dispatch_by_id(Result: Pointer; const Dispatch: IDispatch;DispDesc: Pointer; Params: Pointer); compilerproc;
|
||||
{$endif FPC_HAS_FEATURE_CLASSES}
|
||||
|
||||
|
||||
|
@ -13,6 +13,20 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
procedure DoDispCallByIDError(res : Pointer; const disp : IDispatch;desc : PDispDesc; params : Pointer);
|
||||
begin
|
||||
handleerrorframe(RuntimeErrorExitCodes[reVarDispatch],get_frame);
|
||||
end;
|
||||
|
||||
|
||||
procedure fpc_dispatch_by_id(Result: Pointer; const Dispatch: IDispatch;
|
||||
DispDesc: Pointer; Params: Pointer); compilerproc;
|
||||
type
|
||||
TDispProc = procedure(res : Pointer; const disp : IDispatch;desc : PDispDesc; params : Pointer);
|
||||
begin
|
||||
TDispProc(DispCallByIDProc)(Result,Dispatch,DispDesc,Params);
|
||||
end;
|
||||
|
||||
{****************************************************************************
|
||||
Internal Routines called from the Compiler
|
||||
****************************************************************************}
|
||||
|
@ -330,3 +330,5 @@
|
||||
vtQWord : (VQWord: PQWord);
|
||||
end;
|
||||
|
||||
var
|
||||
DispCallByIDProc : pointer;
|
@ -1143,4 +1143,5 @@ begin
|
||||
initvariantmanager;
|
||||
initwidestringmanager;
|
||||
InitWin32Widestrings;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
end.
|
||||
|
@ -1167,4 +1167,5 @@ begin
|
||||
initvariantmanager;
|
||||
initwidestringmanager;
|
||||
InitWin32Widestrings;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
end.
|
||||
|
@ -1807,9 +1807,8 @@ initialization
|
||||
initvariantmanager;
|
||||
initwidestringmanager;
|
||||
InitWinCEWidestrings
|
||||
|
||||
finalization
|
||||
{ Cleanup }
|
||||
SysCleanup;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
|
||||
finalization
|
||||
SysCleanup;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user