Deditec USB-TTL-32 Ficha De Dados

Página de 58
DELIB API reference | Seite
37
4.2.2. DapiGetLastErrorText
Description
This function reads the text of the last registered error.
Definition
extern ULONG __stdcall DapiGetLastErrorText(unsigned char * msg, unsigned long
msg_length);
Parameters
msg = text buffer
msg_length = length of the buffer
Example program
BOOL IsError ()
{
  if (DapiGetLastError () != DAPI_ERR_NONE)
{
  unsigned char msg[500];
  DapiGetLastErrorText((unsigned char*) msg, sizeof(msg));
  printf ("Error Code = %x * Message = %s\n", 0, msg);
  return TRUE;
}
  return FALSE;
}