Re: WTF is going on! Corrupt value that is never assigned

2017-07-14 Thread Moritz Maxeiner via Digitalmars-d-learn
On Thursday, 13 July 2017 at 23:30:39 UTC, Moritz Maxeiner wrote: Okay, I'll setup a Windows VM when I have time and check it out (unless someone solves it beforehand). I have been unable to reproduce your reported behaviour with dmd 2.074.1 (same as Adam).

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 14 July 2017 at 00:33:12 UTC, FoxyBrown wrote: What I'm trying to do is fairly straightforward but I've wasted nearly 2 days on it. //added this so it would all compile import core.sys.windows.windows; import core.stdc.stdio; import core.stdc.stdlib; import std.stdio; import std.conv

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread FoxyBrown via Digitalmars-d-learn
On Thursday, 13 July 2017 at 23:30:39 UTC, Moritz Maxeiner wrote: On Thursday, 13 July 2017 at 22:53:45 UTC, FoxyBrown wrote: On Thursday, 13 July 2017 at 20:35:19 UTC, Moritz Maxeiner wrote: On Thursday, 13 July 2017 at 18:22:34 UTC, FoxyBrown wrote: The following code is pretty screwed up, ev

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread Moritz Maxeiner via Digitalmars-d-learn
On Thursday, 13 July 2017 at 22:53:45 UTC, FoxyBrown wrote: On Thursday, 13 July 2017 at 20:35:19 UTC, Moritz Maxeiner wrote: On Thursday, 13 July 2017 at 18:22:34 UTC, FoxyBrown wrote: The following code is pretty screwed up, even though it doesn't look like it. I have a buf, a simple malloc w

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread FoxyBrown via Digitalmars-d-learn
On Thursday, 13 July 2017 at 20:35:19 UTC, Moritz Maxeiner wrote: On Thursday, 13 July 2017 at 18:22:34 UTC, FoxyBrown wrote: The following code is pretty screwed up, even though it doesn't look like it. I have a buf, a simple malloc which hold the results of a win32 call. I am then trying to c

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread ag0aep6g via Digitalmars-d-learn
On 07/13/2017 08:22 PM, FoxyBrown wrote: res = EnumServicesStatusExW(schSCManager, SC_ENUM_TYPE.SC_ENUM_PROCESS_INFO, servicesType, SERVICE_STATE_ALL, cast(ubyte*)buf, 5, &dwBytesNeeded, &dwCount, &resume, cast(const(char)*)null); The cast to `char*` here looks odd. The 'W' suffi

Re: WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread Moritz Maxeiner via Digitalmars-d-learn
On Thursday, 13 July 2017 at 18:22:34 UTC, FoxyBrown wrote: The following code is pretty screwed up, even though it doesn't look like it. I have a buf, a simple malloc which hold the results of a win32 call. I am then trying to copy over the data in buf to a D struct. But when copying the str

WTF is going on! Corrupt value that is never assigned

2017-07-13 Thread FoxyBrown via Digitalmars-d-learn
The following code is pretty screwed up, even though it doesn't look like it. I have a buf, a simple malloc which hold the results of a win32 call. I am then trying to copy over the data in buf to a D struct. But when copying the strings, the buf location changes, screwing up the copying proc