I am a beginner and I cannot figure out how to pass a string from a VB calling program to a C++ DLL. All I get in the C routine is garbage.
The "Declare" argument in VB is:
(ByRef s As String,.....
And the string looks like:
fln = "D:\\bin\\Data.txt"
The VB call is:
err = load_data(fln,...
On the C++ side I have:
int __stdcall load_data(char *s,...
then I use:
if(strlen(s) > 0)This fails every time and I am forced to call a find file dialog. I need it not to fail and can not figure out why it does.
data_file = fopen(file_name,"rt");
if(data_file != NULL)
file = true;
A HUGE thank you if you can help.