extern char* pszValue ;
//strtol只能返回带符号的整数,如果pszValue是个无符号数,且值 > 0x7FFFFFFF,返回值为0x7FFFFFF ,即-1;
int nValue = strtol(pszValue ,NULL,16);
//可以通过如下的方式解决这个问题。
int nValue = strtoul(pszValue ,NULL,16);
参考:https://blog.csdn.net/xidwong/article/details/3981000
https://baike.baidu.com/item/strtol/6134558?fr=aladdin
https://blog.csdn.net/tajon1226/article/details/47128255?utm_source=blogxgwz0