Ref: "Ap1400ProgGuide1_2.docx"
Page 27 of 42
Document Revision: “1.2”
Document Date: “9 Apr. 2013”
GetDllVersion
Get the USBPrintDll full version information
Prototype
SUSBPrintVersion
WINAPI GetDllVersion(void);
Description
This function returns the full version information of the USBPrintDll. This function
has no activity on the USB bus and is provided for tracing purposes. An application
should check this version number before accessing the USB bus to ensure correct
alignment between builds.
Arguments
None
Returns
Returns a populated SUSBPrintVersion structure describing the major & minor
version numbers and the build number. If an error occurs then the system error
code is set. Use GetLastError() to retrieve this.
The SUSBPrintVersion structure is defined as;
//
//SUSBPrintVersion
typedef
struct
SUSBPrintVersion
{
UINT
m_uiMajor1;
UINT
m_uiMajor2;
UINT
m_uiMin1;
UINT
m_uiMin2;
UINT
m_uiBuild;
}
SUSBPrintVersion;
//
//Define pointers to this type
typedef
SUSBPrintVersion
*PSUSBPrintVersion;
typedef
PSUSBPrintVersion *LPSUSBPrintVersion;
Example
SUSBPrintVersion
sVersion;
CString
csDllVersion;
sVersion=GetDllVersion();
csDllVersion.Format(_T(
"Version [V%d.%d.%d.%d Build %03d.]."
),
sVersion.m_uiMajor1,
sVersion.m_uiMajor2,
sVersion.m_uiMin1,
sVersion.m_uiMin2,
sVersion.m_uiBuild);
TRACE(_T(“USBPrintDll-%s”),csDllVersion);