|
-
Jan 10th, 2000, 08:25 AM
#1
i've made a c++ dll, and im trying to make it work in visual basic, in c++ the dll has a char [255] and int data types. please help..
------------------
DeViLdiGGeR

-
Jan 10th, 2000, 09:47 AM
#2
You'll need to declare a Function like this one which is used with a dll named RWTGetData, but modified for your dll location and fields passed by the dll.
Public Declare Function RWTGetData Lib "c:\rqt\dbacc.dll" (ByVal sData As String, ByRef nErrCode As Long, ByVal sErrText As String) As Long
I don't think the Ints passed by the dll will be a problem, but the chars will probably need to be handled as follows:
Code:
Dim sData as String
Dim lRC As Long
Dim sData as String
Dim sErrText as String
sData = String(255, 0)
sData = Space(MAXLEN)
lRC = RWTGetData(sData, lError, sErrText)
------------------
Marty
-
Jan 10th, 2000, 10:58 PM
#3
PowerPoster
AFAIK there's an API command for running dll's...
You can also call dll's using 'RunDll.exe' found in your windows dir. (But I don't know how to send arguments to the called function.. if anyone could help me, will be great.)
------------------
Fox
[email protected]
http://gigotz.tsx.org
...
Every program can be reduced to one instruction which doesn't work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|