Skip to content

jdmansour/nim-registry

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nim-registry

Deal with Windows Registry from Nim.

Online docs here: http://miere.ru/docs/registry/

import registry

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:

$ nim c -r registry.nim
$ nim c -r -d:useWinAnsi registry.nim

You should see a "tests passed" message.

About

Deal with Windows Registry from Nim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Nim 100.0%