DLL Interface
- Posted by cp Nov 06, 2008
- 1010 views
I have a need to interface with a DLL that talks to a database server. There are two versions of the DLL a 'C' version and a 'VB' version.
I have a requirement to send strings to and return strings from the DLL. The function header (C version of API)for returning the string is defined as: DB1IMPORT CHAR * DB1API DB1ValStringGet( DB1U hUser, DB1V vString );
The VB version returns a VB string and is defined as: Declare Sub DB1ValStringGet_VB Lib "db1api.dll" (ByVal hUser As Long, ByVal vString As Long, ByVal res As String, ByVal max As Integer)
What is the best way for me to get/receive strings (char arrays) from this api keeping in mind that the database and Eu program will not be on the same machine.