AnsweredAssumed Answered

vrf Delphi DLL

Question asked by VRFuser on Jun 1, 2000
Does Delphi have an option to make an ActiveX dll?  VEE deals with ActiveX
dll's quite nicely, and there would be no problem with incompatible calling
conventions.

   ...david

Agilent Technologies
Healthcare Solutions Group

-----Original Message-----
From: bruce_wenner@Agilent.com [mailto:bruce_wenner@Agilent.com]
Sent: Thursday, June 01, 2000 12:12 PM
To: tim@campbellsci.com; vrf@lvld.hp.com
Subject: RE: vrf Delphi DLL



> Subject: vrf Delphi DLL
>
>    Hi, Help!
>
>   This is my first post to the V board. I want to write DLL's
> in Delphi
> (Object Pascal) for use in HP Vee. The DLL examples I could find
> were written in C. HP Vee asks for the path to the DLL and a path
> to a .def file for said DLL. I have no idea what the def file should
> look like. (In Pascal)
>   If anyone has a Visual Basic DLL and Def file, I could probably do
> a translation on that too.
>
> Thanks for any help;
> First Time V user
> Tim D.

Hi Tim,

VEE has the ability to call C-based DLL libraries.  The .def file simply
defines which library functions are available to VEE.  For example, the
Windows operating system includes a number of functions within the
USER32.DLL and KERNEL32.DLL libraries that you could take advantage of.
These libraries may contain hundreds of entry points, but VEE will only be
able to access those entry points listed in the .def file.  Each line of the
.def file essentially contains the function call prototype, which lists the
function name and argument types.  When you create a call to a .dll
function, VEE uses the .def information to locate and link to the
appropriate code module.  The argument list is used to place the required
terminals on the VEE call object.

Regarding using a Delphi .dll, it may be possible.  There could be a problem
in the way that C vs Delphi do name mangling of symbolic names in the
library, but if they use the same technique it should work.  If you have an
existing library with exported symbol names, create a .def file for one of
the functions and try importing it into VEE.  If the import works, try
calling the function - maybe you'll get lucky!

If you can't get the Delphi .dll to load directly, you may need to write and
use a set of C wrapper functions that call your Delphi library.

Good luck!

Bruce Wenner
Agilent Technologies
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.hp.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.hp.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------

Outcomes