Rockwell-automation 1747-PCIS API Software - Open Controller Instrukcja Użytkownika Strona 76

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 174
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 75
Publication 1747-UM002A-US-P - June 2000
6-16 Library of Routines
Description:
This function is useful when displaying an error message. You should
use OC_GetExtendedError to obtain the message before using
OC_ExtendedErrorMsg to display the message. If you don’t use
OC_GetExtendedError first, OC_ExtendedErrorMsg displays a null
message.
The
OCEXTERR structure is defined as:
#define OCERRDATASIZE3/* number of bytes of error data */
typedef struct tagOCEXTERR
{
BYTEErrorCode;/* Extended error code */
BYTESlotNum;/* Associated slot number */
BYTEErrorData[OCERRDATASIZE];/* Error code data
*/
} OCEXTERR;
See appendix A for error codes.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library
Example:
HANDLE Handle;
OCEXTERR exterr;
char *msg;
int retcode;
/* Should already have called
OC_GetExtendedError() to obtain exterr */
retcode = OC_ExtendedErrorMsg( Handle, &exterr,
&msg );
printf(“ERROR:%s\n”, msg);
Name: Value: Description:
SUCCESS 0 extended error information was read successfully
ERR_OCACCESS 2 handle does not have access to scanner
Przeglądanie stron 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 173 174

Komentarze do niniejszej Instrukcji

Brak uwag