B
Bob
Hi,
I have written a VC++ dll which talks to a Borland C++ dll which needs to
return a string to the VB calling exe.
I thought that if I passed in a stringbuilder by Ref from the VB code the
VC++ dll which is expecting a char* would point it at the returned char* and
all would be well.
I am sure I have used this before but this time no go.
All I get back is the empty string.
Any ideas on this?
The two test message boxes in the code are coming up with the right values
proving that the call into the
Borland dll is OK and a literal assignation of "testing" is also OK
Thanks
Bob
Code follows:
void DNPCONFIG_API LastConfigError(char *sOutput)
{
//char test[255];
//strcpy(test, ca_LastConfigError());
//MessageBox(NULL,test,"",0);
sOutput= ca_LastConfigError();
MessageBox(NULL,sOutput,"",0);
sOutput="testing";
MessageBox(NULL,sOutput,"",0);
//strcpy(sOutput,test);
return;
}
I have written a VC++ dll which talks to a Borland C++ dll which needs to
return a string to the VB calling exe.
I thought that if I passed in a stringbuilder by Ref from the VB code the
VC++ dll which is expecting a char* would point it at the returned char* and
all would be well.
I am sure I have used this before but this time no go.
All I get back is the empty string.
Any ideas on this?
The two test message boxes in the code are coming up with the right values
proving that the call into the
Borland dll is OK and a literal assignation of "testing" is also OK
Thanks
Bob
Code follows:
void DNPCONFIG_API LastConfigError(char *sOutput)
{
//char test[255];
//strcpy(test, ca_LastConfigError());
//MessageBox(NULL,test,"",0);
sOutput= ca_LastConfigError();
MessageBox(NULL,sOutput,"",0);
sOutput="testing";
MessageBox(NULL,sOutput,"",0);
//strcpy(sOutput,test);
return;
}