[Win32utils-devel] [ win32utils-Support Requests-23395] EnumChildWindows and EnumWindowsProc with win32-api-1.2.2

Berger, Daniel Daniel.Berger at qwest.com
Wed Dec 31 12:24:19 EST 2008


 

> -----Original Message-----
> From: win32utils-devel-bounces at rubyforge.org 
> [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of 
> Park Heesob
> Sent: Wednesday, December 31, 2008 7:37 AM
> To: Development and ideas for win32utils projects
> Subject: Re: [Win32utils-devel] [ win32utils-Support 
> Requests-23395] EnumChildWindows and EnumWindowsProc with 
> win32-api-1.2.2
> 
> Hi,
> ----- Original Message -----
> From: "Daniel Berger" <djberg96 at gmail.com>
> To: "Development and ideas for win32utils projects" 
> <win32utils-devel at rubyforge.org>
> Sent: Wednesday, December 31, 2008 8:08 PM
> Subject: Re: [Win32utils-devel] [ win32utils-Support 
> Requests-23395 ] EnumChildWindows and EnumWindowsProc with 
> win32-api-1.2.2
> 
> 
> > Hi,
> >
> >> My program doesn't work normally with win32-api-1.2.2.
> >> There was no problem with win32-api-1.2.0.
> >
> > <snip>
> >
> > Yep, he's right. With 1.2.0 I get this:
> >
> > c:\Users\djberge\workspace\ruby-foo\win32>ruby api_test.rb "1.2.0"
> > ["", "TrayNotifyWnd"]
> > ["4:03 AM", "TrayClockWClass"]
> > ["", "SysPager"]
> > ["Notification Area", "ToolbarWindow32"] ["", "SysPager"] ["System 
> > Control Area", "ToolbarWindow32"] ["", "Button"] ["", 
> "ReBarWindow32"] 
> > ["Quick Launch", "ToolbarWindow32"] ["Running Applications", 
> > "MSTaskSwWClass"] ["Running Applications", "ToolbarWindow32"]
> >
> > With 1.2.2 I get this:
> >
> > c:\Users\djberge\workspace\ruby-foo\win32>ruby api_test.rb "1.2.2"
> > 0x1ca2b8 is not id value
> >
> > Any ideas?
> >
> Sorry. It is a bug due to my modification of callback support.
> Here is the patch for api.c
> ==============================================
> @@ -671,6 +671,7 @@
>     Win32API* ptr;
>     unsigned long return_value;
>     int i = 0;
> +   int len;
> 
>     struct{
>        unsigned long params[20];
> @@ -695,8 +696,8 @@
>           );
>        }
>     }
> -
> -   for(i = 0; i < RARRAY(v_proto)->len; i++){
> +   len = RARRAY(v_proto)->len;
> +   for(i = 0; i < len; i++){
>        v_arg = RARRAY(v_args)->ptr[i];
> 
>        /* Convert nil to NULL.  Otherwise convert as 
> appropriate. */ ==================================================
> 
> Happy New Year!

Yep, that worked, thanks. Committed to CVS.

Happy New Year to you, too!

Dan


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


More information about the win32utils-devel mailing list