注: rtn = RegDBGetKeyValueEx(szKey, szNumName, nvType, svNumValue, nvSize); 调用失败
如果这个函数的几个参数没有初始化的值,调用就会导致失败
function RegeditReadLicense()
STRING szKey, szNumName, szNumValue, svNumValue;
NUMBER nvType, nvSize;
NUMBER rtn;
begin
szKey = "Software\simpleTrbo";
rtn = RegDBSetDefaultRoot (HKEY_CURRENT_USER);
szNumName = "authority";
nvType = REGDB_STRING;
svNumValue = "";
nvSize = -1;
rtn = RegDBGetKeyValueEx(szKey, szNumName, nvType, svNumValue, nvSize);
if( rtn < 0 ) then
return FALSE;
endif;
if( nvType != REGDB_STRING) then
return FALSE;
endif;
if( nvSize <= 0 ) then
return FALSE;
endif;
g_RegeditContentsString = svNumValue;
return TRUE;
end;