This operation code obtains the number of the most recent Windows Graphical Device Interface (GDI) error from the Windows API.
CALL "WIN$PRINTER" USING WINPRINT-GET-SPOOL-ERR GIVING RESULT
This operation returns the most recent Windows GDI error.
The complexity of Windows graphics capabilities make it impossible to catalog all possible error conditions in winprint.def. Therefore, if a graphical error condition occurs, the WIN$PRINTER op-code that caused the error returns WPRTERR-SPOOL-ERR to indicate that a Windows API error occurred. Use WINPRINT-GET-SPOOL-ERR to retrieve the specific Windows API error number, then refer to Windows API documentation for a description of the problem.
This operation should be called immediately after a WIN$PRINTER operation call has returned WPRTERR-SPOOL-ERR. Calling this function under other circumstances will return unpredictable values. This operation does not impact WRITE statements.