LuckyStarr
Programmer
Hi Folks,
I have a problem, and I hope you can help me. Let me explain: I have some functions in a C DLL. And I call this functions from the VB code.
The problem is occuring with a function that has a string being passed from VB to the DLL(the string will be filled by the DLL function), using ByVal in the VB.
When I debug the C code, I can see that the pointer received by the DLL function is NULL. But If I use ByRef in VB, my program doesn't work.
The point is: Should I pass Strings using ByRef or ByVal to the DLL?
I would be glad if someone could explain me the difference between Strings in C and in VB.
Thanks!
I have a problem, and I hope you can help me. Let me explain: I have some functions in a C DLL. And I call this functions from the VB code.
The problem is occuring with a function that has a string being passed from VB to the DLL(the string will be filled by the DLL function), using ByVal in the VB.
When I debug the C code, I can see that the pointer received by the DLL function is NULL. But If I use ByRef in VB, my program doesn't work.
The point is: Should I pass Strings using ByRef or ByVal to the DLL?
I would be glad if someone could explain me the difference between Strings in C and in VB.
Thanks!