Fri Oct 19 04:19:35 2012: Request 42694 was acted upon.
Transaction: Correspondence added by BULKDD
       Queue: Win32-API
     Subject: Callback and Structs
   Broken in: 0.58
    Severity: Normal
       Owner: Nobody
  Requestors: msjuni...@hotmail.com
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42694 >


On Thu Jan 22 21:13:41 2009, juniorc wrote:
> Cosimo,
> 
> I am currently writing a Win32::Video::Capture module making calls to
> avicap32.dll. Several "messages" require the use of "structs" and
> "callbacks". Thank to the "callback3.pl" example in the sample
> directory, it was clear how to use nested structs in a callback
> environment. Unfortunately both in my own code and the aforementioned
> example I encure repetitive errors: "Attempt to free unreferenced
> scalar".  More details in the logs below.
> At the current time and in order to proceed without the
> Win32::API::Struct, I am using the Win32::API::Callback and a few calls
> to the "RtlMoveMemory" and "lstrcpy" functions of the kernel32.dll.
> Although this work without any issues, I have to say the approach lacks
> the "elegance & readability" that the use of Win32::API::Struct would
> give.  It seems that there might be an "extra" call to a "sv_2mortal" in
> the XS portion. Is there anything i can do on my end to help?
> 
> Thank you in advance, 
> 
> Giuseppe "Jr."

Can you try the latest CPAN version of Win32::API (0.72) and report how
it works for you?

Reply via email to