On Tuesday, 7 June 2016 at 04:06:01 UTC, Mike Parker wrote:
Fourth, while casting the string directly to void* will work,
it's considered best practice to use the pointer property for
clarity.
Oops!
cast(void*)path.ptr
In both cases. Like I said, without .ptr, it works, but this
makes
On Monday, 6 June 2016 at 19:52:36 UTC, Alexander Patapoff wrote:
import std.stdio;
import std.string;
import core.sys.windows.windows;
void main() {
string filepath =
"C:\\Users\\awpat\\Pictures\\patterns_00387591.jpg";
auto p = toStringz(filepath);
int result;
import std.stdio;
import std.string;
import core.sys.windows.windows;
void main() {
string filepath =
"C:\\Users\\awpat\\Pictures\\patterns_00387591.jpg";
auto p = toStringz(filepath);
int result;
result = SystemParametersInfo(cast(uint)SPI_SETDESKWALLPAPER,