perl.libwin32 http://www.nntp.perl.org/group/perl.libwin32/ ... Copyright 1998-2013 perl.org Sat, 25 May 2013 04:30:51 +0000 ask@perl.org [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Daniel Dragan via RT Tue Apr 09 22:28:45 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>Closed.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/04/msg885.html Wed, 10 Apr 2013 02:28:58 +0000 AW: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Keuchel, Rainer via RT Tue Apr 09 04:56:26 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by rkeuchel@allgeier.com<br/> Queue: Win32-API<br/> Subject: AW: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>You can close the ticket, cdecl works..<br/><br/><br/><br/>Mit freundlichen Gr&Atilde;&frac14;ssen<br/><br/>Rainer Keuchel<br/><br/><br/><br/><br/><br/>Rainer Keuchel<br/>Entwicklungsleiter<br/>Enterprise Content Management<br/><br/>Allgeier IT Solutions GmbH<br/>Hans-Bredow-Str. 60<br/>28307 Bremen<br/><br/>Tel: +49 (421) 43841294<br/>Fax: +49 (421) 438419294<br/>E-Mail: rkeuchel@allgeier.com<br/>Internet: www.allgeier-it.de<br/><br/>ALLGEIER IT SOLUTIONS GmbH<br/>Amtsgericht Bremen | HRB 20924<br/>Gesch&Atilde;&curren;ftsf&Atilde;&frac14;hrer: Hubert Rohrer, Johannes H&Atilde;&curren;ringslack, Ralf Nitzgen<br/>St.-Nr. 803/11449 | USt.-ID-Nr. DE114397847<br/><br/>Diese E-Mail enth&Atilde;&curren;lt vertrauliche und/oder rechtlich gesch&Atilde;&frac14;tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt&Atilde;&frac14;mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.<br/><br/>This message (and any associated files) is intended only for the use<br/>of bug-Win32-API@rt.cpan.org and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not bug-Win32-API@rt.cpan.org you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Any<br/>views or opinions presented are solely those of the author rkeuchel@allgeier.com and do not necessarily represent those of the<br/>company.<br/><br/><br/>-----Urspr&Atilde;&frac14;ngliche Nachricht-----<br/>Von: Daniel Dragan via RT [mailto:bug-Win32-API@rt.cpan.org]<br/>Gesendet: Dienstag, 9. April 2013 07:09<br/>An: Keuchel, Rainer<br/>Betreff: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/><br/>&lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/>On Fri Mar 29 06:24:29 2013, keuchel@rainer-keuchel.de wrote:<br/>&gt; Here is the old code.. Unfortunatly there is no assembly magic. It<br/>&gt; just calls several functions with different numbers of args from 1<br/>&gt; to 10.<br/>&gt;<br/><br/>Thank you for the ARM code. Are you still having x86/x64 Win32::API problems or can I close the ticket?<br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/04/msg884.html Tue, 09 Apr 2013 08:56:35 +0000 [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Daniel Dragan via RT Tue Apr 09 01:09:13 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>On Fri Mar 29 06:24:29 2013, keuchel@rainer-keuchel.de wrote:<br/>&gt; Here is the old code.. Unfortunatly there is no assembly magic. It<br/>&gt; just calls several functions with different numbers of args from 1<br/>&gt; to 10.<br/>&gt; <br/><br/>Thank you for the ARM code. Are you still having x86/x64 Win32::API problems or can I close the ticket?<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/04/msg883.html Tue, 09 Apr 2013 05:09:20 +0000 [rt.cpan.org #81748] strawberry perl 5.8.9 with mingw.org gcc 3.4.5 alloca broken by Daniel Dragan via RT Tue Apr 09 01:05:23 2013: Request 81748 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: strawberry perl 5.8.9 with mingw.org gcc 3.4.5 alloca broken<br/> Broken in: 0.74<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=81748 &gt;<br/><br/><br/>Fixed in 0.76_01. malloc.h is #included for the alloca define. Builds and passed on my strawberry on 5.8.9 but a different bug (can&#39;t load API.dll into the process) exists on some Perls with Mingw 3.4.5 compilers.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/04/msg882.html Tue, 09 Apr 2013 05:05:35 +0000 [rt.cpan.org #83191] Win32::API doesn't keep C stack aligned on x64 by Daniel Dragan via RT Tue Apr 09 00:55:35 2013: Request 83191 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API doesn&#39;t keep C stack aligned on x64<br/> Broken in: 0.75<br/> Severity: Important<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83191 &gt;<br/><br/><br/>Fixed in 0.76_01. Test was added to api-test to check C stack alignment on x64.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/04/msg881.html Tue, 09 Apr 2013 04:55:43 +0000 AW: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Rainer Keuchel via RT Fri Mar 29 06:24:29 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by keuchel@rainer-keuchel.de<br/> Queue: Win32-API<br/> Subject: AW: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>Here is the old code.. Unfortunatly there is no assembly magic. It just calls several functions with different numbers of args from 1 to 10.<br/> <br/><br/>If you are the same Rainer Keuchel as in &lt;http://tech.groups.yahoo.com/group/wince-devel/message/459&gt; http://tech.groups.yahoo.com/group/wince-devel/message/459 , could you provide/attach what was in &lt;http://www.rainer-keuchel.de/wince/perl-win32-api.tar.gz&gt; http://www.rainer-keuchel.de/wince/perl-win32-api.tar.gz ? I&#39;d like to integrate what was in there (ARM support) into the official Win32::API.<br/> <br/> <br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg880.html Fri, 29 Mar 2013 10:24:40 +0000 [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Daniel Dragan via RT Fri Mar 29 00:35:42 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>On Thu Mar 28 17:11:32 2013, rkeuchel@allgeier.com wrote:<br/>&gt; It&#39;s really stdcall. Sorry, I should have checked this..<br/>&gt; <br/>&gt; Maybe I<br/>&gt; was biased because it worked in my old 5.14 ActiveState-Perl, which<br/>&gt; probably used the C version of &quot;call&quot; or an old asm version.<br/>&gt; <br/>&gt; I<br/>&gt; recompiled Win32::API for getting WriteMemory(), which was missing<br/>&gt; in the AS build.<br/><br/>If you are the same Rainer Keuchel as in http://tech.groups.yahoo.com/group/wince-devel/message/459 , could you provide/attach what was in http://www.rainer-keuchel.de/wince/perl-win32-api.tar.gz ? I&#39;d like to integrate what was in there (ARM support) into the official Win32::API.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg879.html Fri, 29 Mar 2013 04:35:54 +0000 [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Daniel Dragan via RT Thu Mar 28 17:42:02 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>On Thu Mar 28 17:11:32 2013, rkeuchel@allgeier.com wrote:<br/>&gt; It&#39;s really stdcall. Sorry, I should have checked this..<br/><br/>Then why does it crash for you if it really is stdcall?<br/><br/>&gt; <br/>&gt; Maybe I<br/>&gt; was biased because it worked in my old 5.14 ActiveState-Perl, which<br/>&gt; probably used the C version of &quot;call&quot; or an old asm version.<br/><br/>Previous versions of Win32::API as far as I remember, didn&#39;t care if it was __cdecl or __stdcall, original esp from the XSUB is copied back in asm, &quot;esp = *(void **)ebp; ebp = *(void **)esp; esp -= 4;&quot; AKA &quot;leave&quot; or &quot;mov esp, [ebp]; pop esp&quot;, so what the called C func left esp at was actually irrelevant (it can be esp == 0, and Call_asm didn&#39;t care).<br/><br/>&gt; <br/>&gt; I<br/>&gt; recompiled Win32::API for getting WriteMemory(), which was missing<br/>&gt; in the AS build.<br/><br/>OT: &quot;unpack(&#39;P&#39;,&quot; can read any memory, but you can&#39;t write to random memory from core Perl. The undocumented RtlMoveMemory in kernel32.dll in old Win32::APIs (0.68 and older) had to be cludgingly used before. Internet grapevine says RtlMoveMemory exists for VB Classic programmers to use. So I added a WriteMemory so that foreign memory allocators can more easily be used (some C func wants a LocalAlloc memory block to take ownership of and free when it wants, not malloc or Newx (PV buffer)). <br/><br/>&gt; <br/>&gt; And others also use the DLL from C# so I<br/>&gt; thought it would be stdcall..<br/>&gt; <br/>&gt; <br/>&gt; unsigned int __cdecl<br/>&gt; svapi_connect(...)<br/>&gt; <br/>&gt; push ebp<br/>&gt; mov ebp, esp<br/>&gt; push<br/>&gt; 0FFFFFFFEh<br/>&gt; push offset stru_1006F560<br/>&gt; push offset<br/>&gt; __except_handler4<br/>&gt; mov eax, large fs:0<br/>&gt; push eax<br/>&gt; add<br/>&gt; esp, 0FFFFFF68h<br/>&gt; mov eax, ___security_cookie<br/>&gt; xor<br/>&gt; [ebp+ms_exc.registration.ScopeTable], eax<br/>&gt; xor eax, ebp<br/>&gt; mov<br/>&gt; [ebp+var_24], eax<br/>&gt; push ebx<br/>&gt; push esi<br/>&gt; push edi<br/>&gt; push<br/>&gt; eax<br/>&gt; lea eax, [ebp+ms_exc.registration]<br/>&gt; mov large fs:0,<br/>&gt; eax<br/>&gt; mov [ebp+ms_exc.old_esp], esp<br/>&gt; <br/>&gt; ...<br/>&gt; <br/>&gt; mov ecx,<br/>&gt; [ebp+ms_exc.registration.Next]<br/>&gt; mov large fs:0, ecx<br/>&gt; pop<br/>&gt; ecx<br/>&gt; pop edi<br/>&gt; pop esi<br/>&gt; pop ebx<br/>&gt; mov ecx,<br/>&gt; [ebp+var_24]<br/>&gt; xor ecx, ebp ; cookie<br/>&gt; call<br/>&gt; @__security_check_cookie@4 ; __security_check_cookie(x)<br/>&gt; mov<br/>&gt; esp, ebp<br/>&gt; pop ebp<br/>&gt; retn<br/>&gt; <br/><br/>This is a __cdecl function, &quot;retn&quot; would have a number after it if was a __stdcall.<br/><br/>&gt; <br/>&gt; &gt; I plan to change the<br/>&gt; RaiseException to a Perl catchable croak based on the opinions in<br/>&gt; http://perlmonks.org/?node_id=1024423 in a future 0.76_02. Also &gt;<br/>&gt; I might switch the RaiseException to a DebugBreak since<br/>&gt; RaiseException uses alot of C autos and changes esp/ebp alot (but<br/>&gt; ebp sort of points to the<br/>&gt; &gt; incoming args to RaiseException from<br/>&gt; Call_asm).<br/>&gt; <br/>&gt; &gt; Do you have another opinion of what to do when<br/>&gt; there is a prototype mistake?<br/>&gt; <br/>&gt; Yes, a DebugBreak() woud be nice<br/>&gt; to find the reg mismatch, but most people i.e. using an<br/>&gt; ActiveState-Build of Perl<br/>&gt; would not have debug syms.<br/><br/>You can sort-of, barely really, figure it out by just going to memory watch window, put &quot;esp&quot; as the address, set view to &quot;4 byte integers&quot; then do mental arthmitic (I think) to put back esp 4 bytes back (return address from DebugBreak()).<br/><br/>&gt; <br/>&gt; Maybe do<br/>&gt; the DebugBreak() when IsDebuggerPresent() is true, else use croak.<br/>&gt; You could call IsDebuggerPresent() when api.dll is loaded.<br/>&gt; Thanks for your help and your work!<br/>&gt; <br/><br/>I like that idea, I forgot IsDebuggerPresent exists. Thanks for the idea.<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg878.html Thu, 28 Mar 2013 21:42:14 +0000 RE: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Keuchel, Rainer via RT Thu Mar 28 17:11:32 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by rkeuchel@allgeier.com<br/> Queue: Win32-API<br/> Subject: RE: [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>It&#39;s really stdcall. Sorry, I should have checked this..<br/><br/>Maybe I was biased because it worked in my old 5.14 ActiveState-Perl, which<br/>probably used the C version of &quot;call&quot; or an old asm version.<br/><br/>I recompiled Win32::API for getting WriteMemory(), which was missing in the AS build.<br/><br/>And others also use the DLL from C# so I thought it would be stdcall..<br/><br/><br/>unsigned int __cdecl svapi_connect(...)<br/><br/>push ebp<br/>mov ebp, esp<br/>push 0FFFFFFFEh<br/>push offset stru_1006F560<br/>push offset __except_handler4<br/>mov eax, large fs:0<br/>push eax<br/>add esp, 0FFFFFF68h<br/>mov eax, ___security_cookie<br/>xor [ebp+ms_exc.registration.ScopeTable], eax<br/>xor eax, ebp<br/>mov [ebp+var_24], eax<br/>push ebx<br/>push esi<br/>push edi<br/>push eax<br/>lea eax, [ebp+ms_exc.registration]<br/>mov large fs:0, eax<br/>mov [ebp+ms_exc.old_esp], esp<br/><br/>...<br/><br/>mov ecx, [ebp+ms_exc.registration.Next]<br/>mov large fs:0, ecx<br/>pop ecx<br/>pop edi<br/>pop esi<br/>pop ebx<br/>mov ecx, [ebp+var_24]<br/>xor ecx, ebp ; cookie<br/>call @__security_check_cookie@4 ; __security_check_cookie(x)<br/>mov esp, ebp<br/>pop ebp<br/>retn<br/><br/><br/>&gt; I plan to change the RaiseException to a Perl catchable croak based on the opinions in http://perlmonks.org/?node_id=1024423 in a future 0.76_02. Also &gt; I might switch the RaiseException to a DebugBreak since RaiseException uses alot of C autos and changes esp/ebp alot (but ebp sort of points to the<br/>&gt; incoming args to RaiseException from Call_asm).<br/><br/>&gt; Do you have another opinion of what to do when there is a prototype mistake?<br/><br/>Yes, a DebugBreak() woud be nice to find the reg mismatch, but most people i.e. using an ActiveState-Build of Perl<br/>would not have debug syms.<br/><br/>Maybe do the DebugBreak() when IsDebuggerPresent() is true, else use croak.<br/>You could call IsDebuggerPresent() when api.dll is loaded.<br/><br/>Thanks for your help and your work!<br/><br/><br/><br/><br/><br/><br/>Rainer Keuchel<br/>Entwicklungsleiter<br/>Enterprise Content Management<br/><br/>Allgeier IT Solutions GmbH<br/>Hans-Bredow-Str. 60<br/>28307 Bremen<br/><br/>Tel: +49 (421) 43841294<br/>Fax: +49 (421) 438419294<br/>E-Mail: rkeuchel@allgeier.com<br/>Internet: www.allgeier-it.de<br/><br/>ALLGEIER IT SOLUTIONS GmbH<br/>Amtsgericht Bremen | HRB 20924<br/>Gesch&Atilde;&curren;ftsf&Atilde;&frac14;hrer: Hubert Rohrer, Johannes H&Atilde;&curren;ringslack, Ralf Nitzgen<br/>St.-Nr. 803/11449 | USt.-ID-Nr. DE114397847<br/><br/>Diese E-Mail enth&Atilde;&curren;lt vertrauliche und/oder rechtlich gesch&Atilde;&frac14;tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt&Atilde;&frac14;mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.<br/><br/>This message (and any associated files) is intended only for the use<br/>of bug-Win32-API@rt.cpan.org and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not bug-Win32-API@rt.cpan.org you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Any<br/>views or opinions presented are solely those of the author rkeuchel@allgeier.com and do not necessarily represent those of the<br/>company.<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg877.html Thu, 28 Mar 2013 21:11:41 +0000 [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Daniel Dragan via RT Thu Mar 28 15:58:57 2013: Request 84268 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>On Thu Mar 28 13:42:02 2013, rkeuchel@allgeier.com wrote:<br/>&gt; I get an exception in call_asm_x86_msvc.asm, raised at bad_esp.<br/>&gt; ESP<br/>&gt; and EBP do not match.<br/><br/>Your prototype is wrong. Either the func in the DLL is actually __cdecl because it doesn&#39;t explicitly say __stdcall or WINAPI in each declaration and wasn&#39;t compiled with -Gz and the default in Win32::API is always __stdcall unless specified otherwise (this is the opposite of Visual C and GCC&#39;s defaults), or it is a __stdcall which takes a different amount of args than you specified in the prototype string.<br/><br/>&gt; <br/>&gt; Using the C version works. Why is the ASM-<br/>&gt; Version the default for MSVC?<br/>&gt; <br/><br/>The inline assembly version was very inefficient compared to the ideal design, the inline assembly version copied the same data between memory and register 2-4 times redundantly before writing it to memory for the final time, also the call instruction appears 3 different times (but called only once) in the inline assembly version instead of once. The C version (still used with GCC) doesn&#39;t compare ESP to EBP to find wrong prototypes yet (not sure if the C version ever will).<br/><br/>&gt; I compiled a fresh perl for<br/>&gt; testing and debugging this.<br/>&gt; The called DLL is also built with MSVC<br/>&gt; 16 and uses WINAPI calling convention.<br/><br/>Are you sure?<br/><br/>&gt; <br/>&gt; The signature is:<br/>&gt; Win32::API-&gt;Import(&quot;svapi32_vc100.dll&quot;, &#39;ULONG<br/>&gt; svapi_connect(LPVOID hsv,LPSTR s1,LPSTR s2,LPSTR s3,LPSTR s4,LPSTR<br/>&gt; s5,LPSTR s6,LPSTR s7,LPSTR s8,LPSTR s9, LPSTR s10)&#39;);<br/><br/><br/>The above is probably a __cdecl in the DLL since __stdcall isn&#39;t specified anywhere and -Gr and -Gz weren&#39;t used (-Gd wasn&#39;t used either, but it is on by default). I made a test function below to try your prototype.<br/>_______________________________________________<br/><br/>API_TEST_API ULONG svapi_connect(LPVOID hsv,LPSTR s1,LPSTR s2,LPSTR s3,<br/> LPSTR s4,LPSTR s5,LPSTR s6,LPSTR s7,LPSTR s8,LPSTR s9, LPSTR s10) {<br/> if(hsv == 0x0<br/> &amp;&amp; atoi(s1) == 1<br/> &amp;&amp; atoi(s2) == 2<br/> &amp;&amp; atoi(s3) == 3<br/> &amp;&amp; atoi(s4) == 4<br/> &amp;&amp; atoi(s5) == 5<br/> &amp;&amp; atoi(s6) == 6<br/> &amp;&amp; atoi(s7) == 7<br/> &amp;&amp; atoi(s8) == 8<br/> &amp;&amp; atoi(s9) == 9<br/> &amp;&amp; atoi(s10) == 10)<br/> return 2;<br/> else{<br/> DebugBreak();<br/> return 0;<br/> }<br/>}<br/>___________________________________________________<br/>this is fine, notice I changed the 1st parameter from LPVOID to ULONG (LPVOID is a char * in Win32::API, not an opaque pointer as normally thought of LPVOID)<br/>_______________________________________________<br/>use Win32::API;<br/> Win32::API-&gt;Import(&quot;api_test.dll&quot;, &#39;ULONG __cdecl svapi_connect(ULONG &#39;<br/>.&#39;hsv,LPSTR s1,LPSTR s2,LPSTR s3,LPSTR s4,LPSTR s5,LPSTR s6,LPSTR s7,LPSTR s8,&#39;<br/>.&#39;LPSTR s9, LPSTR s10)&#39;);<br/> <br/>die &quot;bad return&quot; if svapi_connect(0..10) != 2;<br/>_______________________________________________<br/><br/><br/>This causes &quot;Unhandled exception at 0x7c812afb in perl.exe: 0xC0000028: An invalid or unaligned stack was encountered during an unwind operation.&quot; with 0.76_01. <br/>_______________________________________________<br/>use Win32::API;<br/> Win32::API-&gt;Import(&quot;api_test.dll&quot;, &#39;ULONG svapi_connect(ULONG &#39;<br/>.&#39;hsv,LPSTR s1,LPSTR s2,LPSTR s3,LPSTR s4,LPSTR s5,LPSTR s6,LPSTR s7,LPSTR s8,&#39;<br/>.&#39;LPSTR s9, LPSTR s10)&#39;);<br/> <br/>die &quot;bad return&quot; if svapi_connect(0..10) != 2;<br/>_______________________________________________<br/><br/>I plan to change the RaiseException to a Perl catchable croak based on the opinions in http://perlmonks.org/?node_id=1024423 in a future 0.76_02. Also I might switch the RaiseException to a DebugBreak since RaiseException uses alot of C autos and changes esp/ebp alot (but ebp sort of points to the incoming args to RaiseException from Call_asm). Do you have another opinion of what to do when there is a prototype mistake?<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg876.html Thu, 28 Mar 2013 19:59:05 +0000 [rt.cpan.org #84268] Win32::API: Bug/Exception in call_asm_x86_msvc.asm by Keuchel, Rainer via RT Thu Mar 28 13:42:02 2013: Request 84268 was acted upon.<br/>Transaction: Ticket created by rkeuchel@allgeier.com<br/> Queue: Win32-API<br/> Subject: Win32::API: Bug/Exception in call_asm_x86_msvc.asm<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: rkeuchel@allgeier.com<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=84268 &gt;<br/><br/><br/>I get an exception in call_asm_x86_msvc.asm, raised at bad_esp.<br/>ESP and EBP do not match.<br/><br/>Using the C version works. Why is the ASM-Version the default for MSVC?<br/><br/>I compiled a fresh perl for testing and debugging this.<br/>The called DLL is also built with MSVC 16 and uses WINAPI calling convention.<br/><br/>The signature is:<br/>Win32::API-&gt;Import(&quot;svapi32_vc100.dll&quot;, &#39;ULONG svapi_connect(LPVOID hsv,LPSTR s1,LPSTR s2,LPSTR s3,LPSTR s4,LPSTR s5,LPSTR s6,LPSTR s7,LPSTR s8,LPSTR s9, LPSTR s10)&#39;);<br/><br/><br/>Compiler: Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86<br/><br/>Build Log:<br/><br/> nmake -f Makefile all -nologo<br/> C:\perl\5.16.3\bin\perl.exe C:\Perl\5.16.3\lib\ExtUtils\xsubpp -typemap C:\perl\5.16.3\lib\ExtUtils\typemap Callback.xs &gt; Callback.xsc &amp;&amp; C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e mv -- Callback.xsc Callback.c<br/> cl -c -GS- -nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DUSE_PERLIO -Od -MD -Zi -DDEBUGGING -DVERSION=\&quot;0.76_01\&quot; -DXS_VERSION=\&quot;0.76_01\&quot; &quot;-IC:\perl\5.16.3\lib\CORE&quot; Callback.c<br/>Callback.c<br/>Running Mkbootstrap for Win32::API::Callback ()<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Callback.bs<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Mksymlists -e &quot;Mksymlists(&#39;NAME&#39;=&gt;\&quot;Win32::API::Callback\&quot;, &#39;DLBASE&#39; =&gt; &#39;Callback&#39;, &#39;DL_FUNCS&#39; =&gt; { }, &#39;FUNCLIST&#39; =&gt; [], &#39;IMPORTS&#39; =&gt; { }, &#39;DL_VARS&#39; =&gt; []);&quot;<br/> link -out:..\blib\arch\auto\Win32\API\Callback\Callback.dll -dll -nologo -nodefaultlib -debug -libpath:&quot;c:\perl\5.16.3\lib\CORE&quot; -machine:x86 &quot;/manifestdependency:type=&#39;Win32&#39; name=&#39;Microsoft.Windows.Common-Controls&#39; version=&#39;6.0.0.0&#39; processorArchitecture=&#39;*&#39; publicKeyToken=&#39;6595b64144ccf1df&#39; language=&#39;*&#39;&quot; Callback.obj C:\perl\5.16.3\lib\CORE\perl516.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:Callback.def<br/> Creating library ..\blib\arch\auto\Win32\API\Callback\Callback.lib and object ..\blib\arch\auto\Win32\API\Callback\Callback.exp<br/> if exist ..\blib\arch\auto\Win32\API\Callback\Callback.dll.manifest mt -nologo -manifest ..\blib\arch\auto\Win32\API\Callback\Callback.dll.manifest -outputresource:..\blib\arch\auto\Win32\API\Callback\Callback.dll;2<br/> if exist ..\blib\arch\auto\Win32\API\Callback\Callback.dll.manifest del ..\blib\arch\auto\Win32\API\Callback\Callback.dll.manifest<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 755 ..\blib\arch\auto\Win32\API\Callback\Callback.dll<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e cp -- Callback.bs ..\blib\arch\auto\Win32\API\Callback\Callback.bs<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 644 ..\blib\arch\auto\Win32\API\Callback\Callback.bs<br/> cd ..<br/> C:\perl\5.16.3\bin\perl.exe C:\Perl\5.16.3\lib\ExtUtils\xsubpp -nolinenumbers -typemap C:\perl\5.16.3\lib\ExtUtils\typemap -typemap typemap API.xs &gt; API.xsc &amp;&amp; C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e mv -- API.xsc API.c<br/> cl -c -GS- -nologo -GF -W3 -Od -MD -Zi -DDEBUGGING -DWIN32 -D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERL_TEXTMODE_SCRIPTS -DUSE_PERLIO -Od -MD -Zi -DDEBUGGING -DVERSION=\&quot;0.76_01\&quot; -DXS_VERSION=\&quot;0.76_01\&quot; &quot;-IC:\perl\5.16.3\lib\CORE&quot; API.c<br/>API.c<br/> ml -Zi -c call_asm_x86_msvc.asm<br/>Assembling: call_asm_x86_msvc.asm<br/>Running Mkbootstrap for Win32::API ()<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 644 API.bs<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Mksymlists -e &quot;Mksymlists(&#39;NAME&#39;=&gt;\&quot;Win32::API\&quot;, &#39;DLBASE&#39; =&gt; &#39;API&#39;, &#39;DL_FUNCS&#39; =&gt; { }, &#39;FUNCLIST&#39; =&gt; [], &#39;IMPORTS&#39; =&gt; { }, &#39;DL_VARS&#39; =&gt; []);&quot;<br/> link -out:blib\arch\auto\Win32\API\API.dll -dll -nologo -nodefaultlib -debug -libpath:&quot;c:\perl\5.16.3\lib\CORE&quot; -machine:x86 &quot;/manifestdependency:type=&#39;Win32&#39; name=&#39;Microsoft.Windows.Common-Controls&#39; version=&#39;6.0.0.0&#39; processorArchitecture=&#39;*&#39; publicKeyToken=&#39;6595b64144ccf1df&#39; language=&#39;*&#39;&quot; API.obj call_asm_x86_msvc.obj C:\perl\5.16.3\lib\CORE\perl516.lib oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib -def:API.def<br/> Creating library blib\arch\auto\Win32\API\API.lib and object blib\arch\auto\Win32\API\API.exp<br/> if exist blib\arch\auto\Win32\API\API.dll.manifest mt -nologo -manifest blib\arch\auto\Win32\API\API.dll.manifest -outputresource:blib\arch\auto\Win32\API\API.dll;2<br/> if exist blib\arch\auto\Win32\API\API.dll.manifest del blib\arch\auto\Win32\API\API.dll.manifest<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Win32\API\API.dll<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e cp -- API.bs blib\arch\auto\Win32\API\API.bs<br/> C:\perl\5.16.3\bin\perl.exe -MExtUtils::Command -e chmod -- 644 blib\arch\auto\Win32\API\API.bs<br/><br/><br/><br/><br/>Rainer Keuchel<br/>Entwicklungsleiter<br/>Enterprise Content Management<br/>[cid:imageb271b8.JPG@f9d174aa.46bf0687]<br/>Allgeier IT Solutions GmbH<br/>Hans-Bredow-Str. 60<br/>28307 Bremen<br/><br/>Tel: +49 (421) 43841294<br/>Fax: +49 (421) 438419294<br/>E-Mail: rkeuchel@allgeier.com<br/>Internet: www.allgeier-it.de<br/><br/>ALLGEIER IT SOLUTIONS GmbH<br/>Amtsgericht Bremen | HRB 25242<br/>Gesch&Atilde;&curren;ftsf&Atilde;&frac14;hrer: Hubert Rohrer, Johannes H&Atilde;&curren;ringslack, Ralf Nitzgen<br/>St.-Nr. 71/551/06446 | USt.-ID-Nr. DE114397847<br/>Diese E-Mail enth&Atilde;&curren;lt vertrauliche und/oder rechtlich gesch&Atilde;&frac14;tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrt&Atilde;&frac14;mlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail sind nicht gestattet.<br/>This message (and any associated files) is intended only for the use of bug-Win32-API@rt.cpan.org and may contain information that is confidential, subject to copyright or constitutes a trade secret. If you are not bug-Win32-API@rt.cpan.org you are hereby notified that any dissemination, copying or distribution of this message, or files associated with this message, is strictly prohibited. If you have received this message in error, please notify us immediately by replying to the message and deleting it from your computer. Any views or opinions presented are solely those of the author rkeuchel@allgeier.com and do not necessarily represent those of the company.<br/><br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/03/msg875.html Thu, 28 Mar 2013 17:42:11 +0000 [rt.cpan.org #33513] Handle to std channel broken by the DESTROY method of Win32::Console by Ludovico Stevens via RT Sun Feb 24 11:09:06 2013: Request 33513 was acted upon.<br/>Transaction: Correspondence added by LSTEVENS<br/> Queue: Win32-Console<br/> Subject: Handle to std channel broken by the DESTROY method of Win32::Console<br/> Broken in: (no value)<br/> Severity: (no value)<br/> Owner: Nobody<br/> Requestors: yon.ar.chall@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=33513 &gt;<br/><br/><br/>This issue also causes problems with the use of threads.<br/>If a Win32::Console object exists and a thread is then joined (or<br/>detached) the cloned Win32::Console object in the thread calls the<br/>DESTROY method and renders the Console unuseable thereafter.<br/>The following snippet illustrates; again the &quot;Hello&quot; is not displayed. <br/><br/>_CODE_BEGIN_<br/>use threads;<br/>use Win32::Console;<br/>Win32::Console-&gt;new(Win32::Console::STD_OUTPUT_HANDLE());<br/>$myThread = threads-&gt;create( sub { return } );<br/>$myThread-&gt;join();<br/>print &quot;Hello\n&quot;;<br/>_CODE_END_<br/><br/><br/>I&#39;m using:<br/>Perl version : ActivePerl v5.12.3 (MSWin32-x86-multi-thread), build 1204<br/>OS : Microsoft Windows XP Professional<br/>Module version : Win32::Console 0.09<br/><br/><br/>I had initally fixed this by inserting this line in Console.pm, just<br/>before sub AUTOLOAD:<br/><br/>sub CLONE_SKIP { 1 } # Make module thread safe by not cloning it into<br/>child threads<br/><br/>This ensures that the DESTROY method is only called once per object (and<br/>not every time a clone of the object is destroyed in a thread). In fact<br/>what this does is that it prevents any cloning of Win32::Console into<br/>child threads, which works for me.<br/><br/>However the fix suggested in this bug report by Richard Burkert also<br/>fixes the problem and is more general.<br/><br/>This bug report was raised on module version 0.07 five years ago and now<br/>we are on 0.09.<br/>Any chance this can be fixed in a new version ?<br/>Thanks<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg874.html Sun, 24 Feb 2013 16:09:17 +0000 [rt.cpan.org #83474] test of Win32::LoginName in Names.t fails by Jan Dubois via RT Thu Feb 21 20:39:11 2013: Request 83474 was acted upon.<br/>Transaction: Correspondence added by JDB<br/> Queue: Win32<br/> Subject: test of Win32::LoginName in Names.t fails<br/> Broken in: 0.46<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: CHORNY@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83474 &gt;<br/><br/><br/>Fixed in Win32-0.47<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg873.html Fri, 22 Feb 2013 01:39:19 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Thu Feb 21 08:54:33 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: rejected<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>&gt; I tested the newly released 0.12 of Win32-SystemInfo (<br/>&gt; http://search.cpan.org/~cjohnston/Win32-SystemInfo-0.12/ ). nmake test<br/>and <br/>&gt; __________________________________________<br/>&gt; use Win32::SystemInfo;<br/>&gt; my %mHash = (TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0);<br/>&gt; if (Win32::SystemInfo::MemoryStatus(%mHash)) {0;}<br/>&gt; __________________________________________<br/>&gt; don&#39;t fail anymore as they did in 0.11. So I am closing this bug.<br/><br/>Thanks very much!<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg872.html Thu, 21 Feb 2013 13:54:46 +0000 [rt.cpan.org #83474] test of Win32::LoginName in Names.t fails by Alexandr Ciornii via RT Wed Feb 20 07:11:53 2013: Request 83474 was acted upon.<br/>Transaction: Ticket created by CHORNY<br/> Queue: Win32<br/> Subject: test of Win32::LoginName in Names.t fails<br/> Broken in: 0.46<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: CHORNY@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83474 &gt;<br/><br/><br/>On my smokers I have login with 1 symbol (&#39;c&#39;), so this test fails:<br/>cmp_ok( length($login), &#39;&gt;&#39;, 1, &quot; - checking returned login name&quot; );<br/><br/>-- <br/>Alexandr Ciornii, http://chorny.net<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg871.html Wed, 20 Feb 2013 12:12:01 +0000 [rt.cpan.org #82611] make tool detection broken in Win32::API by Daniel Dragan via RT Wed Feb 20 02:15:34 2013: Request 82611 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: make tool detection broken in Win32::API<br/> Broken in: 0.74, 0.75<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82611 &gt;<br/><br/><br/>On Wed Feb 06 23:28:10 2013, BULKDD wrote:<br/>&gt; Also improve the POD for how to pass NULL, in pack letter mode (NOT<br/>&gt; prototype mode) for a &#39;P&#39;. In prototype mode undef is NULL, but in<br/>&gt; letter mode, 0 is NULL. There is live code (irc conversation) that<br/>&gt; uses<br/>&gt; letter mode 0 for NULL. so dont break back compat see this old ::API<br/>&gt; https://github.com/bulk88/perl5-win32-<br/>&gt; api/blob/067439edfd8fab5bc7f18f5bfb16fe7ff7a75259<br/>&gt; /API.xs#L324<br/><br/><br/>more todo: get public opinions for putting a &quot;scalar(@_) &gt;= 3 &amp;&amp;<br/>scalar(@_) &lt;= 6&quot; sanity check on ctor new(). Reason:<br/>http://perlmonks.org/?node_id=1019723 .<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg870.html Wed, 20 Feb 2013 07:15:44 +0000 [rt.cpan.org #82572] Using Win32.pm on Windows 2012 results in "Unknown Windows version [2:6:2]" warning by Jan Dubois via RT Tue Feb 19 16:21:35 2013: Request 82572 was acted upon.<br/>Transaction: Correspondence added by JDB<br/> Queue: Win32<br/> Subject: Using Win32.pm on Windows 2012 results in &quot;Unknown Windows version [2:6:2]&quot; warning<br/> Broken in: 0.45<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: Thoke@northpeak.org<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82572 &gt;<br/><br/><br/>Fixed in Win32-0.46<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg869.html Tue, 19 Feb 2013 21:21:44 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Daniel Dragan via RT Sat Feb 16 14:10:56 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Fri Feb 15 00:24:06 2013, CJOHNSTON wrote:<br/>&gt; <br/>&gt; So, I don&#39;t blog much and I haven&#39;t fixed my broken contact form. It&#39;s <br/>&gt; taken me a couple of days to build an environment where I could work on <br/>&gt; this since I&#39;ve moved away from Windows.<br/>&gt; <br/>&gt; I&#39;ve updated 48008, but the gist right now is that the changes <br/>&gt; identified fail under ActivePerl. I haven&#39;t even tried any other distros <br/>&gt; yet. I&#39;ve started a feature branch at <br/>&gt; https://github.com/iamthechad/perl-win32-systeminfo/tree/v012 in case <br/>&gt; anybody wants to take a look.<br/><br/>I tested the newly released 0.12 of Win32-SystemInfo (<br/>http://search.cpan.org/~cjohnston/Win32-SystemInfo-0.12/ ). nmake test and <br/>__________________________________________<br/>use Win32::SystemInfo;<br/>my %mHash = (TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0);<br/>if (Win32::SystemInfo::MemoryStatus(%mHash)) {0;}<br/>__________________________________________<br/>don&#39;t fail anymore as they did in 0.11. So I am closing this bug.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg868.html Sat, 16 Feb 2013 19:11:05 +0000 [rt.cpan.org #83375] 64bit counter in cygwin are not reported correctly by Ulrich Herbst via RT Sat Feb 16 11:31:20 2013: Request 83375 was acted upon.<br/>Transaction: Ticket created by UHERBST<br/> Queue: Win32-PerfLib<br/> Subject: 64bit counter in cygwin are not reported correctly<br/> Broken in: 0.06<br/> Severity: Important<br/> Owner: Nobody<br/> Requestors: ulrich.herbst@uherbst.de<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83375 &gt;<br/><br/><br/>If we get big counter (I think: 64bit-integer values) with<br/>GetObjectList, we see just &quot;I64d&quot;, but not a number.<br/>You can reproduce this with the processor script from<br/>http://www.jkrb.de/jmk/showsource.asp?f=data/scripts/processor.pl on a<br/>cygwin installation on XP or Win2008R2.<br/><br/>Reason (I think so):<br/>in PerfLib.xs there are some calls (3 or 4) to sprintf(&quot;%I64d...).<br/>For cygwin and gcc, that should be sprintf(&quot;%ld&quot;...)<br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg867.html Sat, 16 Feb 2013 16:31:28 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Chad Johnston via RT Fri Feb 15 00:24:06 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by CJOHNSTON<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Thu Feb 14 13:56:10 2013, gepebril wrote:<br/>&gt; @bulk88<br/>&gt; <br/>&gt; Thanks for al the time and research.<br/>&gt; <br/>&gt; So What I understand from this webpage:<br/>&gt; https://github.com/iamthechad/perl-win32-systeminfo/issues/1 is that<br/>&gt; iamthechad is the owner of the module and don&#39;t have time any more to<br/>&gt; fix it. It seems if that is the case you can make the specific module<br/>&gt; available for adoption, so somebody else can take over. Sounds like a<br/>&gt; nice solution.<br/>&gt; <br/>&gt; I found that other people have also probs with the 64 bits version<br/>&gt; <br/>&gt; Until this happens I will continue to work on the 32 bits Perl version <br/><br/>So, I don&#39;t blog much and I haven&#39;t fixed my broken contact form. It&#39;s <br/>taken me a couple of days to build an environment where I could work on <br/>this since I&#39;ve moved away from Windows.<br/><br/>I&#39;ve updated 48008, but the gist right now is that the changes <br/>identified fail under ActivePerl. I haven&#39;t even tried any other distros <br/>yet. I&#39;ve started a feature branch at <br/>https://github.com/iamthechad/perl-win32-systeminfo/tree/v012 in case <br/>anybody wants to take a look.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg866.html Fri, 15 Feb 2013 05:24:16 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Thu Feb 14 13:56:10 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>@bulk88<br/><br/>Thanks for al the time and research.<br/><br/>So What I understand from this webpage:<br/>https://github.com/iamthechad/perl-win32-systeminfo/issues/1 is that<br/>iamthechad is the owner of the module and don&#39;t have time any more to<br/>fix it. It seems if that is the case you can make the specific module<br/>available for adoption, so somebody else can take over. Sounds like a<br/>nice solution.<br/><br/>I found that other people have also probs with the 64 bits version<br/><br/>Until this happens I will continue to work on the 32 bits Perl version <br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg865.html Thu, 14 Feb 2013 18:56:21 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Daniel Dragan via RT Wed Feb 13 19:19:32 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Wed Feb 13 12:52:50 2013, BULKDD wrote:<br/>&gt; <br/>&gt; The author of ::SystemInfo last responded in 2009 in the ::SystemInfo<br/>&gt; bug. He will ultimately have to respond to get this mess fixed. He<br/>&gt; doesn&#39;t seem to be around much anymore. His http://www.megatome.com/<br/>&gt; blog&#39;s last post is oct 25 2012 and last CPAN upload 4.5 years ago,<br/>&gt; blog&#39;s contact page is broken http://www.megatome.com/contact/ which<br/>&gt; is<br/>&gt; domain parked to http://visitorcontact.com/embed/1876 but his github<br/>&gt; https://github.com/iamthechad?tab=activity had a push 2 days ago so<br/>&gt; there is some hope. Im filing a github bug ticket to try to contact<br/>&gt; him.<br/>&gt; <br/>&gt; <br/><br/>The module is basically abandoned according to<br/>https://github.com/iamthechad/perl-win32-systeminfo/issues/1#issuecomment-13513853<br/>. So what do you want to do? CCing possibly interested people also.<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg864.html Thu, 14 Feb 2013 00:19:46 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Daniel Dragan via RT Wed Feb 13 12:52:50 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Wed Feb 13 06:12:08 2013, gepebril wrote:<br/>&gt; Tobyink has mentioned regarding this issue:<br/>&gt; - That particular message usually comes from using a sub designed to be<br/>&gt; used as an object method as a class method instead. -<br/>&gt; For more info: http://www.perlmonks.org/?node_id=1017850<br/><br/>the failure comes from &quot;$MEMORYSTATUSEX-&gt;{dwLength} =<br/>Win32::API::Struct-&gt;sizeof($MEMORYSTATUSEX);&quot; which was added in<br/>https://github.com/iamthechad/perl-win32-systeminfo/commit/6d1264e1899a54f1ec518ec1db4be8ea133401b3<br/>The reason it works on 32 bits is because 2 different paths are taken in<br/>::SystemInfo, starting at<br/>https://github.com/iamthechad/perl-win32-systeminfo/blob/e311b78194335a8cfedf8951f495264072f0161d/SystemInfo.pm#L121<br/>.<br/><br/>Looking at Win32::API&#39;s docs, its unclear in ::Type and ::Struct&#39;s POD<br/>what is an object method and what is a class method. I looked in ::API&#39;s<br/>test kit and all ::Struct::sizeof calls were on objects not classes. The<br/>problem in ::SystemInfo on x64 is already covered by<br/>https://rt.cpan.org/Ticket/Display.html?id=48008 . So what do you want<br/>me to do? Add class method support to the ::Struct::sizeof method, or<br/>improve the POD and say its object method only?<br/><br/>The author of ::SystemInfo last responded in 2009 in the ::SystemInfo<br/>bug. He will ultimately have to respond to get this mess fixed. He<br/>doesn&#39;t seem to be around much anymore. His http://www.megatome.com/<br/>blog&#39;s last post is oct 25 2012 and last CPAN upload 4.5 years ago,<br/>blog&#39;s contact page is broken http://www.megatome.com/contact/ which is<br/>domain parked to http://visitorcontact.com/embed/1876 but his github<br/>https://github.com/iamthechad?tab=activity had a push 2 days ago so<br/>there is some hope. Im filing a github bug ticket to try to contact him.<br/><br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg863.html Wed, 13 Feb 2013 17:53:01 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Wed Feb 13 06:12:08 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>Tobyink has mentioned regarding this issue:<br/>- That particular message usually comes from using a sub designed to be<br/>used as an object method as a class method instead. -<br/>For more info: http://www.perlmonks.org/?node_id=1017850<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg862.html Wed, 13 Feb 2013 11:12:20 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Wed Feb 13 06:04:28 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>&gt; I reproduced it (&quot;Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref<br/>&gt; while &quot;strict refs&quot;&quot;) only on x64 Perl with a nmake test. 32 bit Perl<br/>&gt; passed an nmake test. Win32::API is supposed to support x64 as good as<br/>&gt; 32 bits. If the user&#39;s app that uses Win32::API is written *correctly*,<br/>&gt; his app will work transparently on x64 and 32 bit. I will investigate it<br/>&gt; further tomorrow.<br/><br/>Aha, thanks for taking the time to try to reproduce it. Good news. A bug<br/>is bug when it can be reproduced. I used the sample from the Cpan module<br/>Win32::SystemInfo so that part should be correctly. Or are you referring<br/>to Win:System32Info that is not using Win32::API correctly?<br/> <br/>&gt; Google &quot;perl make test&quot; no quotes. I specifically used nmake (not make)<br/>&gt; since I use Visual C, not Cygwin/Linux.<br/>Ok, I forgot. You have to use make when you don&#39;t use cpan -&gt; install<br/>but download the module manually. As for the last two years everything<br/>with Perl went so smoothly I stopped using it.<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg861.html Wed, 13 Feb 2013 11:04:41 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Daniel Dragan via RT Wed Feb 13 02:44:43 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Tue Feb 12 15:57:54 2013, gepebril wrote:<br/>&gt; I will check it hopefully tomorrow.<br/>&gt; <br/>&gt; Yup the problem didn&#39;t occur in the 32 bits (latest) version of Perl<br/>&gt; Strawberry. Should Win32::SystemInfo be compatible with the 64 release<br/>&gt; of Strawberry Perl?<br/><br/>I reproduced it (&quot;Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref<br/>while &quot;strict refs&quot;&quot;) only on x64 Perl with a nmake test. 32 bit Perl<br/>passed an nmake test. Win32::API is supposed to support x64 as good as<br/>32 bits. If the user&#39;s app that uses Win32::API is written *correctly*,<br/>his app will work transparently on x64 and 32 bit. I will investigate it<br/>further tomorrow.<br/><br/>On Mon Feb 11 17:41:59 2013, gepebril wrote:<br/>&gt; Thanks for the reply and testing.<br/>&gt; <br/>&gt; &gt; So what is the failing code? I tried a &quot;make test&quot; on Win32:SystemInfo<br/>&gt; &gt; and it passed. I also tried<br/>&gt; I never done this make test, do you have the cli how to test that?<br/><br/>Google &quot;perl make test&quot; no quotes. I specifically used nmake (not make)<br/>since I use Visual C, not Cygwin/Linux.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg860.html Wed, 13 Feb 2013 07:44:51 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Tue Feb 12 15:57:54 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>I will check it hopefully tomorrow.<br/><br/>Yup the problem didn&#39;t occur in the 32 bits (latest) version of Perl<br/>Strawberry. Should Win32::SystemInfo be compatible with the 64 release<br/>of Strawberry Perl?<br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg859.html Tue, 12 Feb 2013 20:58:02 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Mon Feb 11 17:41:59 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>Thanks for the reply and testing.<br/><br/>&gt; So what is the failing code? I tried a &quot;make test&quot; on Win32:SystemInfo<br/>&gt; and it passed. I also tried<br/>I never done this make test, do you have the cli how to test that?<br/><br/>&gt; and saw nothing (like warnings/dies) in console. Using ::API 0.75 on<br/>&gt; 32bit winxp.<br/>I tried to replicate my old environment with autobundle and it worked,<br/>but not for the Win32::SystemInfo module. It mentioned I could only<br/>install it with force. I just found out that my old environment is <br/>5.12.3.0-32bit and not 5.12.3.0-64bit which I used on the new<br/>environment. The problem only occurs on the new environment. I run on<br/>both environments Win7 64 bits. So early conclusion is that the problem<br/>only occurs on 64 bits versions of Strawberry Perl, not on the 32 bits<br/>version. I will check it hopefully tomorrow.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg858.html Mon, 11 Feb 2013 22:42:07 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Daniel Dragan via RT Sun Feb 10 14:49:15 2013: Request 83237 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>On Sat Feb 09 09:27:24 2013, gepebril wrote:<br/>&gt; Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict<br/>&gt; refs&quot; in use at C:/strawberry/perl/vendor/lib/Win32/A PI/Struct.pm line<br/>&gt; 158. Had to use force to install Win32:SystemInfo module. my %mHash =<br/>&gt; (TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0); if<br/>&gt; (Win32::SystemInfo::MemoryStatus(%mHash)) # Failes on this line!!<br/>&gt; Problem wasn&#39;t there with 0.62 Thanks in advance<br/>&gt; <br/>&gt; Same as last bug, I just noticed that there was no subject and that I<br/>&gt; could upgrade from 0,73-&gt;0,75 and haven&#39;t figured out a way to remove<br/>&gt; the last entry<br/><br/>So what is the failing code? I tried a &quot;make test&quot; on Win32:SystemInfo<br/>and it passed. I also tried<br/>___________________________________________________________<br/>use Win32::SystemInfo;<br/>my %mHash = (TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0);<br/>if (Win32::SystemInfo::MemoryStatus(%mHash)) {0;}<br/>___________________________________________________________<br/>and saw nothing (like warnings/dies) in console. Using ::API 0.75 on<br/>32bit winxp.<br/><br/>Also<br/>______________________________________________________________________<br/>C:\Documents and Settings\Owner\Desktop\cpan libs\w32si&gt;perl test.pl<br/>1..3<br/>ok 1<br/>ok 2<br/>ok 3<br/><br/>C:\Documents and Settings\Owner\Desktop\cpan libs\w32si&gt;<br/>______________________________________________________________________<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg857.html Sun, 10 Feb 2013 19:49:24 +0000 [rt.cpan.org #83237] Can't use string ("Win32::API::Struct") as a HASH ref while "strict refs" by Albert via RT Sat Feb 09 09:27:24 2013: Request 83237 was acted upon.<br/>Transaction: Ticket created by gepebril<br/> Queue: Win32-API<br/> Subject: Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while<br/> &quot;strict refs&quot;<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83237 &gt;<br/><br/><br/>Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict<br/>refs&quot; in use at C:/strawberry/perl/vendor/lib/Win32/A PI/Struct.pm line<br/>158. Had to use force to install Win32:SystemInfo module. my %mHash =<br/>(TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0); if<br/>(Win32::SystemInfo::MemoryStatus(%mHash)) # Failes on this line!!<br/>Problem wasn&#39;t there with 0.62 Thanks in advance<br/><br/>Same as last bug, I just noticed that there was no subject and that I<br/>could upgrade from 0,73-&gt;0,75 and haven&#39;t figured out a way to remove<br/>the last entry<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg856.html Sat, 09 Feb 2013 14:27:31 +0000 [rt.cpan.org #83236] by Albert via RT Sat Feb 09 09:16:50 2013: Request 83236 was acted upon.<br/>Transaction: Ticket created by gepebril<br/> Queue: Win32-API<br/> Subject: (No subject given)<br/> Broken in: 0.73<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: compuvision.sr@gmail.com<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83236 &gt;<br/><br/><br/>Can&#39;t use string (&quot;Win32::API::Struct&quot;) as a HASH ref while &quot;strict<br/>refs&quot; in use at C:/strawberry/perl/vendor/lib/Win32/A<br/>PI/Struct.pm line 158.<br/><br/><br/>Had to use force to install Win32:SystemInfo module.<br/>my %mHash = (TotalPhys =&gt; 0, AvailPhys =&gt; 0, MemLoad =&gt; 0);<br/>if (Win32::SystemInfo::MemoryStatus(%mHash)) # Failes on this line!!<br/><br/>Problem wasn&#39;t there with 0.62<br/><br/>Thanks in advance<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg855.html Sat, 09 Feb 2013 14:16:59 +0000 [rt.cpan.org #83191] Win32::API doesn't keep C stack aligned on x64 by Daniel Dragan via RT Thu Feb 07 03:04:29 2013: Request 83191 was acted upon.<br/>Transaction: Ticket created by BULKDD<br/> Queue: Win32-API<br/> Subject: Win32::API doesn&#39;t keep C stack aligned on x64<br/> Broken in: 0.75<br/> Severity: Important<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=83191 &gt;<br/><br/><br/>After a long IRC conversation with someone with a x64 Win 7 machine,<br/>with Strawberry Perl and Mingw compiled API:: DLL. It was found that a<br/>crash occurred when a movdqa was executed to save a XMM reg in a delay<br/>loading DLL tailmerge. movdqa requires an aligned memory address. It was<br/>found that (rsp+0x20)%16 == 8, unaligned. Adding an extra 0 param to the<br/>prototype passed to C fixed the crash confirming the unalignment of the<br/>C stack when there are 5 args with Win32::API.<br/><br/>before.<br/>____________________________________________________________________<br/>my $acquireCtx = Win32::API-&gt;new(&#39;advapi32&#39;, &#39;CryptAcquireContext&#39;,<br/>&#39;PPPNN&#39;, &#39;I&#39;) or die;<br/>$acquireCtx-&gt;Call($ctx, 0, 0, 1, hex(&#39;40&#39;) | hex(&#39;F0000000&#39;)) or die<br/>&quot;CryptAcquireContext failed&quot;;<br/>____________________________________________________________________<br/>after<br/>____________________________________________________________________<br/>my $acquireCtx = Win32::API-&gt;new(&#39;advapi32&#39;, &#39;CryptAcquireContext&#39;,<br/>&#39;PPPNNN&#39;, &#39;I&#39;) or die;<br/>$acquireCtx-&gt;Call($ctx, 0, 0, 1, hex(&#39;40&#39;) | hex(&#39;F0000000&#39;), 0) or die<br/>&quot;CryptAcquireContext failed&quot;;<br/>____________________________________________________________________<br/>fixed the crash. Now this fix would crash on 32 bit due to stdcall.<br/><br/>____________________________________________________________________<br/>__tailMerge_CRYPTSP_dll:<br/>000007FEFE6FDC70 48 89 4C 24 08 mov qword ptr [rsp+8],rcx <br/>000007FEFE6FDC75 48 89 54 24 10 mov qword ptr [rsp+10h],rdx <br/>000007FEFE6FDC7A 4C 89 44 24 18 mov qword ptr [rsp+18h],r8 <br/>000007FEFE6FDC7F 4C 89 4C 24 20 mov qword ptr [rsp+20h],r9 <br/>000007FEFE6FDC84 48 83 EC 68 sub rsp,68h <br/>000007FEFE6FDC88 66 0F 7F 44 24 20 movdqa xmmword ptr<br/>[rsp+20h],xmm0 ;crash here<br/>000007FEFE6FDC8E 66 0F 7F 4C 24 30 movdqa xmmword ptr<br/>[rsp+30h],xmm1 <br/>000007FEFE6FDC94 66 0F 7F 54 24 40 movdqa xmmword ptr<br/>[rsp+40h],xmm2 <br/>000007FEFE6FDC9A 66 0F 7F 5C 24 50 movdqa xmmword ptr<br/>[rsp+50h],xmm3 <br/>000007FEFE6FDCA0 48 8B D0 mov rdx,rax <br/>000007FEFE6FDCA3 48 8D 0D 5E E1 08 00 lea <br/>rcx,[__DELAY_IMPORT_DESCRIPTOR_CRYPTSP_dll (7FEFE78BE08h)] <br/>000007FEFE6FDCAA E8 01 DA 00 00 call __delayLoadHelper2<br/>(7FEFE70B6B0h) <br/>000007FEFE6FDCAF 66 0F 6F 44 24 20 movdqa xmm0,xmmword ptr<br/>[rsp+20h] <br/>000007FEFE6FDCB5 66 0F 6F 4C 24 30 movdqa xmm1,xmmword ptr<br/>[rsp+30h] <br/>000007FEFE6FDCBB 66 0F 6F 54 24 40 movdqa xmm2,xmmword ptr<br/>[rsp+40h] <br/>000007FEFE6FDCC1 66 0F 6F 5C 24 50 movdqa xmm3,xmmword ptr<br/>[rsp+50h] <br/>000007FEFE6FDCC7 48 8B 4C 24 70 mov rcx,qword ptr [rsp+70h] <br/>000007FEFE6FDCCC 48 8B 54 24 78 mov rdx,qword ptr [rsp+78h] <br/>000007FEFE6FDCD1 4C 8B 84 24 80 00 00 00 mov r8,qword ptr<br/>[rsp+80h] <br/>000007FEFE6FDCD9 4C 8B 8C 24 88 00 00 00 mov r9,qword ptr<br/>[rsp+88h] <br/>000007FEFE6FDCE1 48 83 C4 68 add rsp,68h <br/>000007FEFE6FDCE5 EB 00 jmp <br/>__tailMerge_CRYPTSP_dll+77h (7FEFE6FDCE7h) <br/>000007FEFE6FDCE7 FF E0 jmp rax <br/>000007FEFE6FDCE9 90 nop <br/>000007FEFE6FDCEA 90 nop <br/>000007FEFE6FDCEB 90 nop <br/>000007FEFE6FDCEC 90 nop <br/>000007FEFE6FDCED 90 nop <br/>000007FEFE6FDCEE 90 nop<br/>______________________________________________________________________<br/><br/>This delay loading of cryptsp.dll doesn&#39;t happen on my x64 Server 2003<br/>machine (I can&#39;t reproduce this crash), but due to MS&#39;s reorganization<br/>of DLLs over the last couple years, in Win 7 CryptAcquireContext is not<br/>implemented in advapi32.dll anymore but in cryptsp.dll. MS requires C<br/>stack to be 16 bytes aligned on Win64 for ABI.<br/><br/>I am creating this ticket as a reminder to myself.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg854.html Thu, 07 Feb 2013 08:04:37 +0000 [rt.cpan.org #82611] make tool detection broken in Win32::API by Daniel Dragan via RT Wed Feb 06 23:28:10 2013: Request 82611 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: make tool detection broken in Win32::API<br/> Broken in: 0.74, 0.75<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82611 &gt;<br/><br/><br/>On Mon Feb 04 01:43:52 2013, BULKDD wrote:<br/>&gt; On Tue Jan 22 14:41:02 2013, BULKDD wrote:<br/>&gt; &gt; <br/>&gt; &gt; After discussion with Mithaldu/smoker owner above, {MAKE} is<br/>&gt; &gt; &#39;C:\Perl\site\bin\dmake.exe&#39;, not &#39;dmake.exe&#39; on his machine.<br/>&gt; &gt; MM_Win32.pm has a is_make_type method which uses a more elaborate RE to<br/>&gt; &gt; do it. Using is_make_type will probably be the solution. Remaining<br/>&gt; &gt; issues are, is_make_type is not public API of EUMM (embedding the RE is<br/>&gt; &gt; the alternative), and testing the whole thing on VC Perl, S Perl and Cyg<br/>&gt; &gt; Perl.<br/>&gt; <br/>&gt; Also remove the Encode:: dependency in makefile.pl, add a dependency on<br/>&gt; Encode::compat, on 5.8 and newer on Win32 Encode::compat passes,<br/>&gt; http://www.cpantesters.org/distro/E/Encode-compat.html . So this might<br/>&gt; have Perl 5.6 reports show up in cpantesters for Win32::API. Also add <br/>&gt; skipping the native threads with API::Callback threads test that crashes<br/>&gt; on 5.6.<br/><br/><br/>Also improve the POD for how to pass NULL, in pack letter mode (NOT<br/>prototype mode) for a &#39;P&#39;. In prototype mode undef is NULL, but in<br/>letter mode, 0 is NULL. There is live code (irc conversation) that uses<br/>letter mode 0 for NULL. so dont break back compat see this old ::API<br/>https://github.com/bulk88/perl5-win32-api/blob/067439edfd8fab5bc7f18f5bfb16fe7ff7a75259<br/>/API.xs#L324<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg853.html Thu, 07 Feb 2013 04:28:20 +0000 [rt.cpan.org #82611] make tool detection broken in Win32::API by Daniel Dragan via RT Mon Feb 04 01:43:52 2013: Request 82611 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: make tool detection broken in Win32::API<br/> Broken in: 0.74, 0.75<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82611 &gt;<br/><br/><br/>On Tue Jan 22 14:41:02 2013, BULKDD wrote:<br/>&gt; <br/>&gt; After discussion with Mithaldu/smoker owner above, {MAKE} is<br/>&gt; &#39;C:\Perl\site\bin\dmake.exe&#39;, not &#39;dmake.exe&#39; on his machine.<br/>&gt; MM_Win32.pm has a is_make_type method which uses a more elaborate RE to<br/>&gt; do it. Using is_make_type will probably be the solution. Remaining<br/>&gt; issues are, is_make_type is not public API of EUMM (embedding the RE is<br/>&gt; the alternative), and testing the whole thing on VC Perl, S Perl and Cyg<br/>&gt; Perl.<br/><br/>Also remove the Encode:: dependency in makefile.pl, add a dependency on<br/>Encode::compat, on 5.8 and newer on Win32 Encode::compat passes,<br/>http://www.cpantesters.org/distro/E/Encode-compat.html . So this might<br/>have Perl 5.6 reports show up in cpantesters for Win32::API. Also add <br/>skipping the native threads with API::Callback threads test that crashes<br/>on 5.6.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/02/msg852.html Mon, 04 Feb 2013 06:44:02 +0000 [rt.cpan.org #82611] make tool detection broken in Win32::API by Daniel Dragan via RT Tue Jan 22 14:41:02 2013: Request 82611 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: make tool detection broken in Win32::API<br/> Broken in: 0.74, 0.75<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: BULKDD@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82611 &gt;<br/><br/><br/>On Thu Jan 10 02:26:07 2013, BULKDD wrote:<br/>&gt; see<br/>&gt;<br/>http://www.cpantesters.org/cpan/report/621df9ed-7059-1014-86e5-1b72d871b27e<br/>&gt;<br/>http://www.cpantesters.org/cpan/report/9af18357-71e1-1014-8cab-46ee168fd208<br/>&gt; <br/>&gt; somehow<br/>&gt; _______________________________________<br/>&gt; sub MY::post_constants {<br/>&gt; return &#39;CCFLAGS &#39;.($_[0]-&gt;{MAKE} =~ /^make/ || $_[0]-&gt;{MAKE} =~<br/>&gt; /^dmake/ ? &#39;:=&#39; : &#39;=&#39;)<br/>&gt; . &#39; $(CCFLAGS) &#39;.GS_flag().&quot;\n&quot;;<br/>&gt; }<br/>&gt; ________________________________________<br/>&gt; <br/>&gt; isn&#39;t working correctly.<br/><br/>After discussion with Mithaldu/smoker owner above, {MAKE} is<br/>&#39;C:\Perl\site\bin\dmake.exe&#39;, not &#39;dmake.exe&#39; on his machine.<br/>MM_Win32.pm has a is_make_type method which uses a more elaborate RE to<br/>do it. Using is_make_type will probably be the solution. Remaining<br/>issues are, is_make_type is not public API of EUMM (embedding the RE is<br/>the alternative), and testing the whole thing on VC Perl, S Perl and Cyg<br/>Perl.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg851.html Tue, 22 Jan 2013 19:41:15 +0000 [rt.cpan.org #82879] Obsolete source repository by Cosimo Streppone via RT Tue Jan 22 10:42:51 2013: Request 82879 was acted upon.<br/>Transaction: Correspondence added by COSIMO<br/> Queue: Win32-API<br/> Subject: Obsolete source repository<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: dolmen@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82879 &gt;<br/><br/><br/>Thanks for the report.<br/>Repository was updated as requested.<br/>I had tried to do that already, but merge caused conflicts, so it wasn&#39;t <br/>a 1 minute operation.<br/><br/>Done now.<br/><br/><br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg850.html Tue, 22 Jan 2013 15:43:00 +0000 [rt.cpan.org #82879] Obsolete source repository by Olivier Mengué via RT Tue Jan 22 05:03:48 2013: Request 82879 was acted upon.<br/>Transaction: Ticket created by DOLMEN<br/> Queue: Win32-API<br/> Subject: Obsolete source repository<br/> Broken in: 0.75<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: dolmen@cpan.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82879 &gt;<br/><br/><br/>In META.yml/Makefile.PL the source repository is listed as being:<br/>https://github.com/cosimo/perl5-win32-api<br/><br/>But this repo has not been updated for 3 months while some new releases<br/>appeared on CPAN.<br/><br/>Please, either push to the repo or remove the invalid meta.<br/><br/>-- <br/>Olivier Mengu&Atilde;&copy; - http://perlresume.org/DOLMEN<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg849.html Tue, 22 Jan 2013 10:03:57 +0000 [rt.cpan.org #82572] Using Win32.pm on Windows 2012 results in "Unknown Windows version [2:6:2]" warning by Steve Hay via RT Wed Jan 16 03:55:32 2013: Request 82572 was acted upon.<br/>Transaction: Correspondence added by SHAY<br/> Queue: Win32<br/> Subject: Using Win32.pm on Windows 2012 results in &quot;Unknown Windows version [2:6:2]&quot; warning<br/> Broken in: 0.45<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: Thoke@northpeak.org<br/> Status: new<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=82572 &gt;<br/><br/><br/>See also ticket #116352 on rt.perl.org regarding the same problem with<br/>Windows 8:<br/><br/>https://rt.perl.org/rt3/Ticket/Display.html?id=116352<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg848.html Wed, 16 Jan 2013 08:55:40 +0000 [rt.cpan.org #72018] When used with Selenium IE Driver (64-bit), this module crashes by Daniel Dragan via RT Tue Jan 15 21:20:21 2013: Request 72018 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: When used with Selenium IE Driver (64-bit), this module crashes<br/> Broken in: 0.64<br/> Severity: Critical<br/> Owner: Nobody<br/> Requestors: aivaturi@cpan.org<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=72018 &gt;<br/><br/><br/>On Tue Jan 08 22:55:20 2013, BULKDD wrote:<br/>&gt; On Fri Oct 19 01:27:10 2012, BULKDD wrote:<br/>&gt; &gt; On Fri Oct 28 14:37:58 2011, AIVATURI wrote:<br/>&gt; &gt; &gt; I&#39;m trying to implement Selenium IE Driver bindings in Perl. This<br/>&gt; module <br/>&gt; &gt; &gt; works fine under 32-bit mode but in 64-bit mode it crashes with<br/>the 64-<br/>&gt; &gt; &gt; bit IE dll. <br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; My environment:<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; OS: Windows 7 64-bit<br/>&gt; &gt; &gt; Perl: ActivePerl 64-bit v5.10<br/>&gt; &gt; &gt; Win32::API v0.64 <br/>&gt; &gt; &gt; Selenium IE Driver DLL: <br/>&gt; &gt; &gt;<br/>http://selenium.googlecode.com/svn/trunk/cpp/prebuilt/x64/Release/IEDriv<br/>&gt; &gt; &gt; er.dll<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Here are the steps to reproduce:<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; 1) Download the IEDriver.dll from the link above.<br/>&gt; &gt; &gt; 2) Use this script to start a simple IE Driver server:<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; use strict;<br/>&gt; &gt; &gt; use warnings;<br/>&gt; &gt; &gt; use Win32::API;<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; my $start = Win32::API-&gt;new(&#39;IEDriver.dll&#39;, &#39;StartServer&#39;, &#39;I&#39;, &#39;P&#39;, <br/>&gt; &gt; &gt; &#39;_cdecl&#39;);<br/>&gt; &gt; &gt; my $server = $start-&gt;Call(4444);<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; BTW, this same script on a 32-bit Windows with Perl (32-bit) &amp; <br/>&gt; &gt; &gt; Win32::API works as expected. The crash happens only in Perl<br/>64-bit on <br/>&gt; &gt; &gt; Windows 7. <br/>&gt; &gt; <br/>&gt; &gt; Can you try the latest version of Win32::API 0.72 from CPAN and see if<br/>&gt; &gt; it fixes your problem?<br/>&gt; <br/>&gt; Try 2. The current version is 0.74 on CPAN.<br/><br/>No answer. Closing.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg847.html Wed, 16 Jan 2013 02:20:29 +0000 [rt.cpan.org #42694] Callback and Structs by Daniel Dragan via RT Thu Jan 10 02:32:12 2013: Request 42694 was acted upon.<br/>Transaction: Correspondence added by BULKDD<br/> Queue: Win32-API<br/> Subject: Callback and Structs<br/> Broken in: 0.58<br/> Severity: Normal<br/> Owner: Nobody<br/> Requestors: msjuniorc@hotmail.com<br/> Status: open<br/> Ticket &lt;URL: https://rt.cpan.org/Ticket/Display.html?id=42694 &gt;<br/><br/><br/>On Tue Jan 08 22:57:15 2013, BULKDD wrote:<br/>&gt; On Fri Oct 19 04:19:35 2012, BULKDD wrote:<br/>&gt; &gt; On Thu Jan 22 21:13:41 2009, juniorc wrote:<br/>&gt; &gt; &gt; Cosimo,<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; I am currently writing a Win32::Video::Capture module making calls to<br/>&gt; &gt; &gt; avicap32.dll. Several &quot;messages&quot; require the use of &quot;structs&quot; and<br/>&gt; &gt; &gt; &quot;callbacks&quot;. Thank to the &quot;callback3.pl&quot; example in the sample<br/>&gt; &gt; &gt; directory, it was clear how to use nested structs in a callback<br/>&gt; &gt; &gt; environment. Unfortunately both in my own code and the aforementioned<br/>&gt; &gt; &gt; example I encure repetitive errors: &quot;Attempt to free unreferenced<br/>&gt; &gt; &gt; scalar&quot;. More details in the logs below.<br/>&gt; &gt; &gt; At the current time and in order to proceed without the<br/>&gt; &gt; &gt; Win32::API::Struct, I am using the Win32::API::Callback and a few<br/>calls<br/>&gt; &gt; &gt; to the &quot;RtlMoveMemory&quot; and &quot;lstrcpy&quot; functions of the kernel32.dll.<br/>&gt; &gt; &gt; Although this work without any issues, I have to say the approach<br/>lacks<br/>&gt; &gt; &gt; the &quot;elegance &amp; readability&quot; that the use of Win32::API::Struct would<br/>&gt; &gt; &gt; give. It seems that there might be an &quot;extra&quot; call to a<br/>&quot;sv_2mortal&quot; in<br/>&gt; &gt; &gt; the XS portion. Is there anything i can do on my end to help?<br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Thank you in advance, <br/>&gt; &gt; &gt; <br/>&gt; &gt; &gt; Giuseppe &quot;Jr.&quot;<br/>&gt; &gt; <br/>&gt; &gt; Can you try the latest CPAN version of Win32::API (0.72) and report how<br/>&gt; &gt; it works for you?<br/>&gt; <br/>&gt; Try 2. The current version is 0.74 on CPAN. <br/><br/>Closing no response. Struct got some improvements and bug fixes in 2012,<br/>so maybe one of them would have fixed the problems claimed by the OP.<br/> http://www.nntp.perl.org/group/perl.libwin32/2013/01/msg846.html Thu, 10 Jan 2013 07:32:21 +0000