twain_user增加获取打开的设备名的接口
This commit is contained in:
parent
88555e51eb
commit
f8939f1198
|
@ -12,6 +12,7 @@ HGTwain_OpenSelectedDS
|
||||||
HGTwain_OpenSelectedDSEx
|
HGTwain_OpenSelectedDSEx
|
||||||
HGTwain_CloseDS
|
HGTwain_CloseDS
|
||||||
HGTwain_GetDSName
|
HGTwain_GetDSName
|
||||||
|
HGTwain_GetDSDeviceName
|
||||||
HGTwain_GetDSDeviceCustomInfo
|
HGTwain_GetDSDeviceCustomInfo
|
||||||
HGTwain_EnableDSUIOnly
|
HGTwain_EnableDSUIOnly
|
||||||
HGTwain_EnableDS
|
HGTwain_EnableDS
|
||||||
|
|
|
@ -158,6 +158,17 @@ HGResult HGAPI HGTwain_GetDSName(HGTwainDS ds, HGChar* name, HGUInt maxLen)
|
||||||
return twainDSImpl->GetName(name, maxLen);
|
return twainDSImpl->GetName(name, maxLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HGResult HGAPI HGTwain_GetDSDeviceName(HGTwainDS ds, HGChar* name, HGUInt maxLen)
|
||||||
|
{
|
||||||
|
if (NULL == ds)
|
||||||
|
{
|
||||||
|
return HGBASE_ERR_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
HGTwainDSImpl* twainDSImpl = (HGTwainDSImpl*)ds;
|
||||||
|
return twainDSImpl->GetDeviceName(name, maxLen);
|
||||||
|
}
|
||||||
|
|
||||||
HGResult HGAPI HGTwain_GetDSDeviceCustomInfo(HGTwainDS ds, HGTwainDeviceCustomInfo *info)
|
HGResult HGAPI HGTwain_GetDSDeviceCustomInfo(HGTwainDS ds, HGTwainDeviceCustomInfo *info)
|
||||||
{
|
{
|
||||||
if (NULL == ds)
|
if (NULL == ds)
|
||||||
|
|
|
@ -51,6 +51,8 @@ HGEXPORT HGResult HGAPI HGTwain_CloseDS(HGTwainDS ds);
|
||||||
|
|
||||||
HGEXPORT HGResult HGAPI HGTwain_GetDSName(HGTwainDS ds, HGChar* name, HGUInt maxLen);
|
HGEXPORT HGResult HGAPI HGTwain_GetDSName(HGTwainDS ds, HGChar* name, HGUInt maxLen);
|
||||||
|
|
||||||
|
HGEXPORT HGResult HGAPI HGTwain_GetDSDeviceName(HGTwainDS ds, HGChar* name, HGUInt maxLen);
|
||||||
|
|
||||||
HGEXPORT HGResult HGAPI HGTwain_GetDSDeviceCustomInfo(HGTwainDS ds, HGTwainDeviceCustomInfo *info);
|
HGEXPORT HGResult HGAPI HGTwain_GetDSDeviceCustomInfo(HGTwainDS ds, HGTwainDeviceCustomInfo *info);
|
||||||
|
|
||||||
HGEXPORT HGResult HGAPI HGTwain_EnableDSUIOnly(HGTwainDS ds, HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam);
|
HGEXPORT HGResult HGAPI HGTwain_EnableDSUIOnly(HGTwainDS ds, HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam);
|
||||||
|
|
|
@ -398,6 +398,16 @@ HGResult HGTwainDSImpl::GetName(HGChar* name, HGUInt maxLen)
|
||||||
return HGBASE_ERR_OK;
|
return HGBASE_ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HGResult HGTwainDSImpl::GetDeviceName(HGChar* name, HGUInt maxLen)
|
||||||
|
{
|
||||||
|
if (NULL == name || 0 == maxLen)
|
||||||
|
{
|
||||||
|
return HGBASE_ERR_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
return HGBASE_ERR_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
HGResult HGTwainDSImpl::GetDeviceCustomInfo(HGTwainDeviceCustomInfo *info)
|
HGResult HGTwainDSImpl::GetDeviceCustomInfo(HGTwainDeviceCustomInfo *info)
|
||||||
{
|
{
|
||||||
if (NULL == info)
|
if (NULL == info)
|
||||||
|
|
|
@ -49,6 +49,7 @@ public:
|
||||||
HGResult Open(TW_IDENTITY* iden);
|
HGResult Open(TW_IDENTITY* iden);
|
||||||
HGResult Close();
|
HGResult Close();
|
||||||
HGResult GetName(HGChar* name, HGUInt maxLen);
|
HGResult GetName(HGChar* name, HGUInt maxLen);
|
||||||
|
HGResult GetDeviceName(HGChar* name, HGUInt maxLen);
|
||||||
HGResult GetDeviceCustomInfo(HGTwainDeviceCustomInfo *info);
|
HGResult GetDeviceCustomInfo(HGTwainDeviceCustomInfo *info);
|
||||||
HGResult EnableUIOnly(HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam);
|
HGResult EnableUIOnly(HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam);
|
||||||
HGResult Enable(HGBool showUI, HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam,
|
HGResult Enable(HGBool showUI, HWND parent, HGDSCloseReqFunc eventFunc, HGPointer eventParam,
|
||||||
|
|
Loading…
Reference in New Issue