|
-
Aug 10th, 2000, 02:17 AM
#1
Thread Starter
Hyperactive Member
I think you can pass it ByRef as an argument.
-
Aug 10th, 2000, 06:42 AM
#2
New Member
I'm not trying to pass the structure to the dll. I'm try to return the structure from the DLL to VB. I declare the c++ function in the DLL to have a return value of CODES * (which is a pointer to my c++ structure). In VB I declare the return value as CODES (which is a UDT with the same varibles defined as the c++ structure). However, when I use the variables they have bogus information. Code is as follows:
C++
typedef struct CODES
{
int sH;
int rC;
} CODES;
CODES * _stdcall fnCpp(char * dbF, int aM, char * sN, int cT, char * aN)
VB declaration
Public Type CODES
intSH As Integer
intRC As Integer
End Type
Public Declare Function fnCpp Lib "C:\cpp\cppfile.dll" _
(ByRef strDb As String, ByVal intAM As Integer, _
ByRef strSN As String, ByVal intCT As Integer, _
ByRef strAN As String) As CODES
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
|