MC9190 EMDK for C v2.7 issue

M Mathieu Kurth 3 years 7 months ago
4 1 0

Hi,
 
I'm not sure I'm at the right place to ask question.... I hope.
 
I'm developing an application to run on MC9190 WM 6.5.  I'm using the EMDK for C v.2.7.
I'm using the following functions on the following order:
SCAN_FindFirst_W
SCAN_Open
SCAN_AllocateBuffer_W
SCAN_ReadLabelMsg_W
 
Whenever I scan something my callback function is called.
So I read the buffer information and then restart the event
SCAN_DeallocateBuffer_W
SCAN_AllocateBuffer_W
SCAN_ReadLabelMsg_W
 
Now the issue I have is if my app crash (we all hope this never happens but this happens sometime...)
When my app crash, the exe is blocked.  I cannot delete the file neither overwrite it.  If I launch the app back as soon as I call the  SCAN_ReadLabelMsg_W my callback function is called with the E_SCN_READINCOMPATIBLE status.  So it looks like the scanner is still busy with the app that crashed.  When I look at the taskmanager, the app is only listed in the process view.  So it's crashed but not completely.  It looks like it's waiting for something to really stops.  And this is due to the call to the SCAN_ReadLabelMsg_W function. 
 
Anyone already face this issue?  How can I fix this?
 
Regards

Please Register or Login to post a reply

1 Replies

Y Yanis Dalabiras

I'm not sure if it would catch every crash, but have you looked at the ScanSample app that comes with the EMDK?  You can see that it is listening for the WM_DESTROY message and attempting to clean up the scanner if it sees that.

CONTACT
Can’t find what you’re looking for?