参照Rockey4文档,mark一下。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
#include<windows.h> #include "Ry4S.h" #include <stdio.h> #pragma comment(lib,"Ry4S.lib") void main(int argc,char* argv[]) { if (argc < 3) { printf("please input p1 and p2 password\n"); return; } WORD retcode; WORD handle,p1,p2,p3,p4; DWORD lp1,lp2; BYTE buffer[1024]; //默认密码 //p1 = 0xc44c; //p2 = 0xc8f8; //将密码转换成16进制 p1 = strtol(argv[1],NULL,16); p2 = strtol(argv[2],NULL,16); p3 = 0; p4 = 0; //读取ukey retcode = Rockey(RY_FIND,&handle,&lp1,&lp2,&p1,&p2,&p3,&p4,buffer); if (retcode) { printf("Rockey not found!\n"); return; } printf("ukey id is %x\n",lp1); } |
转载请注明:exchen's blog » 读取Rockey4