Bug in SD84 sample code

Hi;

I think I found a bug in Devantech’s SD84 controller sample code. In the code for SetupCommPort(), there is :

CloseHandle(hCom);

If hCom is invalid (e.g. NULL), then this should not be carried out and in fact this gives exception error when traced in debug mode. If the code is modified to :

HANDLE hCom = NULL;

if (hCom!= NULL) CloseHandle(hCom);


then the debugging would pass.

Anyone has better reccommendation ?

Fun Wey

I am interested in the SD84 controller but wanted comments on it form any one who’s used it with success. Also will need help coding as I have little programming experience, any apps or programs available for Linux?

Devantech replied in their forum:

robot-electronics.co.uk/forum/viewtopic.php?f=8&t=255