Article # 193, added by Geoworks, historical record
| first |
previous |
index |
next |
last |
ViewerLibraryOpen crashes when library/driver does not exist.
Q. How can I check if a library or driver exists on the Nokia 9000 Communicator before I try to use it with ViewerLibraryOpen? A. You can check if the library exists before calling ViewerLibraryOpen with something like the following: GeodeHandle geode; FilePushDir(); FileSetStandardPath( SP_SYSTEM ); geode = GeodeUseLibrary( libraryName, 0, 0, &error ); FilePopDir(); if ( geode == NULL ) { /* library does not exist */ } else { /* library does exist */ GeodeFreeLibrary( geode ); /* unload the library */ /* Can now call ViewerLibraryOpen without fear of the EC VIL_LIBRARY_LOAD_ERROR error. */ } One caveat: the XIP'ed (built in) libraries and drivers are not visible on the file system, so you will not be able to find them. The XIP'ed applications are visible, though.