Re: Windows API: GetUserName: Retrieve the name of the user associated with the current thread.

2023-08-20 Thread BoQsc via Digitalmars-d-learn
Update: GetUserName by print to stdout Main function has been updated with `string[] args` and a new feature: ``` if (args.length > 1 && args[1] == "print") { write(username); } ``` Usage: `WindowsGetUserName.exe print` Demonstration

Windows API: GetUserName: Retrieve the name of the user associated with the current thread.

2023-08-19 Thread BoQsc via Digitalmars-d-learn
I'm sharing some code here. **It's not completely tested and might contain serious mistakes, repetitions, bad style and readabilty. But it seems to work.** Critique, improvements and feedback might help. Demonstration This code retrieves username of the current windows user using