Advertisement

outputing files

Started by January 05, 2001 04:21 PM
0 comments, last by tenchimusakiryoko 24 years ago
Hey, I was just wondering if anyone knew where I could find some tutorials on how to output a file. Like saving , reading map data, etc.. Thanks. "Good,evil,I got the gun" Ash- Evil Dead
"Good,evil,I got the gun"Ash- Evil Dead
What system? If Windows PC, use the API.
Here is a default template:

To open a file:

handle = CreateFile(filename, GENERIC_READ or GENERIC_WRITE, 0, NULL, CREATE_ALWAYS (write) or OPEN_EXISTING (read), NULL, 0);

To close:

CloseHandle(handle);

To read:

ReadFile(handle, address to read from, size in bytes, pointer to DWORD for bytes read, NULL);

To write

WriteFile(handle, address to write from, size in bytes, pointer to DWORD for bytes written, NULL);

Should be enough to get you going. Just see microsoft.com for any details.

Mark
mark@treality.freeserve.co.uk
http://www.treality.freeserve.co.uk

This topic is closed to new replies.

Advertisement