home | |||
links |
|
||
developer's mag main page article part 1 part 2 part 3 part 4 part 5 part 6 part 7 |
4 - Handling the ResultYou display the dialog and get a file selection - now what? Well, as has already been mentioned, you can tell whether you are dealing with an MMC or RAM file by looking at the 'vdev' flag of the returned ebo_enumerator_t structure. This presents you with two options:
More than likely, you don't want to read a whole MMC file into main memory, as you'll risk running out of memory with larger files. You can read in a portion of a MMC file with the following call: long ebo_iread (int idx, void *buf, off_t offset, size_t count); This function is passed the index from the MMC item you've found (the 'index' field of the ebo_enumerator_t structure), as well as a pointer to a storage buffer, a file offset, and a copy count. The return value is the length of data copied. Again, the buffer you pass should be big enough to hold it. Previous Section Next Section |
||
Copyright © 2001-2006 ebmDevMag.com - Legal Notice |