[Issue 15036] New: SimpleDllMain assumes various symbols are available unqualified
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Fri Sep 11 03:17:02 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15036
          Issue ID: 15036
           Summary: SimpleDllMain assumes various symbols are available
                    unqualified
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: jakobovrum at gmail.com
Code like the following does not compile:
version(Windows)
{
    import core.sys.windows.dll : SimpleDllMain;
    mixin SimpleDllMain;
}
Because SimpleDllMain depends on dll_process_attach, dll_process_detach,
dll_thread_attach and dll_thread_detach from core.sys.windows.dll. Statically
importing the module, or using a renamed import, would also break the mixin.
It would probably be a robust fix to add:
import core.sys.windows.dll : dll_process_attach, dll_process_detach,
dll_thread_attach, dll_thread_detach;
To the body of the DllMain function inside the mixin.
--
    
    
More information about the Digitalmars-d-bugs
mailing list