DirectX Error ConditionsIn Fastgraph's DirectX libraries, the fg_vbinit() return value indicates how Fastgraph will use DirectX. If we are using DirectDraw but not Direct3D, fg_vbinit() returns zero if DirectDraw was initialized successfully, and -1 if not (which probably means DirectX isn't available on that system). For example, the code shown here will stop the program if an error occurred during the DirectDraw initialization:
C/C++:
C++Builder:
}
Delphi:
Visual Basic:
Another function, fg_ddstatus(), returns the status of the most recent DirectX operation. If a DirectX error has occurred, fg_ddstatus() returns one of the error codes listed in the documentation supplied with the DirectX SDK, otherwise it returns zero. You can call fg_ddstatus() after any Fastgraph function to check for DirectX errors. This usually isn't necessary when building the release version of a program, but it can be useful when debugging.
|
 
copyright 2001 Ted Gruber Software, Inc.