home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Registry.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: Registry.pas
- //----------------------------------------------------------------------------
- #ifndef RegistryHPP
- #define RegistryHPP
- //----------------------------------------------------------------------------
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Registry
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) ERegistryException;
- class __declspec(pascalimplementation) ERegistryException : public Sysutils::Exception
- {
- typedef ERegistryException ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall ERegistryException(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* !! Exception.CreateFmt */ __fastcall ERegistryException(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall ERegistryException(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall ERegistryException(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall ERegistryException(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall ERegistryException(const System::AnsiString Msg, const
- TVarRec *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(
- Msg, Args, Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall ERegistryException(System::Integer Ident, System::Integer
- AHelpContext) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall ERegistryException(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident,
- Args, Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~ERegistryException(void) { }
-
- };
-
- struct TRegKeyInfo
- {
- System::Integer NumSubKeys;
- System::Integer MaxSubKeyLen;
- System::Integer NumValues;
- System::Integer MaxValueLen;
- System::Integer MaxDataLen;
- Windows::TFileTime FileTime;
- } ;
-
- enum TRegDataType { rdUnknown, rdString, rdExpandString, rdInteger, rdBinary };
-
- struct TRegDataInfo
- {
- TRegDataType RegData;
- System::Integer DataSize;
- } ;
-
- class __declspec(delphiclass) TRegistry;
- class __declspec(pascalimplementation) TRegistry : public System::TObject
- {
- typedef TRegistry ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::Integer FCurrentKey;
- System::Integer FRootKey;
- System::Boolean FLazyWrite;
- System::AnsiString FCurrentPath;
- System::Boolean FCloseRootKey;
- void __fastcall SetRootKey(System::Integer Value);
-
- protected:
- void __fastcall ChangeKey(System::Integer Value, const System::AnsiString Path);
- System::Integer __fastcall GetBaseKey(System::Boolean Relative);
- System::Integer __fastcall GetData(const System::AnsiString Name, System::Pointer Buffer, System::Integer
- BufSize, TRegDataType &RegData);
- System::Integer __fastcall GetKey(const System::AnsiString Key);
- void __fastcall PutData(const System::AnsiString Name, System::Pointer Buffer, System::Integer BufSize
- , TRegDataType RegData);
- void __fastcall SetCurrentKey(System::Integer Value);
-
- public:
- __fastcall TRegistry(void);
- __fastcall virtual ~TRegistry(void);
- void __fastcall CloseKey(void);
- System::Boolean __fastcall CreateKey(const System::AnsiString Key);
- System::Boolean __fastcall DeleteKey(const System::AnsiString Key);
- System::Boolean __fastcall DeleteValue(const System::AnsiString Name);
- System::Boolean __fastcall GetDataInfo(const System::AnsiString ValueName, TRegDataInfo &Value);
- System::Integer __fastcall GetDataSize(const System::AnsiString ValueName);
- TRegDataType __fastcall GetDataType(const System::AnsiString ValueName);
- System::Boolean __fastcall GetKeyInfo(TRegKeyInfo &Value);
- void __fastcall GetKeyNames(Classes::TStrings *Strings);
- void __fastcall GetValueNames(Classes::TStrings *Strings);
- System::Boolean __fastcall HasSubKeys(void);
- System::Boolean __fastcall KeyExists(const System::AnsiString Key);
- System::Boolean __fastcall LoadKey(const System::AnsiString Key, const System::AnsiString FileName)
- ;
- void __fastcall MoveKey(const System::AnsiString OldName, const System::AnsiString NewName, System::Boolean
- Delete);
- System::Boolean __fastcall OpenKey(const System::AnsiString Key, System::Boolean CanCreate);
- System::Currency __fastcall ReadCurrency(const System::AnsiString Name);
- System::Integer __fastcall ReadBinaryData(const System::AnsiString Name, void *Buffer, System::Integer
- BufSize);
- System::Boolean __fastcall ReadBool(const System::AnsiString Name);
- System::TDateTime __fastcall ReadDate(const System::AnsiString Name);
- System::TDateTime __fastcall ReadDateTime(const System::AnsiString Name);
- System::Double __fastcall ReadFloat(const System::AnsiString Name);
- System::Integer __fastcall ReadInteger(const System::AnsiString Name);
- System::AnsiString __fastcall ReadString(const System::AnsiString Name);
- System::TDateTime __fastcall ReadTime(const System::AnsiString Name);
- System::Boolean __fastcall RegistryConnect(const System::AnsiString UNCName);
- void __fastcall RenameValue(const System::AnsiString OldName, const System::AnsiString NewName);
- System::Boolean __fastcall ReplaceKey(const System::AnsiString Key, const System::AnsiString FileName
- , const System::AnsiString BackUpFileName);
- System::Boolean __fastcall RestoreKey(const System::AnsiString Key, const System::AnsiString FileName
- );
- System::Boolean __fastcall SaveKey(const System::AnsiString Key, const System::AnsiString FileName)
- ;
- System::Boolean __fastcall UnLoadKey(const System::AnsiString Key);
- System::Boolean __fastcall ValueExists(const System::AnsiString Name);
- void __fastcall WriteCurrency(const System::AnsiString Name, System::Currency Value);
- void __fastcall WriteBinaryData(const System::AnsiString Name, void *Buffer, System::Integer BufSize
- );
- void __fastcall WriteBool(const System::AnsiString Name, System::Boolean Value);
- void __fastcall WriteDate(const System::AnsiString Name, System::TDateTime Value);
- void __fastcall WriteDateTime(const System::AnsiString Name, System::TDateTime Value);
- void __fastcall WriteFloat(const System::AnsiString Name, System::Double Value);
- void __fastcall WriteInteger(const System::AnsiString Name, System::Integer Value);
- void __fastcall WriteString(const System::AnsiString Name, const System::AnsiString Value);
- void __fastcall WriteTime(const System::AnsiString Name, System::TDateTime Value);
- __property System::Integer CurrentKey = {read=FCurrentKey, nodefault};
- __property System::AnsiString CurrentPath = {read=FCurrentPath, nodefault};
- __property System::Boolean LazyWrite = {read=FLazyWrite, write=FLazyWrite, nodefault};
- __property System::Integer RootKey = {read=FRootKey, write=SetRootKey, nodefault};
- };
-
- class __declspec(delphiclass) TRegIniFile;
- class __declspec(pascalimplementation) TRegIniFile : public TRegistry
- {
- typedef TRegIniFile ThisClass;
- typedef TRegistry inherited;
-
- private:
- System::AnsiString FFileName;
-
- public:
- __fastcall TRegIniFile(const System::AnsiString FileName);
- System::AnsiString __fastcall ReadString(const System::AnsiString Section, const System::AnsiString
- Ident, const System::AnsiString Default);
- void __fastcall WriteString(const System::AnsiString Section, const System::AnsiString Ident, const System::AnsiString
- Value);
- System::Longint __fastcall ReadInteger(const System::AnsiString Section, const System::AnsiString Ident
- , System::Longint Default);
- void __fastcall WriteInteger(const System::AnsiString Section, const System::AnsiString Ident, System::Longint
- Value);
- System::Boolean __fastcall ReadBool(const System::AnsiString Section, const System::AnsiString Ident
- , System::Boolean Default);
- void __fastcall WriteBool(const System::AnsiString Section, const System::AnsiString Ident, System::Boolean
- Value);
- void __fastcall ReadSection(const System::AnsiString Section, Classes::TStrings *Strings);
- void __fastcall ReadSections(Classes::TStrings *Strings);
- void __fastcall ReadSectionValues(const System::AnsiString Section, Classes::TStrings *Strings);
- void __fastcall EraseSection(const System::AnsiString Section);
- void __fastcall DeleteKey(const System::AnsiString Section, const System::AnsiString Ident);
- __property System::AnsiString FileName = {read=FFileName, nodefault};
- public:
- /* !! TRegistry.Destroy */ __fastcall virtual ~TRegIniFile(void) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
-
- } /* namespace Registry */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Registry;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Registry
-