8144_reset_security_key – ADLINK PCI-8144 User Manual

Page 90

Advertising
background image

80

Function Library

_8144_reset_security_key

Reset the security password to default value

Description:

By this function, Users can reset the security code which is
stored on the PCI card to default value. The default security
code is0.

Syntax:

I16 _8144_reset_security_key(I16 CardId)

B_8144_reset_security_key(ByVal CardId As

Integer) As Integer

Parameters:

I16 CardId

: The card ID number

Return Values:

ERR_ParametersInvalid

ERR_DeviceNotInitial

ERR_SetEEPROM

ERR_NoError

Example:

I16 ret; //return code

I16 CardId = 0; // card ID

U16 OldPassword = 0; // current password stored

in card

U16 NewPassword = 0x1234; //new password

If(_8144_reset_security_key(CardId)) //reset the

password to default value (0)

{// return error}

if(_8144_set_security_key( CardId, OldPassword,

NewPassword)) //set a new password

{//return error}

ret = _8144_check_security_key(CardId,

NewPassword); //verify the new password

if( ret == ERR_NoError )

// security pass

else

// security failed

Advertising