MessageBox ("First call to RegDBSetDefaultRoot failed.", SEVERE);
else
MessageBox ("Root key successfully set to HKEY_LOCAL_MACHINE.",INFORMATION);
endif;
szKey="SOFTWARE\\DCH\\DS";
if RegDBKeyExist(szKey) < 0 then
RegDBCreateKeyEx(szKey,"");
endif;
RegDBSetKeyValueEx(szKey,"InstallPath",REGDB_STRING,TARGETDIR,-1);
if RegDBKeyExist(szKey) < 0 then
//this key not exsit ,pls create
RegDBCreateKeyEx(szKey,"");
endif;
//在使用RegDBSetKeyValueEx赋Key值
RegDBSetKeyValueEx(szKey,szNumName,nType,szNumValue,nSize);
if RegDBKeyExist(szKey) < 0 then
//this key not exsit ,pls create
RegDBCreateKeyEx(szKey,"");
endif;
//在使用RegDBSetKeyValueEx赋Key值
RegDBSetKeyValueEx(szKey,szNumName,nType,szNumValue,nSize);