8144_set_security_key – ADLINK PCI-8144 User Manual

Page 86

Advertising
background image

76

Function Library

_8144_set_security_key

Set the security password

Description:

This function is used to set a security code to the PCI card in
EEPROM. The security code will never dispear even if the sys-
tem is powered off.

Syntax:

I16 _8144_set_security_key(I16 CardId, U16

OldPassword, U16 NewPassword)

B_8144_set_security_key(ByVal CardId As Integer,

ByVal OldPassword As Integer, ByVal

NewPassword As Integer)As Integer

Parameters:

I16 CardId

: The card ID number.

U16 OldPassword

: The current password stored in card.

U16 NewPassword

: New password.

Return Values:

ERR_ParametersInvalid

ERR_DeviceNotInitial

ERR_GetEEPROM

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}

Advertising