Windows registry contains the system configuration, machine hardware configuration, Win32 purposes,
Windows 7 Ultimate, and people of other configuration info. Registry according to the technique details is divided into 6 root keys (RootKey),
Windows 7 Serial, which every have a root important sub-key and important elements of your tree, every sub-key projects on behalf of a certain configuration. manage making use of C + + Builer registry important is to fully grasp the TRegistry course. In C + + Builder's VCL course library gives TRegistry course produced by the software instance of this class, we are able to obtain the control of the registry. In TRegistry class, the concentrate should be to master the subsequent inquiries: one. TRegistry created course declaration we can not make use of the direct strategy to generate TRegistry instance, which VC + + employing HKEY straight generate cases of several approaches. Need to be created TRegistry new instance in the course key phrase, and then pass a pointer to the track record in the variables. Distinct operation is as follows: TRegistry * curReg = new TRegistry; / / curReg identify can be a pointer of sort TRegistry declaration to adopt this method, curReg the RootKey attribute factors towards the HKEY_CURRENT_USER root key, the default motion is carried out for HKEY_CURRENT_USER. 2. How you can open and close the principal essential TRegistry course supplies two member operate to open a main crucial: OpenKey () and OpenKeyReadOnly () operate. Which, OpenKey function also gives the purpose to develop the main important. OpenKey () has two parameters, KeyName and canCreate. canCreate is a bool sort parameter, when it truly is set to true, should the current does not exist beneath the root essential variable of type AnsiString KeyName pointed out the primary crucial, you produce the main essential; or else mentioned within the primary key to the KeyName. If canCreate set to untrue, but under the existing root important KeyName that there isn't any primary essential,
Office Standard 2010 Key, the operate returns untrue. OpenKeyReadOnly () function, the purpose is to open a read-only main essential, in case the parameter value is NULL,
Windows 7 Discount, then the stage RootKey specified important. KeyName Parameters expressed in two techniques: absolute and relative route, stated path, mentioned. Expressed by the absolute path,
Office Standard 2010, the string value ought to be immediately after use in the registry shall promptly contact CloseKey () member operate Shut the registry, and call the delete strategy will use the new release in the software memory space. three. Erupted on the current important value for your primary important we are able to use GetKeyNames () member purpose to get the existing primary essential names of all sub-keys, with GetKeyInfo get much more detailed data. have to be mentioned that while GetKeyNames () instructions to the void __fastcall GetKeyNames (Courses:: TStrings * Strings), which is, its parameter sort TString, but we can not at the outset TString instance of the class, and then utilized it being a parameter GetKeyNames (). This was mainly because of TStrings class has an abstract composition. Our solution would be to use a derived course TStringList TStrings course declare an instance of the TStrings rather, and as a parameter for GetKeyNames () perform. in acquiring the identify on the subkey, we can use to additional establish the comprehensive information about purpose. For example, we are able to use GetValueNames () with Study () and Publish () to obtain the value with the main key for much more specifics. For instance: we need to study , accurate); AnsiString ValueInfo = CurReg-> ReadString (