Click here to Skip to main content
15,895,557 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 1:50
pasztorpisti31-Jul-13 1:50 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 2:23
002comp31-Jul-13 2:23 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 4:03
pasztorpisti31-Jul-13 4:03 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
002comp31-Jul-13 18:11
002comp31-Jul-13 18:11 
GeneralRe: Can we Directly write a Class Object with vectors as member into FILE ? Pin
pasztorpisti31-Jul-13 22:37
pasztorpisti31-Jul-13 22:37 
QuestionOrder of Overlapped Operations Pin
Richard Andrew x6430-Jul-13 21:58
professionalRichard Andrew x6430-Jul-13 21:58 
AnswerRe: Order of Overlapped Operations Pin
Randor 30-Jul-13 22:52
professional Randor 30-Jul-13 22:52 
GeneralRe: Order of Overlapped Operations Pin
Richard Andrew x6430-Jul-13 23:01
professionalRichard Andrew x6430-Jul-13 23:01 
AnswerRe: Order of Overlapped Operations Pin
pasztorpisti30-Jul-13 23:35
pasztorpisti30-Jul-13 23:35 
GeneralRe: Order of Overlapped Operations Pin
Richard Andrew x6431-Jul-13 7:14
professionalRichard Andrew x6431-Jul-13 7:14 
Questioncreating empty file Pin
sarfaraznawaz29-Jul-13 22:32
sarfaraznawaz29-Jul-13 22:32 
AnswerRe: creating empty file Pin
pasztorpisti29-Jul-13 22:37
pasztorpisti29-Jul-13 22:37 
GeneralRe: creating empty file Pin
sarfaraznawaz29-Jul-13 23:21
sarfaraznawaz29-Jul-13 23:21 
GeneralRe: creating empty file Pin
pasztorpisti29-Jul-13 23:27
pasztorpisti29-Jul-13 23:27 
GeneralRe: creating empty file Pin
sarfaraznawaz29-Jul-13 23:40
sarfaraznawaz29-Jul-13 23:40 
GeneralRe: creating empty file Pin
pasztorpisti30-Jul-13 0:12
pasztorpisti30-Jul-13 0:12 
GeneralRe: creating empty file Pin
sarfaraznawaz30-Jul-13 0:20
sarfaraznawaz30-Jul-13 0:20 
GeneralRe: creating empty file Pin
pasztorpisti30-Jul-13 0:50
pasztorpisti30-Jul-13 0:50 
GeneralRe: creating empty file Pin
jeron130-Jul-13 5:06
jeron130-Jul-13 5:06 
GeneralRe: creating empty file Pin
pasztorpisti30-Jul-13 5:43
pasztorpisti30-Jul-13 5:43 
GeneralRe: creating empty file Pin
sarfaraznawaz30-Jul-13 21:24
sarfaraznawaz30-Jul-13 21:24 
AnswerRe: creating empty file Pin
Randor 30-Jul-13 21:39
professional Randor 30-Jul-13 21:39 
Hi,

Yes, you can create 'empty' files of 1GB size.

If you are on Microsoft Windows XP or above and using an NTFS file system then you can create a sparse file. This will allow you to create 'empty' files of any size that contain 'virtual zeros'. The Windows operating system will report the file as having a valid file size... and it will even apply to user disk quota.

Sparse Files[^]

Steps to create a sparse file:

1.) Call CreateFile [^]and create a new file. Keep the file handle open.
2.) Call DeviceIoControl [^] on your open file handle with the FSCTL_SET_SPARSE control code[^] to mark the file as sparse.
3.) Call the SetFilePointerEx function[^] to move from FILE_BEGIN past the end of file. Make sure to assign liDistanceToMove argument to the desired file size.
4.) Call the SetEndOfFile function[^] to set the EOF to the current position of the file pointer.
5.) Close your file hande.

Best Wishes,
-David Delaune
AnswerRe: creating empty file Pin
enhzflep30-Jul-13 2:05
enhzflep30-Jul-13 2:05 
GeneralRe: creating empty file Pin
pasztorpisti30-Jul-13 6:21
pasztorpisti30-Jul-13 6:21 
GeneralRe: creating empty file Pin
enhzflep30-Jul-13 6:46
enhzflep30-Jul-13 6:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.