10 mtecsdk_queryinfo, Mtecsdk_queryinfo, 2 - functions – MagTek EC2000 99875713 User Manual

Page 19

Advertising
background image

2 - Functions

ExpressCard 2000| Instant Issuance Card Personalization System | Programmer’s Reference (Windows SDK)

Page 19 of 21

char DocInfo [4096];
char device[4096] ="";
DWORD SettingsBufferSize;
DWORD DocInfoSize;
char cValue [1024];
DWORD valueSize;
DWORD dwStatus;

// Initialize Settings

DocInfoSize = 4096;

// Use function MTECSDK_GetDevice to get
// device name for variable “device”
// Call MTECSDK_ProcessDoc function to process a document.
dwStatus = MTECSDK_ProcessDoc (device, Settings, DocInfo,
&DocInfoSize);

if (dwStatus == MTEC_ST_OK)
{

// Check the return status from the device

valueSize = 1024;

dwStatus=MTECSDK_GetValue(DocInfo, "CommandStatus", "ReturnCode",

cValue, &valueSize);

if (dwStatus != EC_ST_OK)

// error retrieving key value

else

{

// do further process

}

}

2.10 MTECSDK_QueryInfo

This function sends a DeviceInformation request to the device specified by pcDevName, and
returns the contents of the section specified by pcSection.

ULONG MTECSDK_QueryInfo (

char *pcDevName,

char *pcSection,

char *pcSectionData,

DWORD *pdwLength

);


Parameters:
pcDevName - Pointer to null-terminated string containing device name.
pcSection - Pointer to null-terminated string containing the desired section to return from the
DeviceInformation request. Details about DeviceInformation requests can be found in
99875611 ExpressCard 2000 Programmer’s Reference (XML), available from MagTek.
pcSectionData - Pointer to the buffer that is used to store the contents of the requested section.

Advertising