mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:05:57 +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;
|
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_intf_as(const S: pointer; const iid: TGUID): IInterface; compilerproc;
|
||||||
function fpc_class_as_intf(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}
|
{$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
|
Internal Routines called from the Compiler
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
@ -330,3 +330,5 @@
|
|||||||
vtQWord : (VQWord: PQWord);
|
vtQWord : (VQWord: PQWord);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
DispCallByIDProc : pointer;
|
@ -1143,4 +1143,5 @@ begin
|
|||||||
initvariantmanager;
|
initvariantmanager;
|
||||||
initwidestringmanager;
|
initwidestringmanager;
|
||||||
InitWin32Widestrings;
|
InitWin32Widestrings;
|
||||||
|
DispCallByIDProc:=@DoDispCallByIDError;
|
||||||
end.
|
end.
|
||||||
|
@ -1167,4 +1167,5 @@ begin
|
|||||||
initvariantmanager;
|
initvariantmanager;
|
||||||
initwidestringmanager;
|
initwidestringmanager;
|
||||||
InitWin32Widestrings;
|
InitWin32Widestrings;
|
||||||
|
DispCallByIDProc:=@DoDispCallByIDError;
|
||||||
end.
|
end.
|
||||||
|
@ -1807,9 +1807,8 @@ initialization
|
|||||||
initvariantmanager;
|
initvariantmanager;
|
||||||
initwidestringmanager;
|
initwidestringmanager;
|
||||||
InitWinCEWidestrings
|
InitWinCEWidestrings
|
||||||
|
DispCallByIDProc:=@DoDispCallByIDError;
|
||||||
finalization
|
|
||||||
{ Cleanup }
|
|
||||||
SysCleanup;
|
|
||||||
|
|
||||||
|
finalization
|
||||||
|
SysCleanup;
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user