Awesome
nim-registry
Deal with Windows Registry from Nim.
Online docs here: http://miere.ru/docs/registry/
import winregistry
var
faceName: string
fontSize: int32
fontWeight: int32
h: RegHandle
try:
h = open("HKEY_CURRENT_USER\\Console\\Git Bash", samRead)
faceName = h.readString("FaceName")
fontSize = h.readInt32("FontSize")
fontWeight = h.readInt32("FontWeight")
except RegistryError:
echo "err: ", getCurrentExceptionMsg()
finally:
close(h)
Tests
Run in command line:
$ nimble test
$ nimble testansi
You should see a "tests passed" message. If you get Access is denied
error, try running with administrator rights.
Changelog
1.0.0
RegValueKind
andRegKeyRights
are distinctuint32
's now (fixed warning about enums with holes).- Replaced
RegistryError
withOSError
for consistency with built-inregistry
package. - Removed support for deprecated
taintmode
feature. - Moved tests out of main file to ensure things are exported correctly.
- Fixed deprecation/unused variable warnings.
- Updated documentation.
- Nim 1.6.0 is now minimum supported version.
0.2.1
- Added "enumValueNames"
- Fixed missing dealloc in case of exception in "enumSubkeys"
0.2.0
- Updated for nim 0.19.0
0.1.8
- Fixed GC-unsafe procs to be safe