2009-06-02 9 views

Répondre

1

S'agit-il d'une communication par port série?

Si oui, vous pouvez utiliser la fonction ClearCommError():

DWORD com_errors = 0; 
COMSTAT com_stat; 

ClearCommError(serial_port_handle, &com_errors, &com_stat); 
/* com_stat.cbInQue now holds the number of characters in the receive buffer */ 
+0

Il est pour la communication du port série. Merci pour l'information, je n'aurais jamais deviné que vous pourriez y accéder par une fonction d'erreur claire. –