<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    What OS are you running on? <br>
    <br>
    Your code works for me (XP SP3). Also Visual D works fine AFAICT
    (its a plugin DLL to VS).<br>
    <br>
    <br>
    On 05.09.2011 19:17, Sönke Ludwig wrote:
    <blockquote cite="mid:4E650440.9050605@informatik.uni-luebeck.de"
      type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      Am 04.09.2011 06:48, schrieb Walter Bright:
      <blockquote cite="mid:4E630339.1060606@digitalmars.com"
        type="cite"><a moz-do-not-send="true"
          class="moz-txt-link-freetext"
          href="http://ftp.digitalmars.com/dmd1beta.zip">http://ftp.digitalmars.com/dmd1beta.zip</a>
        <br>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://ftp.digitalmars.com/dmd2beta.zip">http://ftp.digitalmars.com/dmd2beta.zip</a>
        <br>
        _______________________________________________ <br>
        dmd-beta mailing list <br>
        <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
          href="mailto:dmd-beta@puremagic.com">dmd-beta@puremagic.com</a>
        <br>
        <a moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://lists.puremagic.com/mailman/listinfo/dmd-beta">http://lists.puremagic.com/mailman/listinfo/dmd-beta</a>
        <br>
      </blockquote>
      Has anything changed with regard to TLS?<br>
      <br>
      I'm getting OutOfMemoryErrors when accessing TLS arrays from
      within a DLL. Maybe the dll_fixTLS function in
      core.sys.windows.dll needs to be adjusted?<br>
      <br>
      ---<br>
      <title>Snippet</title>
      <span style="color:blue;">import</span> std.c.windows.windows;<br>
      <span style="color:blue;">import</span> core.sys.windows.dll;<br>
      <br>
      <span style="color:blue;">int</span>[] s_arr;<br>
      <br>
      <span style="color:blue;">extern</span> (Windows)
      BOOL DllMain(HINSTANCE hInstance, ULONG ulReason, LPVOID pvReserved) 

      {<br>
          <span style="color:blue;">switch</span> (ulReason) {<br>
              <span style="color:blue;">default</span>: <span
        style="color:blue;">return</span> <span style="color:blue;">false</span>;<br>
              <span style="color:blue;">case</span> DLL_PROCESS_ATTACH:<span
        style="color:blue;"><br>
                    if</span>( !dll_process_attach( hInstance, <span
        style="color:blue;">true</span> ) ) <span style="color:blue;">return</span> <span
        style="color:blue;">false</span>;<br>
                  s_arr ~= 0; // -> OutOfMemoryError<br>
                  <span style="color:blue;">break</span>;<br>
          }<br>
          <span style="color:blue;">return</span> <span
        style="color:blue;">true</span>;<br>
      }<br>
      ---<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dmd-beta mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dmd-beta@puremagic.com">dmd-beta@puremagic.com</a>
<a class="moz-txt-link-freetext" href="http://lists.puremagic.com/mailman/listinfo/dmd-beta">http://lists.puremagic.com/mailman/listinfo/dmd-beta</a></pre>
    </blockquote>
    <br>
  </body>
</html>