mirror of
https://github.com/miere43/nim-registry
synced 2026-01-14 07:41:43 +00:00
No description
| doc | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| winregistry.nim | ||
| winregistry.nimble | ||
nim-registry
Deal with Windows Registry from Nim.
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 OSError:
echo "err: ", getCurrentExceptionMsg()
finally:
close(h)
Tests
Run in command line:
$ nimble test
You should see a "tests passed" message. If you get Access is denied error, try running with administrator rights.
Changelog
2.1.0
- Added
delValueproc (thanks to @Rafflesiaceae)
2.0.0
- Added support for Nim 2.0.0
- Removed support for
useWinUnicodeswitch WinStringtype was removed; useWideCStringinstead
1.0.0
RegValueKindandRegKeyRightsare distinctuint32's now (fixed warning about enums with holes).- Replaced
RegistryErrorwithOSErrorfor consistency with built-inregistrypackage. - Removed support for deprecated
taintmodefeature. - 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