www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to use std.windows.registry, there are no documentations.

reply BoQsc <vaidas.boqsc gmail.com> writes:
On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:
 https://dlang.org/phobos/std_windows_registry.html
 https://github.com/dlang/phobos/blob/master/std/windows/registry.d

 Can someone provide some examples on how to:
 set, change, receive something from the Windows registry using 
 Phobos std.windows.registry library?
``` import std.stdio; import std.windows.registry; void main(string[] args) { writeln("hello world"); writefln("args.length = %d", args.length); foreach (index, arg; args) { writefln("args[%d] = '%s'", index, arg); } writeln(); writeln(Registry.localMachine().name); writeln(Registry.localMachine().getKey("System\\CurrentControlS t\\Control\\Session Manager\\Environment").name); writeln(Registry.localMachine().getKey("System").keyCount); writeln(Registry.localMachine().getKey("System").valueCount); writeln(Registry.localMachine().getKey("System\\CurrentControlS t\\Control\\Session Manager\\Environment").valueCount); write(Registry.localMachine().getKey("System\\CurrentControlS t\\Control\\Session Manager\\Environment").getValue("Path").value_EXPAND_SZ); Registry.currentUser().createKey("test"); } ```
Nov 24 2021
parent reply Imperatorn <johan_forsberg_86 hotmail.com> writes:
On Wednesday, 24 November 2021 at 12:07:44 UTC, BoQsc wrote:
 On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:
 [...]
``` import std.stdio; import std.windows.registry; [...]
You could add some examples to the documentation if you like ☀️
Nov 27 2021
parent BoQsc <vaidas.boqsc gmail.com> writes:
On Saturday, 27 November 2021 at 19:59:24 UTC, Imperatorn wrote:
 On Wednesday, 24 November 2021 at 12:07:44 UTC, BoQsc wrote:
 On Thursday, 11 July 2019 at 08:53:35 UTC, BoQsc wrote:
 [...]
``` import std.stdio; import std.windows.registry; [...]
You could add some examples to the documentation if you like ☀️
I'll certaintly will, as that's the only way to keep some kind of reference point and not make it all lost. It might take a while since various things going on at the same time for the next few months.
Nov 30 2021