www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18659] New: All modern window API calls are disabled

https://issues.dlang.org/show_bug.cgi?id=18659

          Issue ID: 18659
           Summary: All modern window API calls are disabled
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: musicaljelly gmail.com

I recently found that I could use CancelIo(), but not CancelIoEx(). I looked at
winbase.d, and found that CancelIoEx() is wrapped with 'static if (_WIN32_WINNT
 0x600) (I'm on Windows 10, so this shouldn't have been an issue).
I looked at w32api.d where this enum is defined, and found a bunch of version statements that set __WIN32_WINNT based on your windows version. I put a pragma(msg) into Windows10 block and compiled, and nothing was printed. I then moved it into the fallback else block, and it printed. This indicates to me that this version if-else is not working as intended. This version if-else is using version labels (like Windows10, Windows8_1, etc) that aren't listed in the docs. Are they real version labels that are actually supported? They don't seem to be working on my machine. Fair warning, I'm running a relatively old version of D currently (2.072.1). But unless these version statements have been added recently (and the docs don't seem to indicate this), then this issue still exists. Let me know if there's anything I can test or if any more details would be helpful. --
Mar 24 2018