L
lark1
Unregistered / Unconfirmed
GUEST, unregistred user!
出错为“Project Project1.exe raised exception class ERegistryException with message 'Failed to set data for 'DisableCount''. Process stopped. Use Step or Run to continue.”
#include <Registry.hpp>
void ChangeRegistryValue()
{
TRegistry *Registry = new TRegistry(KEY_ALL_ACCESS);
try
{ Registry->RootKey = HKEY_LOCAL_MACHINE;
Registry->OpenKey("//SYSTEM//CurrentControlSet//Enum//PCI//VEN_10EC&DEV_8139&SUBSYS_813910EC&REV_10//3&61aaa01&0&50//Control",true);
Registry->WriteInteger("DisableCount",0);
Registry->CloseKey();
}
__finally
{
delete Registry;
}
return ;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
ChangeRegistryValue();
}
#include <Registry.hpp>
void ChangeRegistryValue()
{
TRegistry *Registry = new TRegistry(KEY_ALL_ACCESS);
try
{ Registry->RootKey = HKEY_LOCAL_MACHINE;
Registry->OpenKey("//SYSTEM//CurrentControlSet//Enum//PCI//VEN_10EC&DEV_8139&SUBSYS_813910EC&REV_10//3&61aaa01&0&50//Control",true);
Registry->WriteInteger("DisableCount",0);
Registry->CloseKey();
}
__finally
{
delete Registry;
}
return ;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
ChangeRegistryValue();
}