Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++
can I implement a mechanism like "windows file mapping" in which you can treat large files on disk as if they're already loaded while they're not?
Posted 31-Oct-11 10:03am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Do you mean memory mapped files? If so, see[^]
If you mean direct disk access, you can use CreateFile to do that. You may run into access restrictions on Vista/Windows 7 though.
Joseph Marzbany at 31-Oct-11 15:08pm
yes I do. but that is a windows approach while I intend a "portable C++ approach".
Nishant Sivakumar at 31-Oct-11 15:11pm
There is no portable approach to these things, since C++ is agnostic of the file system (mostly).
Espen Harlinn at 31-Oct-11 15:30pm
5'ed, true as far as the os and standard c/c++ libraries are concerned
Nishant Sivakumar at 31-Oct-11 15:31pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Have a look at the ACE C++ library[^]:[^]
ACE is efficient and exceptionally well tested Smile | :)
It's also available for most relevant operating systems and compilers ...

Best regards
Espen Harlinn
Nishant Sivakumar at 31-Oct-11 15:32pm
Interesting link - had not heard of that before. Voted 5!
Espen Harlinn at 31-Oct-11 16:18pm
Thank you, Nish - I've written a real-time data historian on top of ACE, and I've always been very happy with both the library and the community.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 424
1 OriginalGriff 375
2 CHill60 230
3 CPallini 220
4 Maciej Los 210
0 Sascha Lefévre 75
1 OriginalGriff 70
2 F-ES Sitecore 55
3 Peter Leow 50
4 Dave Kreskowiak 40

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 31 Oct 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100