Home > Blockchain >  How to get serial number in digital persona finger print sdk in c
How to get serial number in digital persona finger print sdk in c

Time:11-26

I downloaded and run a C project for Digital-persona-sdk https://github.com/iamonuwa/Digital-Persona-SDK/ finger print project.That have two projects in after install the sdk. That project only Capture and Verification function only written.Not written for get serial number. Does anyone have an sample program for solving this problem?

CodePudding user response:

Two minutes of reading the provided documentation tells you everything you need to know:

  1. Use DFPEnumerateDevices to get all device GUIDs
  2. Call DPFPGetDeviceInfo to get device info for each device in turn.
  3. Serial number is embedded in the device info as devInfo->HwInfo.szSerialNb.

CodePudding user response:

Get serial number answer is:-

wchar_t get_serial_number()
{
    DPFPInit();   
    DP_DEVICE_INFO pDevInfo;
    ULONG puDevCount;
    GUID *ppDevUID;
    
    DPFPEnumerateDevices(&puDevCount,&ppDevUID);
    
    GUID sample = *ppDevUID;
    DPFPGetDeviceInfo(sample, &pDevInfo);
    return pDevInfo.HwInfo.szSerialNb;
}
  • Related