File operation
TFileStream
The READ and WRITE methods are called as follows:
Write (VAR Buffer; Count: Integer), where buffer refers to a real address in memory, and the read method puts the contents of the file to this location.
The WRITE method writes the content from this location. So:
If it is an action Ansistring type variable, then: write (xString [1], ....); passes the memory location of the first character in the string to the method.
If it is a PCHAR type variable, then: Write (XCHAR ^, .....); passes the memory position pointing to the pointer to the method.
Registry operation
basic concepts
CurrentKey and CurrentPath
CURRENTPATH is a path of string expressions, which is the form of the currently open registry key relative to the root key, similar to "... \ ... \ ... \ ...", the first one The catalog \ is omitted.
The currentkey of the registry class in Delphi is the HKEY type in the API. It is a handle that points to the currently opened registry key.
Tregistry and TreginiFile
TreginiFile is a subclass of Tregistry, which is packaged and handled the exception thrown by Tregistry, and does not really follow-write the data type in the registry, so if you want to read, if you want to read, if you want to read, if you want to read, if you want to read? TreginiFile is written, it is best not to read it with TreginiFile.
If you want to use the convenience of TregIfile, there must be the functionality of Tregistry, as follows:
Xreg: = TreginiFile.create (....);
Tregistry (XREG) .writeinteger ......