Featured post
Getting a HASP key with C/C++ (Problem) -
i seem in need of (and some, mean lot).
im trying make c program (or c++ if work, language not important) connect hasp usb. hasp usb drive has unique codes. purpose of hasp "secure" program, runs while hasp connected computer.
first of all, let me trying work, not hacking one. using demo key development, now, although have master key.
this hasp program features toolbox, should generate code in c ready copy paste , work. but, doesent work, or @ least, not copy paste.
(for more information hasp, go http://www2.safenet-inc.com/google/srm/dk-hasp.asp?cid=goointl-ind&hbx_pk=hasp&hbx_ou=50&cmp=knc-googleadd&wcw=google&_kk=hasp&_kt=e9b07d11-6db3-4153-a46b-5dc95204b6a3&gclid=cjfxibrp-qucfrqv3wodbnwfpa )
unfortunately, not have kind of c or c++ coding experience, having several problems trying work out. programmed other part in director (similar flash).
the code gives me making login (read, connection) hasp following:
const hasp_feature_t feature = hasp_default_fid; hasp_handle_t handle = hasp_invalid_handle_value; hasp_status_t status; //this code needed login, demo code now, matches //the hasp i'm using unsigned char vendor_code[] = "aziceaqfa1hx5ws+m8cgnyh5ceevunozizjbbxfd6dgf3tbkb9cvuf/tkd/iku2fsg9waysykw7rmasv" "vip4kcxle/v1raxrlvnnbj2h2dmrbumozbqufxe698qmjsqnplxra367xpz54i8kc5dtxwdhfxwtozrb" "rh5srkhcovlumztiqjgwh37azmsd1blofugi0xjal9zjwo3fraeb0ns2klmokavt5y04zzec06wau2r6" "au2dc4uipjqjmobqkm+tfnkas0rzr5iudric7puwnmtahre5fgsi8m7yvypvm+13wm4gwd4vnyizvsxf" "8imn3zog9wezfymilh2+rkpuvhi+igsqla0wd9m7zur9vfotj1uyv0ozg7hx0+hun2e/idgldjbiapj1" "e2fkhrmmgfaivi6xzzjiqjf9girz7+0jnflksyzx/k3jayfripobfwm+y+zage1swcz1ynubhicyrhbh" "ajdkizl8mywrefb2yf+r3k9wfg1on48gslyfrfekub/qgnp+betruwuk0awre9xvmuurbjpxa4ya67sk" "unfegfggufhbehjtivvul0u4dki1ukat973p+nxy2o0u239if/krpnuvhmg8kpk7s8i6arp7l/705/bl" "cx4kn5hhhsxiqkig9thdenv8vyo5+72hgacx3/uvovlmtvxboivo120utjbulvtvt8ktsolb3dxwurwl" "zaemoaqafk6q9bniphxfkrqer4kr7iytmzsow5mxh3h9o8ge5bqveymew36q9wnoyfxolnw6yqmf8f9s" "jn4khzty02xm707s7vefjj1knq7b5pp/3rje0iktb2ge6vaprvrlzeohu0m7q1aup8wavsiqjzy7flat" "tleapxyvlvz6pejdj4tegczugj7c8bioeqlxmloz6egvnjq7/ttys7vfitb3mazzfiyqukf4j6+b/a/y"; status = hasp_login(feature, vendor_code, &handle); /* check if operation successful */ if (status != hasp_status_ok) { switch (status) { case hasp_feature_not_found: break; case hasp_hasp_not_found: break; case hasp_old_driver: break; case hasp_no_driver: break; case hasp_inv_vcode: break; case hasp_feature_type_not_impl: break; case hasp_tmof: break; case hasp_ts_detected: break; default: break; } }
and error:
hasp_demo.cpp|44|error: expected constructor, destructor, or type conversion before '=' token| hasp_demo.cpp|47|error: expected unqualified-id before 'if'| ||=== build finished: 2 errors, 0 warnings ===|
i know specific request, i'm lost , don't know on. tried playing around code, gets me errors.
also, im on windows, using gnu gcc compiler in codeblocks ide.
the code pasted seems example how use api, not working program itself. not seem intended compile.
so guess need learn c/c++, or find @ job can help.
- Get link
- X
- Other Apps
Comments
Post a Comment