IF buffer1=="." AND buffer4=="." AND buffer0=="." AND buffer3=="." AND ALLTRIM(buffer7)=="" AND ALLTRIM(buffer5)=="" AND ALLTRIM(buffer8)=="" AND ALLTRIM(buffer6)==""
block_index=2 && 指定字块 lsg
retcode = RY2_Read(handle, block_index, @buffer)
buffer9=substr(buffer,221,1)
buffer10=substr(buffer,213,8)
buffer100=substr(buffer,208,5)
IF buffer100== 'jxcbz' AND buffer9=="." AND ALLTRIM(buffer10)==""
IF try_ver
jxc_ver = 'jxcbz'
ELSE
bz_ver = .t.
ENDIF
*thisform.result.value="Read string variable from the dog successfully.The data is '" + "读取为,标准版(单机)!" + "' "
ELSE
block_index=2 && 指定字块 lsg
retcode = RY2_Read(handle, block_index, @buffer)
buffer9=substr(buffer,215,1)
buffer10=substr(buffer,208,7)
buffer100=substr(buffer,202,6)
IF buffer100== 'bz_net' AND buffer9=="." AND ALLTRIM(buffer10)==""
IF try_ver
jxc_ver = 'bz_net'
ELSE
bznet_ver = .t. && 标准网络版
ENDIF
*!* thisform.result.value="Read string variable from the dog successfully.The data is '" + "读取为,标准版(网络)!" + "' "
ELSE
MESSAGEBOX('加密狗版本不正确,请重试!',64,'提示')
CLEAR DLLS
ON SHUTDOWN
QUIT
ENDIF
ENDIF
ELSE
MESSAGEBOX('加密狗版本不正确,请重试!',64,'提示')
CLEAR DLLS
ON SHUTDOWN
QUIT
ENDIF
RY2_Close(handle)
******变量恢复初始
uid = 0
block_index = 0
buffer = ""
******变量恢复初始
dogJudgement = .t.
ELSE
dogJudgement = .f.
ENDIF
ENDIF
&&old ver
IF !dogJudgement
DECLARE INTEGER DogRead IN win32dll INTEGER DogBytes, INTEGER DogAddr, STRING @DataStr
* Read string variable from the dog
DogAddr = 0 && The address read
DogBytes = 6 && The number of bytes
DataStr = '123456'
ret = 0
Ret = DogRead(DogBytes,DogAddr,@DataStr)