Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[rt.cpan.org #42694] Callback and Structs

4 views
Skip to first unread message

Daniel Dragan via RT

unread,
Oct 19, 2012, 4:19:36 AM10/19/12
to libw...@perl.org
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: msju...@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?

Daniel Dragan via RT

unread,
Jan 8, 2013, 10:57:17 PM1/8/13
to libw...@perl.org
Tue Jan 08 22:57:15 2013: 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: msju...@hotmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42694 >


On Fri Oct 19 04:19:35 2012, BULKDD wrote:
> 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?

Try 2. The current version is 0.74 on CPAN.

Daniel Dragan via RT

unread,
Jan 10, 2013, 2:32:13 AM1/10/13
to libw...@perl.org
Thu Jan 10 02:32:12 2013: 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: msju...@hotmail.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=42694 >


Closing no response. Struct got some improvements and bug fixes in 2012,
so maybe one of them would have fixed the problems claimed by the OP.
0 new messages