Why does CreateFileMapping return ..
...no error with lpFilename = "XYZ.tmp", "L:XYZ.tmp", or
even "L:/XYZ.tmp" (slash)
...path not found error (3) with lpFilename="L:\XYZ.tmp" ?
(backslash) ?
Hopefully CreateFileMapping isn't borrowed from unix :-) ?
Brian Muth - 27 Feb 2008 22:40 GMT
> Why does CreateFileMapping return ..
>
[quoted text clipped - 5 lines]
>
> Hopefully CreateFileMapping isn't borrowed from unix :-) ?
Are you programming in C++?
If so, you should be using:
lpFilename="L:\\XYZ.tmp";
and, of course, you have posted in a VB forum. C++ questions are best posted in microsoft.public.vc.language
HTH
Brian
Boris Danner - 28 Feb 2008 08:42 GMT
> Are you programming in C++?
No. VB6 only - that's why I wondered.
I know that at least some DOS box commands support /
supported slashes in place of backslashes in filenames but I
never saw this in VB5/6 code calling WinAPI functions.
Tony Proctor - 03 Mar 2008 13:18 GMT
Have you checked whether it's actually using a file called XYZ.tmp, or just
L (or even L.tmp)? Although not widely known, NTFS files support something
named "streams", e.g. XYZ.tmp:astream. I wonder if the colon (and anything
following it) is getting consumed that way.
Streams was a neat idea that was never really finished in Windows. I believe
Office uses the mechanism to store document properties such as author,
title, etc.
If you've never heard of them, give it a try. Go into a CMD window and type
'notepad x.tmp:str'. Put some text in. Save it and go back in with just
'notepad x.tmp' (no text!). Go back in again with the original x.tmp:str
(text there again!). Do a DIR and you'll only see x.tmp.
Tony Proctor
> Why does CreateFileMapping return ..
>
[quoted text clipped - 4 lines]
>
> Hopefully CreateFileMapping isn't borrowed from unix :-) ?