MetaWINDOW FAQ

InitGraphics() Reported File-I/O-Error

Document ID: MWFAQ034.HTM

The information in this document applies to:

  • MetaWINDOW

QUESTION

InitGraphics() returns with a File-I/O-Error code (74/11), but my program still seems to work fine.  What's going on?
 

ANSWER

When InitGraphics() is called it will try to locate and load an appropriate MetaWINDOW "system??.fnt" font file for the display mode specified in the InitGraphics() call.  InitGraphics() expects "system??.fnt" font files to be located in one the three places:

  1. In the current directory,

  2. In one of the directories specified by the main "PATH=" environment variable, or

  3. One of the directories specified in a user-defined "SET METAPATH=" environment variable.

File searching is performed in the sequence noted above.  If the expected "system??.fnt" font file is not found, InitGraphics() posts a File I/O error return.  This is not a critical error in that InitGraphics() will switch to use an internal default font built into MetaWINDOW if the expected "system??.fnt" is not found.

Follows is a list of the MetaWINDOW "system??.fnt" bitmap font files associated with display resolutions that can be specified in the InitGraphics() call:


    Font Name       Display    Char Size (w x h)
   system00.fnt     320x200      (5 x 8)
   system08.fnt     640x200      (8 x 8)
   system16.fnt     640x350     (8 x 13)
   system24.fnt     720x350     (9 x 13)
   system32.fnt     640x400     (8 x 16)
   system48.fnt    1280x400    (16 x 16)
   system56.fnt    1280x800    (16 x 32) 
   system64.fnt    1024x768    (12 x 30)  
   system72.fnt     640x480     (8 x 19)
   system96.fnt     800x600    (10 x 24) 

Again, InitGraphics() will simply post a File-I/O-Error (file not found), and then switch to use it's built-in default font if the expected "system??.fnt" file cannot be found.  Calling QueryError() after InitGraphics() will clear the error status register and allow other errors to be detected later in your program.


IMPORTANT - An InitGraphics() File-I/O-Error may also occur on platforms that use dynamically loaded drivers (METWNDxx.DRV, .DRP and .DLL driver files).  Dynamically loaded drivers are searched in the same path sequences as noted above.  Failure to find a required driver file, however, is a critical error, and no drawing operatings will occur if a required dynamically loaded driver file cannot be located.


Link To MetaWINDOW FAQ Index
Link To MetaWINDOW Home Page
Link To Metagraphics Home Page

© Copyright - Metagraphics Software Corporation. All rights reserved.