[fpc-devel] Using FPC-implemented CORBA intefaces (local, without broker) in CPP
Anton Kavalenka
anton.k at tut.by
Fri Apr 2 14:24:22 CEST 2010
Dear FPC devlopers,
can somebody point me to the simplest implementation of .SO (in C++)
which can call the method of CORBA interface passed to the DLL.
Interface itself passed from FPC program.
I'm trying to write plugin in CPP (DLL, SO) which on intialisation gets
the Interface pointer to the Application API from host process.
Doing so in FPC is easy and straightforward under all platform II tried
(win32-i386, x86_64-linux).
*function* cnvImportEx(nFormatId:integer; *const* FileName:PChar;hSp:IUnknown):integer;
*var*
i:integer;
uc:IMyApplicationAPI; // *API interface*
vv:variant;
*begin*
Result:=CNV_FAIL;
*if* Assigned(hSp) *then*
*begin*
uc:=hSp as MyApplicationAPI; *// implicit QueryInterface*
vv:='Test';
uc.SetPropValue(-1,'Name', at vv);
vv:=false;
uc.SetPropValue(-1,'Lock', at vv);
vv:=1000;
uc.SetPropValue(1,'Size', at vv);
*for* i:=1 *to* 1000 *do*
uc.SetData(1,i,1000*sin(0.11*i));
Result:=CNV_OK;
*end*;
*end*;
How to do the same Hell in C++?
With best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20100402/ee36d101/attachment.html>
More information about the fpc-devel
mailing list