| |
|
|
 | Registry.pcu und Registry.inc, Copyright by Thomas Schulz (aka ts-soft) Veröffentlicht unter Lizenz der LGPL: [...] 
Um die doch sehr eingeschränkte Funktionalität von XProfan zur Bearbeitung der Registry zu erweitern, habe ich diese Unit/Include geschrieben.
Anforderungen: ab Win95, NT4 mit installiertem IE4 oder höher Nur mit XProfan 10 getestet
Parameter und Bedeutungen: - KeyName$ = Der gesamte Key, inclusive Klasse, Profan kürzel werden supportati! Beispiel: HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersion oder: HKEY_2SOFTWAREMicrosoftWindowsCurrentVersion
- ValueName$ = Eintrag (S3 in der Profan-Aiuto)
- Value$ oder Value& = Wert (S4 in der Profan-Aiuto)
- Index& = 0 - ?, per Enumerationen (ListSubKey, ListSubValue)
- Type& = Der Typ des Eintrags (SetString) 1 = REG_SZ (default) 2 = REG_EXPAND_SZ 3 = REG_BINARY 4 = REG_DWORD (per Long besser SetLong verwenden!) 7 = REG_MULTI_SZ
Da es sich bei dieser Unit/Include um eine Klasse handelt, ist als erstes immer ein Objekt zu erzeugen!
z.B: KompilierenMarkierenSeparieren oder: KompilierenMarkierenSeparieren Am ende wieder mit Dispose freigeben!
Folgende ObjectVariable steht zur Verfügung: .Error& (z.B. Reg#.Error&) <> 0 bedeutet Fehler
Folgende öffentliche Methoden gibt es:
Fehler$ = .GetErrMsg() Ergebnis& = .DeleteKey(KeyName$) Ergebnis& = .DeleteEmptyKey(KeyName$) Ergebnis& = .DeleteValue(KeyName$, ValueName$) Type& = .GetValueType(KeyName$, ValueName$) Ergebnis$ = .ListSubKey(KeyName$, Index&) Ergebnis$ = .ListSubValue(KeyName$, Index&) Ergebnis& = .GetLong(KeyName$, ValueName$) Ergebnis$ = .GetString(KeyName$, ValueName$) Funktioniert mit allen Registrytypen! Ergebnis& = .SetLong(KeyName$, ValueName$, Value&) nicht existente Keys werden autom. erstellt! Ergebnis& = .SetString(KeyName$, ValueName$, Value$[, Type&]) Type& ist Optional, default = REG_SZ!
Beispiele zu allen Methoden sind dabei!
Feedback Benvenuto! |
 |
|
| |
|
|
|
 | Wow sehr nett! Hab ich gestern schon gebraucht und nicht gehabt 
Wie siehts aus - kann man damit z.B. auch Binärwerte schreiben? |
|
|
| |
|
|
|
 | [quote:c00c266e92=iF]Wie siehts aus - kann man damit z.B. auch Binärwerte schreiben?[/quote:c00c266e92] Insofern Du die Werte in einen String quetscht, gehts einwandfrei. Da Profan auch Chr$(0) in Strings supportati, sehe ich keine Probleme. Grenze ist nur die Max. Stringlänge in XProfan, bzw. die Beschränkungen des OS bezüglich Registry. |
|
|
| |
|
|
|
 | Nett! Da XProfan ja ne 2GB-Stringgrenze hat sollte das per ein paar Spielereien reichen ^^ |
|
|
| |
|
|
|
 | Update Hab den Source noch etwas optimiert. Die Unit ist jetzt ca. 500 Byte kleiner. |
|
|
| |
|
|
|
 | Ich würde mal sagen Festplattenplatz haben alle genug - im Bezug auf XProfan wäre da Geschwindigkeit angebrachter. |
|
|
| |
|
|
|
 Jac de Lad | Ich habs noch nicht getestet, aber ich halts per ne gute Idee!  |
|
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 05.12.2006 ▲ |
|
|
|
|
 Jac de Lad | |
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 05.12.2006 ▲ |
|
|
|
|
 | Proc ?_Registry.Registry Proc ?_Registry.Registry
 |
|
|
| |
|
|
|
 Jac de Lad | |
|
| Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 05.12.2006 ▲ |
|
|
|
|
 | Müsste dann in der Klassendefinition nicht auch class ?_blub=+?_blub@ stehen?  |
|
|
| |
|
|
|
 RGH | [quote:ecb7539923=iF]Müsste dann in der Klassendefinition nicht auch class ?_blub = +?_blub@ stehen? [/quote:ecb7539923] Genau!
Saluto Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 05.12.2006 ▲ |
|
|
|