Hi;
I'm having trouble understanding how to change the value of a string parameter being passed into a DLL function. Here's what i have in the function.
void TestGetEnvVar(char *parm1)
{
char enval[]="The dll has changed the value.";
*parm1 = char(&enval);
return;
}
my call is:
parm1 = "original value";
TestGetEnvVar(parm1);
What I expect parm1 to contain when it comes back to the calling program is "The dll has changed then value."
What is acually coming back is: "Toriginal value"
Can someone enlighten me as to what is actually going on here? I am also for a method by which I can change the value of the string being passed into the function.
Thanks
jbsys.
I'm having trouble understanding how to change the value of a string parameter being passed into a DLL function. Here's what i have in the function.
void TestGetEnvVar(char *parm1)
{
char enval[]="The dll has changed the value.";
*parm1 = char(&enval);
return;
}
my call is:
parm1 = "original value";
TestGetEnvVar(parm1);
What I expect parm1 to contain when it comes back to the calling program is "The dll has changed then value."
What is acually coming back is: "Toriginal value"
Can someone enlighten me as to what is actually going on here? I am also for a method by which I can change the value of the string being passed into the function.
Thanks
jbsys.