hi i try to write a function in a DLL file that should create a file with a name, that comes as string from Lite-C
here is it:
DLLFUNC int open_file(string datei_name, int status)//////////////opens file with string dateiname
{
int status;
std::string fileName(datei_name);
ifstream fin( fileName.c_str() );
if (fin.fail() )///////////////
{
//File not found
ofstream myfile;
myfile.open (datei_name);
myfile << "Writing this to a file.\n";
myfile.close();
status=1; ////////////////file created
}
else
{
status=2;///////////////file exists
}
return status;
}
now the question how to send the string(file name) from lite-c to the function?
thanks in advance