People, hello! I work on c++ bulder
c registry.
That was the floor of the Internet, but something guessed there.
That's the thing, make up a program on Bulder
( Bulder
way, a good language, there is nothing superfluous). So, somehow I got annoyed to manually add my specific parameters after installing fresh windows
, and finally decided to compile a program that does everything for me according to the algorithm I compiled, well, there’s a catch, I understood how to add the DWORD
parameter by small experiments, but I have DWORD
it turns out with either a value of one or zero with setting a parameter or NULL
- zero false
- zero and true
- 1. So, I want to understand how to make a parameter in hexadecimal representation of a type ( 0xFF
) using a boolean value. But the source code with practices
void __fastcall TForm1::Button1Click(TObject *Sender) { TRegistry *reg=new TRegistry; reg->RootKey=HKEY_CURRENT_USER; reg->OpenKey("\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer",true); reg->WriteBool("NoDriveTypeAutoRun", "0xFF"); // Здесь хлчу добавить параметр 0xFF, а он не идёт, в реестре нуль reg->CloseKey(); Application->MessageBox("Параметр добавлен", "Registry", MB_OK | MB_ICONINFORMATION); delete reg; }
I will add a question reg->WriteInteger("NoDriveTypeAutoRun",255 );
So, you need to add what I wrote above, and when you write a numerical value, it is in the FF registry that 255, that the thread is different, you write out very clumsy data. What to do ?
WriteBool
, look at this and note that theWriteBool
and otherWrite*
functions have three parameters, not two. - KoVadim