<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
</head><body>
<p style="margin: 0pt;"><span><span></span></span></p>
<p style="margin: 0px; "></p>
<div style="margin: 5px 0px;">
<br/>Mark Morgan Lloyd <markMLl.lazarus@telemetry.co.uk> hat am 5. Juni 2012 um 11:57 geschrieben:
<br/>
<br/>>[...]
<br/>> Please can I tack a related question onto this. If I have analogous
<br/>> forms in a main program and shared library (.dll or .so), where the menu
<br/>> structure in the main form is built up from what's in the library, can
<br/>> the main program's menu call OnClick() events in the library safely?
<br/>>
<br/>> What I'm hoping to do is use the library's form(s) purely for design
<br/>> purposes, i.e. they're never displayed but instead their menu structure
<br/>> is copied to the main program. Non-graphical backend functionality would
<br/>> be in the library, and I've obviously got the choice of attempting to
<br/>> control this using OnClick() etc. or by passing commands in strings to
<br/>> be parsed.
</div>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">An event is just a method pointer (instance+address). So you can connect even a C library if the method signature fits. Of course not via the designer, but by code. So, yes you can call pascal functions in libs. </p>
<p> </p>
<p>But you have to be careful with all shared things that uses compiler magic like classes, strings, interfaces, global variables. </p>
<p>See</p>
<p>http://wiki.freepascal.org/packages</p>
<p> </p>
<p style="margin: 0px;"> </p>
<p style="margin: 0px;">Mattias</p>
<p style="margin: 0px;"> </p>
</body></html>