January 7th, 2013, 01:56 PM
-
Create Network Drive File
Express 2010
I author a C DLL that supports a VB app. My C DLL gets a string & file path from the VB app, it then writes the string to the file - simple enough.
My DLL fails when the folder is on the network drive (Ex: File from VB \\\\FR010A\\uidu8973$O$\\FCom\\F\\Key.bin). Note that the VB app uses Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) to get the path of My Docs.
I wish to solve this - any suggestions?
code:
//write file
if ( ! fopen_s(&fs,f,"wb") )
{
fprintf(fs,"%s",String);
fflush(fs);
fclose(fs);
success = true;
}
else
{
PrintDebug("fopen_s() failed!\n");
}
January 7th, 2013, 02:45 PM
-
When you try to access the same location manually what happens? Perhaps that location is read-only. You should be able to print the specific error when your fopen fails.