Question about interfacing DLLs with VB5/VBA5 
Author Message
 Question about interfacing DLLs with VB5/VBA5

Hi there,

I have a little problem acessing a function in a DLL. The function has
two paramters, both of type PSTR. In the VB call, the parameters are
being passed as ByRef Strings.
Why do I get an error message stating "Wrong DLL calling convention."?
After all, this works fine for WordBasic...

Thanks for any help, suggestions etc.

:Nils



Wed, 08 Mar 2000 03:00:00 GMT  
 Question about interfacing DLLs with VB5/VBA5


Quote:

>Hi there,

>I have a little problem acessing a function in a DLL. The function has
>two paramters, both of type PSTR. In the VB call, the parameters are
>being passed as ByRef Strings.
>Why do I get an error message stating "Wrong DLL calling convention."?
>After all, this works fine for WordBasic...

>Thanks for any help, suggestions etc.

>:Nils


Try ByVal instead


Sun, 12 Mar 2000 03:00:00 GMT  
 Question about interfacing DLLs with VB5/VBA5

The problem is that the DLLs were created using something other than
"_stdcall" which VB requires...If you cannot get the source OR have the
DLLs re-created using _stdcall then you are SOL.

regards,
tob



: Hi there,
:
: I have a little problem acessing a function in a DLL. The function has
: two paramters, both of type PSTR. In the VB call, the parameters are
: being passed as ByRef Strings.
: Why do I get an error message stating "Wrong DLL calling convention."?
: After all, this works fine for WordBasic...
:
: Thanks for any help, suggestions etc.
:
: :Nils

:



Mon, 13 Mar 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. GPF Error on compiling and Exe in VB5.0(VBA5.dll)

2. Just got VB5, I have a question about the VB5 MDI Interface

3. File not found: vba5.dll error in distributed app

4. Does VBA5.dll have dependant files?

5. VBA5.DLL error in VB6?

6. Help! VBA5.DLL Invalid Instruction

7. vba5.dll error

8. VBA5.dll required

9. vb 5.0 GPF While Compiling.(VBA5.dll)

10. VBA5.0 Question: Testing for first record in open table

11. Porting C to VB5.0 and C DLL Interfacing

12. Need VB5 code to interface with vbSendMail.dll

 

 
Powered by phpBB® Forum Software