Rockwell-automation 1747-PCINT API Software for 1746 I/O Uživatelský manuál Strana 72

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 155
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 71
6–18 Library of Routines OC_ErrorMsg
Publication 1747-6.5.3 June 1998
OC_ErrorMsg OC_ErrorMsg returns a descriptive text message associated with the API return
value errcode.
Syntax:
int OC_ErrorMsg(int errcode, char **msg);
Description:
The null-terminated message string is placed in a static buffer that is reused each time this function is called.
A pointer to this buffer is returned in
msg.
Return Value:
Considerations:
Supported in the DOS API library and the Windows NT API library.
Example:
HANDLE Handle;
char *msg;
int rc;
if (SUCCESS != (rc = OC_OpenScanner(&Handle)))
{
/* Open failed - display error message */
OCErrorMsg(rc, &msg);
printf(“Error: %s\n”, msg);
}
Name: Description:
SUCCESS
errcode was valid. msg points to corresponding error description.
ERR_OCPARAM
errcode was invalid. msg points to unknown error code string.
Zobrazit stránku 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 154 155

Komentáře k této Příručce

Žádné komentáře