Hi,

I'm building a DLL in Visual C/C++ 6; one of the functions I want, is to create an environment variable. This DLL is to be used both in in VSC 6 as in VB 6, and all the functions are working...except this one.

I created the following routine that, when compiled, does not give any error, but when called - by VB 6 for example - gives an error:

void my_file(char *filename)
{
char *var = "MYPATH=";
strcat(var,filename);
int putenv(const char * var);
}

Can someone help me out?

jkepler