编译时报错信息如下:
e:\program\vc\s_lock\s_lock.cpp(85) : error C2664: 'S4VerifyPin' : cannot convert parameter 2 from 'char [9]' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
对应的代码为:
unsigned long ret = 0;
ret = S4VerifyPin(&ctx,"12345678",8,S4_USER_PIN);该函数在C环境下可成功编译,但是在C++环境下出现该错误。
S4VerifyPin函数声明如下:
DWORD WINAPI S4VerifyPin(
IN SENSE4_CONTEXT *pS4Ctx,
IN BYTE *pbPin,
IN DWORD dwPinLen,
IN DWORD dw
请教如何解决
e:\program\vc\s_lock\s_lock.cpp(85) : error C2664: 'S4VerifyPin' : cannot convert parameter 2 from 'char [9]' to 'unsigned char *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
对应的代码为:
unsigned long ret = 0;
ret = S4VerifyPin(&ctx,"12345678",8,S4_USER_PIN);该函数在C环境下可成功编译,但是在C++环境下出现该错误。
S4VerifyPin函数声明如下:
DWORD WINAPI S4VerifyPin(
IN SENSE4_CONTEXT *pS4Ctx,
IN BYTE *pbPin,
IN DWORD dwPinLen,
IN DWORD dw
请教如何解决
ret = S4VerifyPin(&ctx,(unsigned char *)"12345678",8,S4_USER_PIN);