Re: How do I convert a LPVOID (void*) to string?

2017-10-21 Thread Nieto via Digitalmars-d-learn
Thanks for all answers guys. If you're using this solely for Windows error messages, the std.windows.syserror module has a function, sysErrorString, which wraps it up for you. It also provides a WindowsException you can throw which, given an Windows error code, will contain a formatted system

How do I determine the system version on Windows?

2017-10-17 Thread Nieto via Digitalmars-d-learn
I need to determine the operating system version. From XP to win 10. How do I do that?

Re: How do I convert a LPVOID (void*) to string?

2017-10-16 Thread Nieto via Digitalmars-d-learn
On Monday, 16 October 2017 at 21:48:35 UTC, Nieto wrote: How do I convert/create a D string from LPVOID (void*)? string GetLastErrorMessage() { LPVOID lpMsgBuf; DWORD errorMessageID = GetLastError(); FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER |

How do I convert a LPVOID (void*) to string?

2017-10-16 Thread Nieto via Digitalmars-d-learn
How do I convert/create a D string from LPVOID (void*)? string GetLastErrorMessage() { LPVOID lpMsgBuf; DWORD errorMessageID = GetLastError(); FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | F

Re: Why isn't IID_ITaskbarList3 defined?

2017-10-16 Thread Nieto via Digitalmars-d-learn
On Monday, 16 October 2017 at 05:06:26 UTC, evilrat wrote: On Sunday, 15 October 2017 at 15:13:09 UTC, Nieto wrote: I'm trying to write a blinding and I found both IID_ITaskbarList and IID_ITaskbarList2 are defined but IID_ITaskbarList3 isn't. Any reason why it isn't defined? sorry if it sound

Why isn't IID_ITaskbarList3 defined?

2017-10-15 Thread Nieto via Digitalmars-d-learn
I'm trying to write a blinding and I found both IID_ITaskbarList and IID_ITaskbarList2 are defined but IID_ITaskbarList3 isn't. Any reason why it isn't defined? sorry if it sounds such a naive question, I'm new to COM and D interop. I knew a thing or two about PInvokes with C#. Then how do I

How do I use WINAPI's ITaskbarList3?

2017-10-13 Thread Nieto via Digitalmars-d-learn
How do I use other than Windows.h with D? For Windows.h I know it's core.sys.windows.windows but what's the module for Shobjidl.h for example? is this supported natively? (i tried core.sys.windows.shobjidl actually) but not so, what alternative are there?

Does D have an equivalent to C#'s String.IsNullOrWhiteSpace?

2017-10-12 Thread Nieto via Digitalmars-d-learn
Does D have an equivalent to C#'s String.IsNullOrWhiteSpace() in the standard library? just asking if there's a native one, so I don't need reinvente the wheel https://msdn.microsoft.com/en-us/library/system.string.isnullorwhitespace%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396