I'm working on simple application for windows CE to scan barcodes. I have device: CP9700 and this document: 9700 .NET Programming There is a simple application which implememt barcode scanner in Appendix II (pages 277 and 278).
I have prepared project in VS2008 and copied program from appendix II. When I run it on my device I can't catch "WM_DECODEDATA" message.
Can anybody tell me what I'm doing wrong ?
First check the return value of RegisterWindowMessage (see https://msdn.microsoft.com/en-us/library/windows/desktop/ms644947%28v=vs.85%29.aspx for details), if it is 0 you need to use Marshal.GetLastWin32Error() (from System.Runtime.InteropServices) to get an error code. The error codes can be looked up in winerror.h of the installed WMx SDK.
The basic sampe app does not check return codes :-((
YOU should check the InitReader return code (see page 22 of the doc).
Please also check if the DLLs are being copied.