Standalone SDK API Doc  V1.0.4
Functions
3.10.Data-ValidDate.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 SetUserValidDate (LONG dwMachineNumber, BSTR UserID, LONG Expires, LONG ValidCount, BSTR StartDate, BSTR EndDate)
 
VARIANT_BOOL GetUserValidDate (LONG dwMachineNumber, BSTR UserID, LONG *Expires, LONG *ValidCount, BSTR *StartDate, BSTR *EndDate)
 

Function Documentation

◆ SetUserValidDate()

VARIANT_BOOL SetUserValidDate ( LONG  dwMachineNumber,
BSTR  UserID,
LONG  Expires,
LONG  ValidCount,
BSTR  StartDate,
BSTR  EndDate 
)

To set the validity period of a user account.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
UserID BSTR [in] User ID
Expires LONG [in] Validity period type
ValidCount LONG [in] Number of valid usage times
StartDate BSTR [in] Start time of the validity period, in the format of YYYY-MM-DD hh:mm:ss
EndDate BSTR [in] End time of the validity period, in the format of YYYY-MM-DD hh:mm:ss
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. UserID: specifies the ID. The user ID is a string of English letters.
  1. Expires: specifies the validity period type. The value ranges from 0 to 3. The value 0 indicates not limiting the the validity period of the user account, 1 indicates limiting the validity period by setting the start time and end time, 2 indicates limiting the validity period by setting the number of usage times, and 3 indicates limiting the validity period by setting the start time, end time, and number of usage times.
  2. ValidCount: specifies the number of usage times of the user account. The value is larger than or equal to 0.
  3. StartDate: specifies the start time of the validity period. Only the YYYY-MM-DD part is kept because time is accurate only to date on the firmware.
  4. EndDate: specifies the end time of the validity period. Only the YYYY-MM-DD part is kept because time is accurate only to date on the firmware.
Note
This interface is applicable to the new architecture firmware.

◆ GetUserValidDate()

VARIANT_BOOL GetUserValidDate ( LONG  dwMachineNumber,
BSTR  UserID,
LONG *  Expires,
LONG *  ValidCount,
BSTR *  StartDate,
BSTR *  EndDate 
)

To query the validity period of a user account.

Parameters
Parameter description:
name type param direction description of param
dwMachineNumber LONG [in] Machine ID
UserID BSTR [in] User ID
Expires LONG* [out] Validity period type
ValidCount LONG* [out] Number of valid usage times
StartDate BSTR* [out] Start time of the validity period, in the format of YYYY-MM-DD hh:mm:ss
EndDate BSTR* [out] End time of the validity period, in the format of YYYY-MM-DD hh:mm:ss
Returns
Value description:
name type description of value
True BOOL Function execution success
False BOOL Function execution failure
See also
Attention
1. UserID: specifies the ID. The user ID is a string of English letters.
  1. Expires: specifies the validity period type. The value ranges from 0 to 3. The value 0 indicates not limiting the the validity period of the user account, 1 indicates limiting the validity period by setting the start time and end time, 2 indicates limiting the validity period by setting the number of usage times, and 3 indicates limiting the validity period by setting the start time, end time, and number of usage times.
  2. ValidCount: specifies the number of usage times of the user account. The value is larger than or equal to 0.
  3. StartDate: specifies the start time of the validity period. Only the YYYY-MM-DD part is kept because time is accurate only to date on the firmware.
  4. EndDate: specifies the end time of the validity period. Only the YYYY-MM-DD part is kept because time is accurate only to date on the firmware.
Note
This interface is applicable to the new architecture firmware.