outputing files
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
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
Popular Topics
Advertisement
Recommended Tutorials
Advertisement