Click here to Skip to main content
15,893,722 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need handle to CDocument. Pin
David Crow7-Oct-04 4:15
David Crow7-Oct-04 4:15 
Generaltemplate problems Pin
pankajdaga7-Oct-04 2:01
pankajdaga7-Oct-04 2:01 
GeneralRe: template problems Pin
Joaquín M López Muñoz7-Oct-04 2:29
Joaquín M López Muñoz7-Oct-04 2:29 
GeneralRe: template problems Pin
Joaquín M López Muñoz7-Oct-04 2:38
Joaquín M López Muñoz7-Oct-04 2:38 
GeneralRe: template problems Pin
pankajdaga7-Oct-04 10:44
pankajdaga7-Oct-04 10:44 
GeneralDebugging DLL project in VC++ 6.0 Pin
Neeranjan7-Oct-04 1:51
Neeranjan7-Oct-04 1:51 
GeneralRe: Debugging DLL project in VC++ 6.0 Pin
Roger Allen7-Oct-04 7:13
Roger Allen7-Oct-04 7:13 
GeneralWriting/Reading binaric objects to/from a file Pin
impeham7-Oct-04 1:46
impeham7-Oct-04 1:46 
I need to save few objects' to a file and reload them later on to memory.
I used something like that:

WriteFile(hFile, obj_ptr, sizeof(DATABASEINFO), &NumberOfBytesWritten, NULL);

and then:

ReadFile(hFile, CurrentObject, sizeof(DATABASEINFO), &NumberOfBytesRead, NULL);

where "CurrentObject" is a pointer to an allocated space for "DATABASEINFO" structure.

This method doesn't work. the Read operation reads nonsense.

Can anyone see the problem? is there a better way for doing this?

Thanks.


GeneralRe: Writing/Reading binaric objects to/from a file Pin
Cedric Moonen7-Oct-04 2:19
Cedric Moonen7-Oct-04 2:19 
GeneralRe: Writing/Reading binaric objects to/from a file Pin
impeham7-Oct-04 2:45
impeham7-Oct-04 2:45 
GeneralRe: Writing/Reading binaric objects to/from a file Pin
Cedric Moonen7-Oct-04 3:03
Cedric Moonen7-Oct-04 3:03 
GeneralRe: Writing/Reading binaric objects to/from a file Pin
Ravi Bhavnani7-Oct-04 2:23
professionalRavi Bhavnani7-Oct-04 2:23 
GeneralData Sharing Pin
shiraztk7-Oct-04 0:49
shiraztk7-Oct-04 0:49 
GeneralRe: Data Sharing Pin
Cedric Moonen7-Oct-04 1:12
Cedric Moonen7-Oct-04 1:12 
GeneralRe: Data Sharing Pin
Blake Miller7-Oct-04 11:07
Blake Miller7-Oct-04 11:07 
GeneralRe: Data Sharing Pin
jan larsen7-Oct-04 1:22
jan larsen7-Oct-04 1:22 
GeneralRe: Data Sharing Pin
shiraztk7-Oct-04 19:40
shiraztk7-Oct-04 19:40 
GeneralConverting CString Pin
Franz Klein7-Oct-04 0:07
Franz Klein7-Oct-04 0:07 
GeneralRe: Converting CString Pin
Joaquín M López Muñoz7-Oct-04 2:40
Joaquín M López Muñoz7-Oct-04 2:40 
GeneralSocket Programming using threads Pin
Ajoy6-Oct-04 23:29
Ajoy6-Oct-04 23:29 
GeneralRe: Socket Programming using threads Pin
Sujan Christo7-Oct-04 0:49
Sujan Christo7-Oct-04 0:49 
GeneralRe: Socket Programming using threads Pin
Bob Stanneveld7-Oct-04 2:46
Bob Stanneveld7-Oct-04 2:46 
GeneralRe: Socket Programming using threads Pin
vcplusplus7-Oct-04 3:02
vcplusplus7-Oct-04 3:02 
GeneralRe: Socket Programming using threads Pin
Bob Stanneveld7-Oct-04 3:11
Bob Stanneveld7-Oct-04 3:11 
GeneralDIID_HTMLElementEvents2 Pin
george ivanov6-Oct-04 22:50
george ivanov6-Oct-04 22:50 

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.