#define INCL_DOSMISC USHORT rc = DosErrClass(Code, Class, Action, Locus); USHORT Code; /* Error code for analysis */ PUSHORT Class; /* Error classification (returned) */ PUSHORT Action; /* Recommended action (returned) */ PUSHORT Locus; /* Error locus (returned) */ USHORT rc; /* return code */
Example
This example attempts to delete a non-existent file. The error returned is then plugged into DosErrClass for more information about the error and what actions should be taken.
#define INCL_DOSQUEUES
#define RESERVED 0L
#define FILE_DELETE "adlkjf.dkf"
USHORT Error;
USHORT Class;
USHORT Action;
USHORT Locus;
USHORT rc;
Error = DosDelete(FILE_DELETE, /* File name path */
RESERVED); /* Reserved (must be zero) */
rc = DosErrClass(Error, /* Error code for analysis */
&Class, /* Error classification */
&Action, /* Recommended action */
&Locus); /* Error locus */