On Wed, 1 Nov 2023, Anthony Walter via fpc-pascal wrote:

Thank you Micahel,

I was doing some research last night and found that there are two specific
stubs in the System unit that are implemented by the ComObj unit.
Specifically, a stub for safe call exception handling and dispatch invoke.

Yes, exactly.

I think the dispatch invoke callback/stub is in the variants unit: the VarDispProc procedural variable

I was working with my example and added my own OS agnostic implementations
of those two functions. This eliminated the access violations.

I am not finished testing my solution, but in cases where late binding is
desired, it ought to be possible to have it work on all platforms so long
as the late binding is not attempting to cross process boundaries, which is
common on Windows when using out of process servers such as Word or Excel.
Perhaps my use case for late binding to a self contained scripting library
might be useful for other people Free Pascal who do not run Windows. I am
sure there are other possible use cases as well. In that light, it might be
useful to integrate my eventual implementation into some unit included with
FPC.

Indeed.

I would be very grateful if you donate it, it would be useful for all FPC users 
!

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to