Dec 072017
 
How to call a Delphi created DLL from Visual Basic.
File VBDLL.ZIP from The Programmer’s Corner in
Category Recently Uploaded Files
How to call a Delphi created DLL from Visual Basic.
File Name File Size Zip Size Zip Type
DLLFORM.DCU 3488 1820 deflated
DLLFORM.DFM 831 413 deflated
DLLFORM.PAS 4541 1608 deflated
FORM1.FRM 5030 1275 deflated
MODULE1.BAS 143 95 deflated
README.WRI 1536 642 deflated
VBAPI 0 0 stored
VBAPI.ASM 7147 1309 deflated
VBAPI.DCU 20048 8439 deflated
VBAPI.OBJ 3095 1455 deflated
VBAPI.OPT 279 185 deflated
VBAPI.PAS 35133 9363 deflated
VBAPI.RES 794 316 deflated
VBDLL.DLL 237056 94777 deflated
VBDLL.DPR 148 126 deflated
VBDLL.OPT 279 185 deflated
VBDLL.RES 794 316 deflated
VBPROJ.MAK 84 75 deflated

Download File VBDLL.ZIP Here

Contents of the README.WRI file


1
This download includes source code for a 'Visual Basic Specific' dll showing how to use Delphi forms, pass (both directions) various Visual Basic strings (regular, null-terminated, and fixed length), and arrays to a Delphi dll.

A couple of notes:
This dll uses the VBAPI library unit compiled as a unit for Delphi (includes source) documented in the Professional Visual Basic manual (see writing VBX controls). The VBAPI is used for variable length VB strings and obtaining information about arrays passed to the dll.
Be sure to copy the 'vbapi.dcu' file to your Delphi\lib directory.

The advantage of using fixed length strings in the array example is that you don't have to strip off the null terminator off the end in VB (use the trim$ to get rid of the trailing spaces).


Good Luck - Jack Rasnickd, and fixed length), and arrays to a Delphi dll.

A couple of notes:
ThiwsokgcL_R[WSOK\`TwsokgcL_R[WSOK\`Tgi}OK\`T
Arialf the end in VB (use the trim$ to get rid of the trailing spaces).


Good Luck - Jack Rasnick


 December 7, 2017  Add comments

Leave a Reply