... char SerialNo[18]=""; BOOL bRes = KernelIoControl(IOCTL_HAL_GET_DEVICEID, 0, 0, arrOutBuff, nBuffSize, &dwOutBytes); if (!bRes) { MessageBox( GetActiveWindow(),_T("could not retrieve serial number"),_T("Error"),0); hb_retc("0"); } for (unsigned int i = 0; i<dwOutBytes; i++) { sprintf(strNextChar,"%02X", ...