Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / COM / March 2008



Tip: Looking for answers? Try searching our database.

CreateFileMapping question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boris Danner - 27 Feb 2008 16:36 GMT
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 :-) ?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.