Hi,
I'm sure this is something simple but its giving me trouble. I'm trying to copy a file to a location that the user specifies in a save as dialog. The file copies correctly if the location to copy is where the source file is, but it wont copy to any other path.
Any idea whats wrong? Am I supposed to extract the path name from 'savename' first?
I'm sure this is something simple but its giving me trouble. I'm trying to copy a file to a location that the user specifies in a save as dialog. The file copies correctly if the location to copy is where the source file is, but it wont copy to any other path.
Code:
if( this->saveFileDialog1->ShowDialog() == DialogResult::OK )
{ String *savename = saveFileDialog1->FileName; char* csavename = (char*)(void*)Marshal::StringToHGlobalAnsi(savename); CopyFile("tempsave.cap",csavename, TRUE); Marshal::FreeHGlobal(csavename);
}
Any idea whats wrong? Am I supposed to extract the path name from 'savename' first?