![background image](http://html1.mh-extra.com/html/hand-held-products/5080/5080_user-manual_589690059.webp)
5X80 Series Software Development Kit (SDK) User’s Guide
6 - 7
LRESULT OnProgressMsg( WPARAM wParam,LPARAM lParam )
{
DWORD
dwBytesSoFar = wParam;
// Number of bytes receive to this point.
DWORD
dwBytesToRead = lParam;
// Total number of bytes expected.
return( 0 );
}
// Message Handler for image acquisition ended function (can be result of a failure as
well)
LRESULT OnEventMsg( WPARAM wParam,LPARAM lParam )
{
hhpEventTye_t eventType = (hhpEventType_t)wParam;
// Event type
DWORD
dwBytes = lParam;
// Number of bytes in
barcode. You don’t actually
use it here.
HHP_IMAGE
Image;
// Returned image structure.
TCHAR
tcErrMsg[ 128 ];
// Error message buffer
Result_t
nResult = RESULT_ERR_INTIALIZE;
// Return code
// Verify the event type is barcode
if( eventType == HHP_IMAGE_EVENT )
{
// Set the HHP_IMAGE structure size and allocate a buffer for the data, set
the buffer size and how we want to receive the data in the buffer.
Image.dwStructSize = sizeof( HHP_IMAGE );
Image.puchBuffer = new BYTE[ 324000 ];
// Allocate a buffer big enough to
hold 640x480x8 plus header (if BMP)
Image.nBufferSize = 324000;
// SDK wants to know how big the
buffer is so there’s no overflow
Image.fileFormat = FF_BMP_GRAY;
// 8 bit bmp file format data
if( (nResult = hhpGetAsyncResult( &eventType,&Image )) == RESULT_SUCCESS )
{
// save image data to a bmp file and/or display it
}
else
{
hhpGetErrorMessage( nResult,tcErrMsg );
_tprintf( _T(“Capture Image Failed: %s\n”),tcErrMsg );
}
}
// Remember to delete your buffer
delete [ ] image.puchBuffer;
return( 0 );
}
Содержание 5080
Страница 1: ...Software Development Kit SDK for 5080 5180 and 5380 Decoded Miniature Image Scan Engines User s Guide ...
Страница 6: ...iv 5X80 Series Software Development Kit SDK User s Guide ...
Страница 14: ...1 8 5X80 Series Software Development Kit SDK User s Guide ...
Страница 50: ...4 14 5X80 Series Software Development Kit SDK User s Guide ...
Страница 60: ...6 8 5X80 Series Software Development Kit SDK User s Guide ...
Страница 62: ...7 2 5X80 Series Software Development Kit SDK User s Guide ...
Страница 63: ......
Страница 64: ... Hand Held Products Inc 700 Visions Drive P O Box 208 Skaneateles Falls NY 13153 0208 5X10 80SDK UG Rev C 9 07 ...