#include "include/stdafx.h" #include "SMARTComm70.h" #include "include/SmartErrCodes.h" CSMARTCommon::CSMARTCommon(void) { m_hDll = NULL; m_hSmart = NULL; m_nLastRes = SM_SUCCESS; } CSMARTCommon::~CSMARTCommon(void) { Free(); } #define GETDLLFUNC(_hdll,_fn) (_fn) GetProcAddress( (_hdll), (#_fn) ) BOOL CSMARTCommon::Load(LPTSTR dllFile) { m_hDll = LoadLibrary( dllFile ); if( m_hDll == NULL ) { return FALSE; } m_pfn_GetDeviceList = GETDLLFUNC( m_hDll, Smart70_GetDeviceList ); m_pfn_ExGetDeviceList = GETDLLFUNC( m_hDll, Smart70_ExGetDeviceList ); m_pfn_GetDeviceInfo = GETDLLFUNC( m_hDll, Smart70_GetDeviceInfo ); m_pfn_OpenDevice = GETDLLFUNC( m_hDll, Smart70_OpenDevice ); m_pfn_ExOpenDevice = GETDLLFUNC( m_hDll, Smart70_ExOpenDevice ); m_pfn_CloseDevice = GETDLLFUNC( m_hDll, Smart70_CloseDevice ); m_pfn_GetRibbonInfo = GETDLLFUNC( m_hDll, Smart70_GetRibbonInfo ); m_pfn_GetConnectedDevices = GETDLLFUNC( m_hDll, Smart70_GetConnectedDevices ); m_pfn_GetConnectedModules = GETDLLFUNC( m_hDll, Smart70_GetConnectedModules ); m_pfn_ICHContact = GETDLLFUNC( m_hDll, Smart70_ICHContact ); m_pfn_ICHDiscontact = GETDLLFUNC( m_hDll, Smart70_ICHDiscontact ); m_pfn_OpenDocument = GETDLLFUNC( m_hDll, Smart70_OpenDocument ); m_pfn_CloseDocument = GETDLLFUNC( m_hDll, Smart70_CloseDocument ); m_pfn_ClearDocument = GETDLLFUNC( m_hDll, Smart70_ClearDocument ); m_pfn_GetFieldCount = GETDLLFUNC( m_hDll, Smart70_GetFieldCount ); m_pfn_GetFieldName = GETDLLFUNC( m_hDll, Smart70_GetFieldName ); m_pfn_GetFieldValue = GETDLLFUNC( m_hDll, Smart70_GetFieldValue ); m_pfn_SetFieldValue = GETDLLFUNC( m_hDll, Smart70_SetFieldValue ); m_pfn_GetPrinterSettings = GETDLLFUNC( m_hDll, Smart70_GetPrinterSettings ); m_pfn_SetPrinterSettings = GETDLLFUNC( m_hDll, Smart70_SetPrinterSettings ); m_pfn_DrawImage = GETDLLFUNC( m_hDll, Smart70_DrawImage ); m_pfn_DrawImage2 = GETDLLFUNC( m_hDll, Smart70_ExDrawImage ); m_pfn_DrawText = GETDLLFUNC( m_hDll, Smart70_DrawText ); m_pfn_DrawText2 = GETDLLFUNC( m_hDll, Smart70_DrawText2 ); m_pfn_DrawRect = GETDLLFUNC( m_hDll, Smart70_DrawRect ); m_pfn_DrawBarcode = GETDLLFUNC( m_hDll, Smart70_DrawBarcode ); m_pfn_GetBarcodeTypeCount = GETDLLFUNC( m_hDll, Smart70_GetBarcodeTypeCount ); m_pfn_GetBarcodeTypeName = GETDLLFUNC( m_hDll, Smart70_GetBarcodeTypeName ); m_pfn_SetICG = GETDLLFUNC( m_hDll, Smart70_SetICG ); m_pfn_GetICG = GETDLLFUNC( m_hDll, Smart70_GetICG ); m_pfn_GetPreviewBitmap = GETDLLFUNC( m_hDll, Smart70_GetPreviewBitmap ); m_pfn_GetUnitInfo = GETDLLFUNC( m_hDll, Smart70_GetUnitInfo ); m_pfn_GetFieldLinkedUnitInfo = GETDLLFUNC( m_hDll, Smart70_GetFieldLinkedUnitInfo ); m_pfn_SetUnitInfo = GETDLLFUNC( m_hDll, Smart70_SetUnitInfo ); m_pfn_GetUnitInfo2 = GETDLLFUNC( m_hDll, Smart70_GetUnitInfo2 ); m_pfn_GetFieldLinkedUnitInfo2 = GETDLLFUNC( m_hDll, Smart70_GetFieldLinkedUnitInfo2 ); m_pfn_SetUnitInfo2 = GETDLLFUNC( m_hDll, Smart70_SetUnitInfo2 ); m_pfn_GetUnitInfo2Direct = GETDLLFUNC( m_hDll, Smart70_GetUnitInfo2Direct ); m_pfn_RFPowerOn = GETDLLFUNC( m_hDll, Smart70_RFPowerOn ); m_pfn_RFPowerOff = GETDLLFUNC( m_hDll, Smart70_RFPowerOff ); m_pfn_RFTransmit = GETDLLFUNC( m_hDll, Smart70_RFTransmit ); m_pfn_RFPowerOn2 = GETDLLFUNC( m_hDll, Smart70_RFPowerOn2 ); m_pfn_RFPowerOff2 = GETDLLFUNC( m_hDll, Smart70_RFPowerOff2 ); m_pfn_RFTransmit2 = GETDLLFUNC( m_hDll, Smart70_RFTransmit2 ); m_pfn_ICPowerOn = GETDLLFUNC( m_hDll, Smart70_ICPowerOn ); m_pfn_ICPowerOff = GETDLLFUNC( m_hDll, Smart70_ICPowerOff ); m_pfn_ICTransmit = GETDLLFUNC( m_hDll, Smart70_ICTransmit ); m_pfn_ICPowerOn2 = GETDLLFUNC( m_hDll, Smart70_ICPowerOn2 ); m_pfn_ICPowerOff2 = GETDLLFUNC( m_hDll, Smart70_ICPowerOff2 ); m_pfn_ICTransmit2 = GETDLLFUNC( m_hDll, Smart70_ICTransmit2 ); m_pfn_DCLOpenDevice = GETDLLFUNC( m_hDll, Smart70DCL_OpenDevice ); m_pfn_DCLExOpenDevice = GETDLLFUNC( m_hDll, Smart70DCL_ExOpenDevice ); m_pfn_DCLCloseDevice = GETDLLFUNC( m_hDll, Smart70DCL_CloseDevice ); m_pfn_DCLPrint = GETDLLFUNC( m_hDll, Smart70DCL_Print ); m_pfn_ExSetConfig = GETDLLFUNC( m_hDll, Smart70_ExSetConfig ); m_pfn_ExGetConfig = GETDLLFUNC( m_hDll, Smart70_ExGetConfig ); m_pfn_RequestPreemption = GETDLLFUNC( m_hDll, Smart70_RequestPreemption ); m_pfn_ReleasePreemption = GETDLLFUNC( m_hDll, Smart70_ReleasePreemption ); m_pfn_GetModuleState = GETDLLFUNC( m_hDll, Smart70_GetModuleState ); m_pfn_UpdateModuleState = GETDLLFUNC( m_hDll, Smart70_UpdateModuleState ); m_pfn_GetStatus = GETDLLFUNC( m_hDll, Smart70_GetStatus ); m_pfn_IsModuleReady = GETDLLFUNC( m_hDll, Smart70_IsModuleReady ); m_pfn_IsReadyInsertJob = GETDLLFUNC( m_hDll, Smart70_IsReadyInsertJob ); m_pfn_ToggleManualMode = GETDLLFUNC( m_hDll, Smart70_ToggleManualMode ); m_pfn_UpdateCurrPrintJob = GETDLLFUNC( m_hDll, Smart70_UpdateCurrPrintJob ); m_pfn_GetCurrPrintJob = GETDLLFUNC( m_hDll, Smart70_GetCurrPrintJob ); m_pfn_DeleteCurrPrintJob = GETDLLFUNC( m_hDll, Smart70_DeleteCurrPrintJob ); m_pfn_CardIn = GETDLLFUNC( m_hDll, Smart70_CardIn ); m_pfn_CardOut = GETDLLFUNC( m_hDll, Smart70_CardOut ); m_pfn_CardMove = GETDLLFUNC( m_hDll, Smart70_CardMove ); m_pfn_CardMove2 = GETDLLFUNC( m_hDll, Smart70_CardMove2 ); m_pfn_CardListMove = GETDLLFUNC( m_hDll, Smart70_CardListMove ); m_pfn_CardMoveQuick = GETDLLFUNC( m_hDll, Smart70_CardMoveQuick ); m_pfn_CardPass = GETDLLFUNC( m_hDll, Smart70_CardPass ); m_pfn_CardFlipPass = GETDLLFUNC( m_hDll, Smart70_CardFlipPass ); m_pfn_CardFlip = GETDLLFUNC( m_hDll, Smart70_CardFlip ); m_pfn_CardFlip2 = GETDLLFUNC( m_hDll, Smart70_CardFlip2 ); m_pfn_CardFlipStay = GETDLLFUNC( m_hDll, Smart70_CardFlipStay ); m_pfn_Flip = GETDLLFUNC( m_hDll, Smart70_Flip ); m_pfn_CardMoveSensor = GETDLLFUNC( m_hDll, Smart70_CardMoveSensor ); m_pfn_CardMovePosition = GETDLLFUNC( m_hDll, Smart70_CardMovePosition ); m_pfn_CardEject = GETDLLFUNC( m_hDll, Smart70_CardEject ); m_pfn_CardEjectBin = GETDLLFUNC( m_hDll, Smart70_CardEjectBin ); m_pfn_CardEject2 = GETDLLFUNC( m_hDll, Smart70_CardEject2 ); m_pfn_SetEncConfig = GETDLLFUNC( m_hDll, Smart70_SetEncConfig ); m_pfn_GetEncConfig2 = GETDLLFUNC( m_hDll, Smart70_GetEncConfig2 ); m_pfn_SetEncConfig2 = GETDLLFUNC( m_hDll, Smart70_SetEncConfig2 ); m_pfn_SetEncBuffer = GETDLLFUNC( m_hDll, Smart70_SetEncBuffer ); m_pfn_WriteEncoder = GETDLLFUNC( m_hDll, Smart70_WriteEncoder ); m_pfn_ReadEncoder = GETDLLFUNC( m_hDll, Smart70_ReadEncoder ); m_pfn_FetchEncoder = GETDLLFUNC( m_hDll, Smart70_FetchEncoder ); m_pfn_GetEncBuffer = GETDLLFUNC( m_hDll, Smart70_GetEncBuffer ); m_pfn_RunEncoder = GETDLLFUNC( m_hDll, Smart70_RunEncoder ); m_pfn_GetPrinterSettings = GETDLLFUNC( m_hDll, Smart70_GetPrinterSettings ); m_pfn_SetPrinterSettings = GETDLLFUNC( m_hDll, Smart70_SetPrinterSettings ); m_pfn_PrintDocument = GETDLLFUNC( m_hDll, Smart70_PrintDocument ); m_pfn_SetJobCallback = GETDLLFUNC( m_hDll, Smart70_SetJobCallback ); m_pfn_PrintStart = GETDLLFUNC( m_hDll, Smart70_PrintStart ); m_pfn_GetJobInfo = GETDLLFUNC( m_hDll, Smart70_GetJobInfo ); m_pfn_GetJobInfoEx = GETDLLFUNC( m_hDll, Smart70_GetJobInfoEx ); m_pfn_NewJobDescriptor = GETDLLFUNC( m_hDll, Smart70_NewJobDescriptor ); m_pfn_FreeJobDescriptor = GETDLLFUNC( m_hDll, Smart70_FreeJobDescriptor ); m_pfn_AddJobItem = GETDLLFUNC( m_hDll, Smart70_AddJobItem ); m_pfn_AddJobItemMove = GETDLLFUNC( m_hDll, Smart70_AddJobItemMove ); m_pfn_AddJobItemFlip = GETDLLFUNC( m_hDll, Smart70_AddJobItemFlip ); m_pfn_AddJobItemMagnetic = GETDLLFUNC( m_hDll, Smart70_AddJobItemMagnetic ); m_pfn_AddJobItemContact = GETDLLFUNC( m_hDll, Smart70_AddJobItemContact ); m_pfn_AddJobItemContactless = GETDLLFUNC( m_hDll, Smart70_AddJobItemContactless ); m_pfn_AddJobItemScanImage = GETDLLFUNC( m_hDll, Smart70_AddJobItemScanImage ); m_pfn_AddJobItemScanBarcode = GETDLLFUNC( m_hDll, Smart70_AddJobItemScanBarcode ); m_pfn_AddJobItemPrint = GETDLLFUNC( m_hDll, Smart70_AddJobItemPrint ); m_pfn_AddJobItemLaminate = GETDLLFUNC( m_hDll, Smart70_AddJobItemLaminate ); m_pfn_AddJobItemUser = GETDLLFUNC( m_hDll, Smart70_AddJobItemUser ); m_pfn_InsertJob = GETDLLFUNC( m_hDll, Smart70_InsertJob ); m_pfn_ExGetDevParam2 = GETDLLFUNC( m_hDll, Smart70_ExGetDevParam2 ); m_pfn_ExSetDevParam2 = GETDLLFUNC( m_hDll, Smart70_ExSetDevParam2 ); m_pfn_MagWrite = GETDLLFUNC( m_hDll, Smart70_MagWrite ); m_pfn_MagRead = GETDLLFUNC( m_hDll, Smart70_MagRead ); m_pfn_LaserConnect = GETDLLFUNC( m_hDll, Smart70_LaserConnect ); m_pfn_LaserDisconnect = GETDLLFUNC( m_hDll, Smart70_LaserDisconnect ); m_pfn_LaserCheckPort = GETDLLFUNC( m_hDll, Smart70_LaserCheckPort ); m_pfn_LDrawLine = GETDLLFUNC( m_hDll, Smart70_LDrawLine ); m_pfn_LDrawRect = GETDLLFUNC( m_hDll, Smart70_LDrawRect ); m_pfn_LDrawOval = GETDLLFUNC( m_hDll, Smart70_LDrawOval ); m_pfn_LDrawRRect = GETDLLFUNC( m_hDll, Smart70_LDrawRRect ); m_pfn_LDrawText = GETDLLFUNC( m_hDll, Smart70_LDrawText ); m_pfn_LDrawBarcode = GETDLLFUNC( m_hDll, Smart70_LDrawBarcode ); m_pfn_LDrawImage = GETDLLFUNC( m_hDll, Smart70_LDrawImage ); m_pfn_LDrawBitmap = GETDLLFUNC( m_hDll, Smart70_LDrawBitmap ); if( !m_pfn_GetDeviceList || !m_pfn_GetDeviceList || !m_pfn_ExGetDeviceList || !m_pfn_GetDeviceInfo || !m_pfn_OpenDevice || !m_pfn_ExOpenDevice || !m_pfn_CloseDevice || !m_pfn_GetRibbonInfo || !m_pfn_GetConnectedDevices || !m_pfn_GetConnectedModules || !m_pfn_ICHContact || !m_pfn_ICHDiscontact || !m_pfn_OpenDocument || !m_pfn_CloseDocument || !m_pfn_ClearDocument || !m_pfn_GetFieldCount || !m_pfn_GetFieldName || !m_pfn_GetFieldValue || !m_pfn_SetFieldValue || !m_pfn_GetPrinterSettings || !m_pfn_SetPrinterSettings || !m_pfn_DrawImage || !m_pfn_DrawImage2 || !m_pfn_DrawText || !m_pfn_DrawText2 || !m_pfn_DrawRect || !m_pfn_DrawBarcode || !m_pfn_GetBarcodeTypeCount || !m_pfn_GetBarcodeTypeName || !m_pfn_SetICG || !m_pfn_GetICG || !m_pfn_GetPreviewBitmap || !m_pfn_GetUnitInfo || !m_pfn_GetFieldLinkedUnitInfo || !m_pfn_SetUnitInfo || !m_pfn_GetUnitInfo2 || !m_pfn_GetFieldLinkedUnitInfo2 || !m_pfn_SetUnitInfo2 || !m_pfn_GetUnitInfo2Direct || !m_pfn_RFPowerOn || !m_pfn_RFPowerOff || !m_pfn_RFTransmit || !m_pfn_RFPowerOn2 || !m_pfn_RFPowerOff2 || !m_pfn_RFTransmit2 || !m_pfn_ICPowerOn || !m_pfn_ICPowerOff || !m_pfn_ICTransmit || !m_pfn_ICPowerOn2 || !m_pfn_ICPowerOff2 || !m_pfn_ICTransmit2 || !m_pfn_DCLOpenDevice || !m_pfn_DCLExOpenDevice || !m_pfn_DCLCloseDevice || !m_pfn_DCLPrint || !m_pfn_ExSetConfig || !m_pfn_ExGetConfig || !m_pfn_RequestPreemption || !m_pfn_ReleasePreemption || !m_pfn_GetModuleState || !m_pfn_UpdateModuleState || !m_pfn_GetStatus || !m_pfn_IsModuleReady || !m_pfn_IsReadyInsertJob || !m_pfn_ToggleManualMode || !m_pfn_UpdateCurrPrintJob || !m_pfn_GetCurrPrintJob || !m_pfn_DeleteCurrPrintJob || !m_pfn_CardIn || !m_pfn_CardOut || !m_pfn_CardMove || !m_pfn_CardMove2 || !m_pfn_CardListMove || !m_pfn_CardMoveQuick || !m_pfn_CardPass || !m_pfn_CardFlipPass || !m_pfn_CardFlip || !m_pfn_CardFlip2 || !m_pfn_CardFlipStay || !m_pfn_Flip || !m_pfn_CardMoveSensor || !m_pfn_CardMovePosition || !m_pfn_CardEject || !m_pfn_CardEjectBin || !m_pfn_CardEject2 || !m_pfn_SetEncConfig || !m_pfn_GetEncConfig2 || !m_pfn_SetEncConfig2 || !m_pfn_SetEncBuffer || !m_pfn_WriteEncoder || !m_pfn_ReadEncoder || !m_pfn_FetchEncoder || !m_pfn_GetEncBuffer || !m_pfn_RunEncoder || !m_pfn_GetPrinterSettings || !m_pfn_SetPrinterSettings || !m_pfn_PrintDocument || !m_pfn_SetJobCallback || !m_pfn_PrintStart || !m_pfn_GetJobInfo || !m_pfn_GetJobInfoEx || !m_pfn_NewJobDescriptor || !m_pfn_FreeJobDescriptor || !m_pfn_AddJobItem || !m_pfn_AddJobItemMove || !m_pfn_AddJobItemFlip || !m_pfn_AddJobItemMagnetic || !m_pfn_AddJobItemContact || !m_pfn_AddJobItemContactless || !m_pfn_AddJobItemScanImage || !m_pfn_AddJobItemScanBarcode || !m_pfn_AddJobItemPrint || !m_pfn_AddJobItemLaminate || !m_pfn_AddJobItemUser || !m_pfn_InsertJob || !m_pfn_ExGetDevParam2 || !m_pfn_ExSetDevParam2 || !m_pfn_MagWrite || !m_pfn_MagRead || !m_pfn_LaserConnect || !m_pfn_LaserDisconnect || !m_pfn_LaserCheckPort || !m_pfn_LDrawLine || !m_pfn_LDrawRect || !m_pfn_LDrawOval || !m_pfn_LDrawRRect || !m_pfn_LDrawText || !m_pfn_LDrawBarcode || !m_pfn_LDrawImage || !m_pfn_LDrawBitmap ) { Free(); return FALSE; } return TRUE; } void CSMARTCommon::Free() { if( m_hDll == NULL ) return; if( m_hSmart != NULL ) DCLCloseDevice(); FreeLibrary( m_hDll ); m_hDll = NULL; } BOOL CSMARTCommon::IsLoaded() { return ( m_hDll != NULL ); } BOOL CSMARTCommon::IsOpened() { return ( m_hDll != NULL && m_hSmart != NULL ); } int CSMARTCommon::GetDeviceList(SMART70_PRINTER_LIST* pDevInfo) { if( m_pfn_GetDeviceList == NULL ) return SM_FAIL; return (m_nLastRes = m_pfn_GetDeviceList(pDevInfo)); } int CSMARTCommon::ExGetDeviceList(SMART70_PRINTER_LIST* pDevInfo, int opt) { if( m_pfn_ExGetDeviceList == NULL ) return SM_FAIL; return (m_nLastRes = m_pfn_ExGetDeviceList(pDevInfo, opt)); } int CSMARTCommon::GetDeviceInfo(SMART70_PRINTER_INFO* pDevInfo, WCHAR* szdev, int ndevtype) { if( m_pfn_GetDeviceInfo == NULL ) return SM_FAIL; return (m_nLastRes = m_pfn_GetDeviceInfo(pDevInfo, szdev, ndevtype)); } int CSMARTCommon::OpenDevice(WCHAR* szdev, int ndevtype) { if( m_hSmart != NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_OpenDevice(&m_hSmart, szdev, ndevtype)); } int CSMARTCommon::ExOpenDevice(WCHAR* szdev, int ndevtype) { if( m_hSmart != NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ExOpenDevice(&m_hSmart, szdev, ndevtype)); } int CSMARTCommon::CloseDevice() { if( m_hSmart == NULL ) return (m_nLastRes = -1); int ret = m_pfn_CloseDevice(m_hSmart); m_hSmart = NULL; return (m_nLastRes = ret); } int CSMARTCommon::GetRibbonInfo(BYTE mod, int* pnType, int* pnRemain, int* pnMax) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetRibbonInfo(m_hSmart, mod, pnType, pnRemain, pnMax)); } int CSMARTCommon::GetConnectedDevices(SMART70_DEVCONNLIST* pConnList) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetConnectedDevices(m_hSmart, pConnList)); } int CSMARTCommon::GetConnectedModules(SMART70_DEVCONNLIST* pConnList) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetConnectedModules(m_hSmart, pConnList)); } int CSMARTCommon::ICHContact(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICHContact(m_hSmart, mod)); } int CSMARTCommon::ICHDiscontact(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICHDiscontact(m_hSmart, mod)); } int CSMARTCommon::OpenDocument(LPCTSTR szCSDName) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_OpenDocument(m_hSmart, szCSDName)); } int CSMARTCommon::CloseDocument() { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CloseDocument(m_hSmart)); } int CSMARTCommon::ClearDocument(int page) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ClearDocument(m_hSmart, page)); } int CSMARTCommon::GetFieldCount(int* pnCount) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetFieldCount(m_hSmart, pnCount)); } int CSMARTCommon::GetFieldName(int idx, LPTSTR szName, DWORD dwBufLen) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetFieldName(m_hSmart, idx, szName, dwBufLen)); } int CSMARTCommon::GetFieldValue(LPCTSTR szName, LPTSTR szValue) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetFieldValue(m_hSmart, szName, szValue)); } int CSMARTCommon::SetFieldValue(LPCTSTR szName, LPCTSTR szValue) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetFieldValue(m_hSmart, szName, szValue)); } int CSMARTCommon::DrawImage(BYTE page, BYTE panel, int x, int y, int cx, int cy, WCHAR* szImgPath, RECT* prcArea) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawImage(m_hSmart, page, panel, x, y, cx, cy, szImgPath, prcArea)); } int CSMARTCommon::DrawBitmap(BYTE page, BYTE panel, int x, int y, int cx, int cy, HBITMAP hbmp, RECT* prcArea) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawBitmap(m_hSmart, page, panel, x, y, cx, cy, hbmp, prcArea)); } int CSMARTCommon::DrawText(BYTE page, BYTE panel, int x, int y, WCHAR* szFontName, int nFontSize, BYTE nFontStyle, WCHAR* szText, RECT* prcArea) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawText(m_hSmart, page, panel, x, y, szFontName, nFontSize, nFontStyle, szText, prcArea)); } int CSMARTCommon::DrawText2(BYTE page, BYTE panel, DT2INFO* pdt2info, WCHAR* szText) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawText2(m_hSmart, page, panel, pdt2info, szText)); } int CSMARTCommon::DrawRect(BYTE page, BYTE panel, int x, int y, int cx, int cy, COLORREF col, RECT* prcArea) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawRect(m_hSmart, page, panel, x, y, cx, cy, col, prcArea)); } int CSMARTCommon::DrawBarcode(BYTE page, BYTE panel, int x, int y, int cx, int cy, COLORREF col, RECT* prcArea, LPCTSTR szName, int nSize, LPCTSTR szData, LPCTSTR szPost) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DrawBarcode(m_hSmart, page, panel, x, y, cx, cy, col, prcArea, szName, nSize, szData, szPost)); } int CSMARTCommon::GetBarcodeTypeCount(int* pnCount) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetBarcodeTypeCount(m_hSmart, pnCount)); } int CSMARTCommon::GetBarcodeTypeName(int idx, LPTSTR szName, int nBufLen) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetBarcodeTypeName(m_hSmart, idx, szName, nBufLen)); } int CSMARTCommon::GetPreviewBitmap(BYTE page, BITMAPINFO** const ppbi) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetPreviewBitmap(m_hSmart, page, ppbi)); } int CSMARTCommon::GetUnitInfo(S70UNITINFO* pUnit, int dir) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetUnitInfo(m_hSmart, pUnit, dir)); } int CSMARTCommon::GetFieldLinkedUnitInfo(WCHAR* szField, S70UNITINFO* pUnit, int dir) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetFieldLinkedUnitInfo(m_hSmart, szField, pUnit, dir)); } int CSMARTCommon::SetUnitInfo(S70UNITINFO* pUnit) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetUnitInfo(m_hSmart, pUnit)); } int CSMARTCommon::GetUnitInfo2(UNITINFO2* pUnit, int dir) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetUnitInfo2(m_hSmart, pUnit, dir)); } int CSMARTCommon::GetFieldLinkedUnitInfo2(WCHAR* szField, UNITINFO2* pUnit, int dir) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetFieldLinkedUnitInfo2(m_hSmart, szField, pUnit, dir)); } int CSMARTCommon::SetUnitInfo2(UNITINFO2* pUnit) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetUnitInfo2(m_hSmart, pUnit)); } int CSMARTCommon::GetUnitInfo2Direct(UNITINFO2* pUnit) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetUnitInfo2Direct(m_hSmart, pUnit)); } int CSMARTCommon::GetICG(int page, int *pnICG ) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetICG( m_hSmart, page, pnICG )); } int CSMARTCommon::SetICG(int page, int nICG ) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetICG( m_hSmart, page, nICG )); } int CSMARTCommon::RFPowerOn(int nDev, int* pnCardType, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFPowerOn(m_hSmart, nDev, pnCardType, pdwOutLen, pOutBuf)); } int CSMARTCommon::RFPowerOff(int nDev) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFPowerOff(m_hSmart, nDev)); } int CSMARTCommon::RFTransmit(int nDev, DWORD dwInLen, BYTE* pInBuf, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFTransmit(m_hSmart, nDev, dwInLen, pInBuf, pdwOutLen, pOutBuf)); } int CSMARTCommon::RFPowerOn2(BYTE mod, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFPowerOn2(m_hSmart, mod, pdwOutLen, pOutBuf)); } int CSMARTCommon::RFPowerOff2(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFPowerOff2(m_hSmart, mod)); } int CSMARTCommon::RFTransmit2(BYTE mod, DWORD dwInLen, BYTE* pInBuf, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RFTransmit2(m_hSmart, mod, dwInLen, pInBuf, pdwOutLen, pOutBuf)); } int CSMARTCommon::ICPowerOn(int nDev, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICPowerOn(m_hSmart, nDev, pdwOutLen, pOutBuf)); } int CSMARTCommon::ICPowerOff(int nDev) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICPowerOff(m_hSmart, nDev)); } int CSMARTCommon::ICTransmit(int nDev, DWORD dwInLen, BYTE* pInBuf, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICTransmit(m_hSmart, nDev, dwInLen, pInBuf, pdwOutLen, pOutBuf)); } int CSMARTCommon::ICPowerOn2(BYTE mod, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICPowerOn2(m_hSmart, mod, pdwOutLen, pOutBuf)); } int CSMARTCommon::ICPowerOff2(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICPowerOff2(m_hSmart, mod)); } int CSMARTCommon::ICTransmit2(BYTE mod, DWORD dwInLen, BYTE* pInBuf, DWORD* pdwOutLen, BYTE* pOutBuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ICTransmit2(m_hSmart, mod, dwInLen, pInBuf, pdwOutLen, pOutBuf)); } int CSMARTCommon::DCLOpenDevice(WCHAR* szdev, int ndevtype, int nOrientation) { return (m_nLastRes = m_pfn_DCLOpenDevice( &m_hSmart, szdev, ndevtype, nOrientation )); } int CSMARTCommon::DCLOpenDevice3(WCHAR* szDev, int port, BOOL bSSL, int nOrientation) { return (m_nLastRes = m_pfn_DCLOpenDevice3( &m_hSmart, szDev, port, bSSL, nOrientation )); } int CSMARTCommon::DCLExOpenDevice(WCHAR* szdev, int ndevtype, int nOrientation) { return (m_nLastRes = m_pfn_DCLExOpenDevice( &m_hSmart, szdev, ndevtype, nOrientation )); } int CSMARTCommon::DCLCloseDevice() { if( m_hSmart == NULL ) return (m_nLastRes = -1); int nres = m_pfn_DCLCloseDevice( m_hSmart ); m_hSmart = NULL; return (m_nLastRes = nres); } int CSMARTCommon::DCLPrint(int nPrintSide) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DCLPrint( m_hSmart, nPrintSide )); } int CSMARTCommon::ReadUserMemory(WCHAR* szPW, int addr, BYTE* btdata) { if( m_hSmart == NULL ) return (m_nLastRes = -1); if( m_pfn_ReadUserMemory == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ReadUserMemory( m_hSmart, szPW, addr, btdata )); } int CSMARTCommon::WriteUserMemory(WCHAR* szPW, int addr, BYTE* btdata) { if( m_hSmart == NULL ) return (m_nLastRes = -1); if( m_pfn_WriteUserMemory == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_WriteUserMemory( m_hSmart, szPW, addr, btdata )); } #ifdef _WIN64 int CSMARTCommon::ExSetConfig(int nID, __int64 nValue) #else//_WIN64 int CSMARTCommon::ExSetConfig(int nID, int nValue) #endif//_WIN64 { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ExSetConfig( m_hSmart, nID, nValue )); } #ifdef _WIN64 int CSMARTCommon::ExGetConfig(int nID, __int64* pnValue) #else//_WIN64 int CSMARTCommon::ExGetConfig(int nID, int* pnValue) #endif//_WIN64 { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ExGetConfig( m_hSmart, nID, pnValue )); } int CSMARTCommon::GetStatus(BYTE mod, __int64* pstatus) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetStatus( m_hSmart, mod, pstatus)); } int CSMARTCommon::RequestPreemption(WORD * pwPrmt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RequestPreemption( m_hSmart, pwPrmt )); } int CSMARTCommon::ReleasePreemption(WORD wPrmt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ReleasePreemption( m_hSmart, wPrmt )); } int CSMARTCommon::GetModuleState(BYTE mod, BYTE * pstate) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetModuleState( m_hSmart, mod, pstate )); } int CSMARTCommon::UpdateModuleState(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_UpdateModuleState( m_hSmart, mod )); } int CSMARTCommon::IsModuleReady(BYTE mod, int *pnReady) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_IsModuleReady( m_hSmart, mod, pnReady )); } int CSMARTCommon::IsReadyInsertJob(int *pnReady) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_IsReadyInsertJob( m_hSmart, pnReady )); } int CSMARTCommon::ToggleManualMode() { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ToggleManualMode( m_hSmart )); } int CSMARTCommon::UpdateCurrPrintJob(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_UpdateCurrPrintJob( m_hSmart, mod )); } int CSMARTCommon::GetCurrPrintJob(BYTE mod, WORD* pjobid) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetCurrPrintJob( m_hSmart, mod, pjobid )); } int CSMARTCommon::DeleteCurrPrintJob(BYTE mod) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_DeleteCurrPrintJob( m_hSmart, mod )); } int CSMARTCommon::CardIn(BYTE module, int dir, int opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardIn( m_hSmart, module, dir, opt )); } int CSMARTCommon::CardOut(BYTE module, int dir, int opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardOut( m_hSmart, module, dir, opt )); } int CSMARTCommon::CardMove(BYTE fromModule, BYTE toModule, int opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardMove( m_hSmart, fromModule, toModule, opt )); } int CSMARTCommon::CardMove2(BYTE fromModule, BYTE fromOpt, BYTE toModule, BYTE toOpt, int cmdopt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardMove2( m_hSmart, fromModule, fromOpt, toModule, toOpt, cmdopt )); } int CSMARTCommon::CardListMove(CARDMOVELIST * plist) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardListMove( m_hSmart, plist )); } int CSMARTCommon::CardMoveQuick(BYTE mod, BYTE opt, int cmdopt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardMoveQuick( m_hSmart, mod, opt, cmdopt )); } int CSMARTCommon::CardPass(BYTE mod, BYTE opt, int cmdopt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardPass( m_hSmart, mod, opt, cmdopt )); } int CSMARTCommon::CardFlipPass(BYTE mod, BYTE opt, int cmdopt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardFlipPass( m_hSmart, mod, opt, cmdopt )); } int CSMARTCommon::CardFlip(BYTE modfrom, BYTE modflip, BYTE modto) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardFlip( m_hSmart, modfrom, modflip, modto )); } int CSMARTCommon::CardFlip2(BYTE modfrom, BYTE modflip, BYTE modto) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardFlip2( m_hSmart, modfrom, modflip, modto )); } int CSMARTCommon::CardFlipStay(BYTE modfrom, BYTE modflip) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardFlipStay( m_hSmart, modfrom, modflip )); } int CSMARTCommon::Flip(BYTE mod, int opt, int value) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_Flip( m_hSmart, mod, opt, value )); } int CSMARTCommon::CardMoveSensor(BYTE module, int opt1, int value, int opt2) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardMoveSensor( m_hSmart, module, opt1, value, opt2 )); } int CSMARTCommon::CardMovePosition(BYTE module, int pos) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardMovePosition( m_hSmart, module, pos )); } int CSMARTCommon::CardEject(BYTE module) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardEject( m_hSmart, module )); } int CSMARTCommon::CardEjectBin(BYTE mod, BYTE modbin) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardEjectBin( m_hSmart, mod, modbin )); } int CSMARTCommon::CardEject2(BYTE mod, int opt, BYTE modout, int optout) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_CardEject2( m_hSmart, mod, opt, modout, optout )); } int CSMARTCommon::SetEncConfig(BYTE module, int config, int value) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetEncConfig( m_hSmart, module, config, value )); } int CSMARTCommon::GetEncConfig2(BYTE module, int config, void* pbuf, int* pnbuflen) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetEncConfig2( m_hSmart, module, config, pbuf, pnbuflen)); } int CSMARTCommon::SetEncConfig2(BYTE module, int config, void* pbuf, int nbuflen) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetEncConfig2( m_hSmart, module, config, pbuf, nbuflen)); } int CSMARTCommon::SetEncBuffer(BYTE module, BYTE track, int nbuflen, WCHAR* szbuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetEncBuffer( m_hSmart, module, track, nbuflen, szbuf )); } int CSMARTCommon::WriteEncoder(BYTE module, BYTE track, BYTE opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_WriteEncoder( m_hSmart, module, track, opt )); } int CSMARTCommon::ReadEncoder(BYTE module, BYTE track, BYTE opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ReadEncoder( m_hSmart, module, track, opt )); } int CSMARTCommon::FetchEncoder(BYTE module, BYTE track) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_FetchEncoder( m_hSmart, module, track )); } int CSMARTCommon::GetEncBuffer(BYTE module, BYTE track, int * pnbufsize, WCHAR* szbuf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetEncBuffer( m_hSmart, module, track, pnbufsize, szbuf )); } int CSMARTCommon::RunEncoder(BYTE module, BYTE track, int run, void* pbuf, int* pbuflen) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_RunEncoder( m_hSmart, module, track, run, pbuf, pbuflen )); } int CSMARTCommon::GetPrinterSettings(BYTE module, SMART70_DEVMODE* pdm) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetPrinterSettings( m_hSmart, module, pdm )); } int CSMARTCommon::SetPrinterSettings(BYTE module, SMART70_DEVMODE* pdm) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetPrinterSettings( m_hSmart, module, pdm )); } int CSMARTCommon::PrintDocument(int opt, int * reserved) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_PrintDocument( m_hSmart, opt, reserved )); } int CSMARTCommon::SetJobCallback(S70CBPROC m_pfnCB) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_SetJobCallback( m_hSmart, m_pfnCB )); } int CSMARTCommon::PrintStart(BYTE mod, int opt, int cmdopt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_PrintStart( m_hSmart, mod, opt, cmdopt )); } int CSMARTCommon::GetJobInfo(JOBINFO* pjobinf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetJobInfo( m_hSmart, pjobinf )); } int CSMARTCommon::GetJobInfoEx(JOBINFO_EX * pjobinf) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_GetJobInfoEx( m_hSmart, pjobinf )); } int CSMARTCommon::NewJobDescriptor(HJOBD * phjd, SM70CB_ERROR m_pfncbErr) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_NewJobDescriptor( m_hSmart, phjd, m_pfncbErr )); } int CSMARTCommon::FreeJobDescriptor(HJOBD hjd) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_FreeJobDescriptor( m_hSmart, hjd )); } int CSMARTCommon::AddJobItem(HJOBD hjd, int ji_type, void * ji_param) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItem( m_hSmart, hjd, ji_type, ji_param )); } int CSMARTCommon::AddJobItemMove(HJOBD hjd, BYTE from_mid, BYTE from_opt, BYTE to_mid, BYTE to_opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemMove( m_hSmart, hjd, from_mid, from_opt, to_mid, to_opt )); } int CSMARTCommon::AddJobItemFlip(HJOBD hjd, BYTE from_mid, BYTE flip_mid, BYTE to_mid, BYTE opt) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemFlip( m_hSmart, hjd, from_mid, flip_mid, to_mid, opt )); } int CSMARTCommon::AddJobItemMagnetic(HJOBD hjd, BYTE mid, int coer, SM70CB_MAGNETIC m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemMagnetic( m_hSmart, hjd, mid, coer, m_pfncb )); } int CSMARTCommon::AddJobItemContact(HJOBD hjd, BYTE mid, SM70CB_CONTACT m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemContact( m_hSmart, hjd, mid, m_pfncb )); } int CSMARTCommon::AddJobItemContactless(HJOBD hjd, BYTE mid, SM70CB_CONTACTLESS m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemContactless( m_hSmart, hjd, mid, m_pfncb )); } int CSMARTCommon::AddJobItemScanImage(HJOBD hjd, BYTE mid, int dpi, int mode, int side, int opt, SM70CB_SCANIMAGE m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemScanImage( m_hSmart, hjd, mid, dpi, mode, side, opt, m_pfncb )); } int CSMARTCommon::AddJobItemScanBarcode(HJOBD hjd, BYTE mid, int dpi, int mode, int side, int opt, SM70CB_SCANBARCODE m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemScanBarcode( m_hSmart, hjd, mid, dpi, mode, side, opt, m_pfncb )); } int CSMARTCommon::AddJobItemPrint(HJOBD hjd, BYTE mid, int page, SM70CB_PRINT m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemPrint( m_hSmart, hjd, mid, page, m_pfncb )); } int CSMARTCommon::AddJobItemLaminate(HJOBD hjd, BYTE mid, int page, SM70CB_LAMINATE m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemLaminate( m_hSmart, hjd, mid, page, m_pfncb )); } int CSMARTCommon::AddJobItemUser(HJOBD hjd, BYTE mid, int opt, SM70CB_USER m_pfncb) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_AddJobItemUser( m_hSmart, hjd, mid, opt, m_pfncb )); } int CSMARTCommon::InsertJob(HJOBD hjd, int * pjobid) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_InsertJob( m_hSmart, hjd, pjobid )); } int CSMARTCommon::ExGetDevParam2(BYTE mod, WCHAR* pw, int slot, int* pvalue, int nParams) { if( m_hSmart == NULL) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ExGetDevParam2(m_hSmart, mod, pw, slot, pvalue, nParams)); } int CSMARTCommon::ExSetDevParam2(BYTE mod, WCHAR* pw, int slot, int* pvalue, int nParams) { if( m_hSmart == NULL) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_ExSetDevParam2(m_hSmart, mod, pw, slot, pvalue, nParams)); } int CSMARTCommon::MagWrite(BYTE mod, BOOL bT1, WCHAR* szT1, BOOL bT2, WCHAR* szT2, BOOL bT3, WCHAR* szT3, BOOL bJIS, WCHAR* szJIS) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_MagWrite( m_hSmart, mod, bT1, szT1, bT2, szT2, bT3, szT3, bJIS, szJIS )); } int CSMARTCommon::MagRead(BYTE mod, BOOL bT1, WCHAR* szT1, int nT1, BOOL bT2, WCHAR* szT2, int nT2, BOOL bT3, WCHAR* szT3, int nT3, BOOL bJIS, WCHAR* szJIS, int nJIS) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_MagRead( m_hSmart, mod, bT1, szT1, nT1, bT2, szT2, nT2, bT3, szT3, nT3, bJIS, szJIS, nJIS )); } int CSMARTCommon::LaserConnect() { return (m_nLastRes = m_pfn_LaserConnect()); } int CSMARTCommon::LaserDisconnect() { return (m_nLastRes = m_pfn_LaserDisconnect()); } int CSMARTCommon::LaserCheckPort() { return (m_nLastRes = m_pfn_LaserCheckPort()); } int CSMARTCommon::LDrawLine (LLINE *pline, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawLine( m_hSmart, pline, plaser, prc )); } int CSMARTCommon::LDrawRect (LRECT *prect, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawRect( m_hSmart, prect, plaser, prc )); } int CSMARTCommon::LDrawOval (LOVAL *poval, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawOval( m_hSmart, poval, plaser, prc )); } int CSMARTCommon::LDrawRRect (LRRECT *prrc, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawRRect( m_hSmart, prrc, plaser, prc )); } int CSMARTCommon::LDrawText (LTEXT *ptext, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawText( m_hSmart, ptext, plaser, prc )); } int CSMARTCommon::LDrawBarcode (LBAR *pbar, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawBarcode( m_hSmart, pbar, plaser, prc )); } int CSMARTCommon::LDrawImage (LIMG *pimg, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawImage( m_hSmart, pimg, plaser, prc )); } int CSMARTCommon::LDrawBitmap (LBMP *pbmp, S70Laser *plaser, RECT* prc) { if( m_hSmart == NULL ) return (m_nLastRes = -1); return (m_nLastRes = m_pfn_LDrawBitmap( m_hSmart, pbmp, plaser, prc )); }