Standalone SDK API Doc  V1.0.4
Functions
3.08.Data-Photo.h File Reference

Detailed Description

Author
http://www.zkteco.com
Date
2017-10-01
copyright:
Copyright 2017 ZKTECO CO., LTD. All Rights Reserved.
Note

Functions

VARIANT_BOOL UploadUserPhoto (LONG dwMachineNumber, BSTR FileName)
 
VARIANT_BOOL DownloadUserPhoto (LONG dwMachineNumber, BSTR FileName, BSTR FilePath)
 
VARIANT_BOOL DeleteUserPhoto (LONG dwMachineNumber, BSTR FileName)
 
VARIANT_BOOL GetAllUserPhoto (LONG dwMachineNumber, BSTR dlDir)
 
VARIANT_BOOL GetPhotoNamesByTime (LONG dwMachineNumber, LONG iFlag, BSTR sTime, BSTR eTime, BSTR *AllPhotoName)
 
VARIANT_BOOL GetPhotoByName (LONG dwMachineNumber, BSTR PhotoName, BYTE *PhotoData, LONG *PhotoLength)
 
VARIANT_BOOL GetPhotoCount (LONG dwMachineNumber, LONG *Count, LONG iFlag)
 
VARIANT_BOOL ClearPhotoByTime (LONG dwMachineNumber, LONG iFlag, BSTR sTime, BSTR eTime)
 

Function Documentation

◆ UploadUserPhoto()

VARIANT_BOOL UploadUserPhoto ( LONG  dwMachineNumber,
BSTR  FileName 
)

To upload a user picture to the machine.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
FileName BSTR [in] User picture name and the absolute path where the picture resides
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. The FileName parameter specifies the absolute path where the user picture to be uploaded resides, for example, C:\Users\HP\Desktop\11.jpg. The user picture is named in the format of User ID.jpg.
  1. This function can also be implemented by using the SendFile function.
  2. You can invoke this function to upload multiple user pictures by traversing through all file names under a specified directory.
Note
This interface is applicable to the new architecture firmware.

◆ DownloadUserPhoto()

VARIANT_BOOL DownloadUserPhoto ( LONG  dwMachineNumber,
BSTR  FileName,
BSTR  FilePath 
)

To download a user picture from the machine to the software.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
FileName BSTR [in] Name of the user picture, with the file name extension .jpg
FilePath BSTR [in] Absolute path where the downloaded user picture is to be saved
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. The FileName parameter specifies the name of the user picture to be downloaded. The name format is User ID.jpg, for example, 11.jag. The downloaded picture will be saved in JPG format to the specified path.
  1. The FilePath parameter specifies the absolute path where the downloaded picture is to be saved, for example, C:\Users\HP\Desktop\.
Note
This interface is applicable to the new architecture firmware.

◆ DeleteUserPhoto()

VARIANT_BOOL DeleteUserPhoto ( LONG  dwMachineNumber,
BSTR  FileName 
)

To delete a single user picture or all user pictures on the machine.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
FileName BSTR [in] Name of the user picture to be deleted
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. The FileName parameter is used to set to delete one or all user pictures. To delete a single user picture, specify the name of the picture, which is named in the format of User ID.jpg, for example, 11.jpg. To delete all user pictures at a time, set this parameter to ALL, which is case-sensitive.
  1. The FilePath parameter specifies the absolute path where the downloaded picture is to be saved, for example, C:\Users\HP\Desktop\.
Note
This interface is applicable to the new architecture firmware.

◆ GetAllUserPhoto()

VARIANT_BOOL GetAllUserPhoto ( LONG  dwMachineNumber,
BSTR  dlDir 
)

To download all user pictures from the machine to the software.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
dlDir BSTR [in] Absolute path where the downloaded user pictures are to be saved
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. The dlDir parameter specifies the absolute path where the downloaded pictures are to be saved, for example, C:\Users\HP\Desktop\.
  1. All user pictures downloaded from the machine will be automatically saved in JPG format to the specified path one by one.
Note
This interface is applicable to the new architecture firmware.

◆ GetPhotoNamesByTime()

VARIANT_BOOL GetPhotoNamesByTime ( LONG  dwMachineNumber,
LONG  iFlag,
BSTR  sTime,
BSTR  eTime,
BSTR *  AllPhotoName 
)

To download attendance pictures from the machine.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
iFlag LONG [in] Flag bit
sTime BSTR [in] Start time
eTime BSTR [in] End time
AllPhotoName BSTR* [out] Names of attendance pictures
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. If the value of iFlag is 0, all attendance pictures on the machine will be downloaded. If the value is 1, attendance pictures between sTime and eTime will be downloaded.
  1. sTime: specifies the start time, in the format of YYYY-MM-DD hh:mm:ss.
  2. eTime: specifies the end time, in the format of YYYY-MM-DD hh:mm:ss.
  3. AllPhotoName: specifies the names of attendance pictures, in the format of verification success pictures (separated with \t)+\n+verification failure pictures (separated with \t).
Note
Applicable to TFT

◆ GetPhotoByName()

VARIANT_BOOL GetPhotoByName ( LONG  dwMachineNumber,
BSTR  PhotoName,
BYTE *  PhotoData,
LONG *  PhotoLength 
)

To download an attendance picture from the machine based on the picture name.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
PhotoName BSTR [in] Picture name
PhotoData BYTE* [out] Picture data in binary format
PhotoLength LONG* [out] Picture size
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
Note
Applicable to TFT

◆ GetPhotoCount()

VARIANT_BOOL GetPhotoCount ( LONG  dwMachineNumber,
LONG *  Count,
LONG  iFlag 
)

To query the number of attendance pictures on the machine.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
Count LONG* [in] Picture quantity
iFlag LONG [in] Flag bit
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
If the value of iFlag is 0, the total number of attendance pictures is returned. If the value is 1, the number of pictures that pass verification is returned. If the value is 2, the number of pictures that fail verification is returned.
Note
Applicable to TFT

◆ ClearPhotoByTime()

VARIANT_BOOL ClearPhotoByTime ( LONG  dwMachineNumber,
LONG  iFlag,
BSTR  sTime,
BSTR  eTime 
)

To clear attendance pictures on the machine according to specified conditions.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
iFlag LONG [in] Flag bit
sTime BSTR [in] Start time
eTime BSTR [in] End time
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. If the value of iFlag is 0, all attendance pictures on the machine will be downloaded. If the value is 1, attendance pictures between sTime and eTime will be downloaded.
  1. sTime: specifies the start time, in the format of YYYY-MM-DD hh:mm:ss.
  2. eTime: specifies the end time, in the format of YYYY-MM-DD hh:mm:ss.
Note
Applicable to TFT