CreateFile fails to open temp file
-
Hi I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio My app receives the path, but CreateFile fails with error 123: File not exist The file exist, but that is a system/hidden folder. Why is failing to open the file?? This is my call to create file:
HANDLE hFile = CreateFile(param, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Thanks in advance :D -
Hi I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio My app receives the path, but CreateFile fails with error 123: File not exist The file exist, but that is a system/hidden folder. Why is failing to open the file?? This is my call to create file:
HANDLE hFile = CreateFile(param, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Thanks in advance :DError 123 is not a File Not Found error - there is something wrong with the path you are passing to
CreateFile(...)
. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
Hi I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio My app receives the path, but CreateFile fails with error 123: File not exist The file exist, but that is a system/hidden folder. Why is failing to open the file?? This is my call to create file:
HANDLE hFile = CreateFile(param, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Thanks in advance :DKharfax wrote:
...but CreateFile fails with error 123: File not exist
Error 123 is
ERROR_INVALID_NAME
.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
-
Hi I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio My app receives the path, but CreateFile fails with error 123: File not exist The file exist, but that is a system/hidden folder. Why is failing to open the file?? This is my call to create file:
HANDLE hFile = CreateFile(param, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Thanks in advance :DKharfax wrote:
Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio
Try and open a cmd console to check if the path is really correct. Sometimes folders have another name as the one displayed. Can you open the file with Notepad at the given location ?
-
Hi I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio My app receives the path, but CreateFile fails with error 123: File not exist The file exist, but that is a system/hidden folder. Why is failing to open the file?? This is my call to create file:
HANDLE hFile = CreateFile(param, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
Thanks in advance :D -
OK, I did this, I called shellexecute with notepad, and the file openned. ShellExecute(NULL, "open", "notepad.exe", param, NULL,SW_SHOW); So, I dont know :( Help please :D
We need to see what the path looks like in
param
. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles -
We need to see what the path looks like in
param
. Peace!-=- James
Please rate this message - let me know if I helped or not! * * *
If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles