Re: SendMessageTimeoutW requires casting string to uint?

2022-03-05 Thread BoQsc via Digitalmars-d-learn
Update: 2022-03-04 ChangeLog: * Fixed Typos * Added Switch Statement for Command Line Interface Arguments * Added Switch Statement for Policy, intl, Environment * Added Switch Statement for Error handling: Exit status, Error level * Increased window "timeout" from 1 to 1000

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread BoQsc via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 13:10:57 UTC, a11e99z wrote: On Tuesday, 9 July 2019 at 12:14:38 UTC, BoQsc wrote: On Tuesday, 9 July 2019 at 11:11:53 UTC, Dejan Lekic wrote: auto result = SendMessageTimeoutW( HWND_BROADCAST, WM_SETTINGCHANGE, 0, envi.toUTF16z,

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread a11e99z via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 12:14:38 UTC, BoQsc wrote: On Tuesday, 9 July 2019 at 11:11:53 UTC, Dejan Lekic wrote: auto result = SendMessageTimeoutW( HWND_BROADCAST, WM_SETTINGCHANGE, 0, envi.toUTF16z, SMTO_ABORTIFHUNG, timeout, null

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread BoQsc via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 11:11:53 UTC, Dejan Lekic wrote: Now that I browsed the std.utf more, I realised what fits your need best is the https://dlang.org/phobos/std_utf.html#toUTF16z So far, this is what I have: Filename: myVersion.d import core.sys.windows.windows :

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread Dejan Lekic via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 10:34:54 UTC, BoQsc wrote: All I know that there was toString16z function from tango project, that made it all work. Now that I browsed the std.utf more, I realised what fits your need best is the https://dlang.org/phobos/std_utf.html#toUTF16z

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread Dejan Lekic via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 10:34:54 UTC, BoQsc wrote: I'm quite new to the programming, and I'm getting unsure how to make SendMessageTimeoutW to work with D lang. Most of my attention right now resides around the Argument of the SendMessageTimeoutW function: "Environment", It seems that

Re: SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread Dejan Lekic via Digitalmars-d-learn
On Tuesday, 9 July 2019 at 11:06:54 UTC, Dejan Lekic wrote: std.utf module has all encoding/decoding you need (in this case UTF-16). I guess You need to convert your string using toUTF16 ( https://dlang.org/phobos/std_utf.html#toUTF16 ). I do not do Windows programming so I am not 100% sure

SendMessageTimeoutW requires casting string to uint?

2019-07-09 Thread BoQsc via Digitalmars-d-learn
I'm quite new to the programming, and I'm getting unsure how to make SendMessageTimeoutW to work with D lang. Most of my attention right now resides around the Argument of the SendMessageTimeoutW function: "Environment", It seems that SendMessageTimeoutW accepts only uint type, and string