int stdcall YW_G2_SetProtected
(
int ReaderID,
int EPCLen,
unsigned char *EPC,
unsigned char Protect,
unsigned char ProtectMode,
unsigned int Password
);
|
參數(shù) |
類型 |
含義 |
|
ReaderID |
int |
老的設(shè)備標(biāo)示ID,范圍0x00-0xFF,0xFF為廣播地址 |
|
EPCLen |
int |
要操作的EPC標(biāo)簽EPC長(zhǎng)度,字節(jié)數(shù),必須為偶數(shù) |
|
EPC |
unsigned char * |
要操作的EPC |
|
Protect |
unsigned char |
0x00時(shí),控制銷毀密碼讀寫保護(hù)設(shè)定。 0x01時(shí),控制訪問(wèn)密碼讀寫保護(hù)設(shè)定。 0x02時(shí),控制EPC存儲(chǔ)區(qū)讀寫保護(hù)設(shè)定。 0x03時(shí),控制TID存儲(chǔ)區(qū)讀寫保護(hù)設(shè)定。 0x04時(shí),控制用戶存儲(chǔ)區(qū)讀寫保護(hù)設(shè)定。
|
|
ProtectMode |
unsigned char |
當(dāng)Protect為0x00或0x01,即當(dāng)設(shè)置Kill密碼區(qū)或訪問(wèn)密碼區(qū)的時(shí)候,ProtectMode的值代表的意義如下: 0x00:設(shè)置為無(wú)保護(hù)下的可讀可寫 0x01:設(shè)置為永遠(yuǎn)可讀可寫 0x02:設(shè)置為帶密碼可讀可寫 0x03:設(shè)置為永遠(yuǎn)不可讀不可寫
當(dāng)Protect為0x02、0x03、0x04的時(shí)候,即當(dāng)設(shè)置EPC區(qū)、TID區(qū)及用戶區(qū)的時(shí)候,ProtectMode的值代表的意義如下: 0x00:設(shè)置為無(wú)保護(hù)下的可寫 0x01:設(shè)置為永遠(yuǎn)可寫 0x02:設(shè)置為帶密碼可寫 0x03:設(shè)置為永遠(yuǎn)不可寫
|
|
Password |
unsigned int |
標(biāo)簽操作的密碼,默認(rèn)為0 |
返 回 值:大于0為成功,小于0為錯(cuò)誤
int stdcall YW_G2_ SetProtected (int ReaderID, int EPCLen, unsigned char *EPC,unsigned char Protect, unsigned char ProtectMode, unsigned int Password);
function YW_G2_SetProtected(ReaderID: Integer; EPCLen: Integer; EPC: PChar;
Protect: Byte; ProtectMode: Byte;
Password: Integer): Integer;stdcall;external YW602DLL;
Public Declare Function YW_G2_SetProtected Lib "YW602.dll" (ByVal ReaderID As Long, ByVal EPCLen As Integer, EPC As Byte, _
ByVal Protect As Byte, ByVal ProtectMode As Byte, _
ByVal Password As Long) As Long
