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

Park Heesob phasis at gmail.com
Wed Dec 31 09:36:59 EST 2008


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!

Regards,

Park Heesob




More information about the win32utils-devel mailing list