[Win32utils-devel] win32-daemon 0.6.1 problem

Heesob Park phasis at gmail.com
Thu Nov 6 09:19:50 EST 2008


2008/11/6 Berger, Daniel <Daniel.Berger at qwest.com>:
> Hi,
>
>> Patch for win32-api/ext/win32/api.c
>> --- api.c.old   2008-11-03 00:25:46.000000000 +0900
>> +++ api.c       2008-11-03 00:25:05.000000000 +0900
>> @@ -12,6 +12,7 @@
>>  #define _T_STRING   5
>>
>>  VALUE cAPIError, cCallbackError;
>> +static VALUE ActiveCallback = Qnil;
>>
>>  typedef struct {
>>      HANDLE library;
>> @@ -109,6 +110,7 @@
>>   */
>>  static VALUE callback_init(int argc, VALUE* argv, VALUE self)  {
>> +   extern void *CallbackTable[];
>>     VALUE v_proto, v_return, v_proc;
>>     int i;
>>
>> @@ -131,6 +133,8 @@
>>     rb_iv_set(self, "@function", v_proc);
>>     rb_iv_set(self, "@prototype", v_proto);
>>     rb_iv_set(self, "@return_type", v_return);
>> +   rb_iv_set(self, "@address",
>> ULONG2NUM((LPARAM)CallbackTable[RSTRING(v_proto)
>> +   ActiveCallback = self;
>>
>>     return self;
>>  }
>> @@ -473,7 +477,6 @@
>>     DWORD params[16];
>>  } CALLPARAM;
>>
>> -static VALUE ActiveCallback;
>>
>>  DWORD CallbackFunction(CALLPARAM param)  { @@ -811,6 +814,7 @@
>>     rb_define_attr(cCallback, "return_type", 1, 0);
>>
>>     /* The numeric address of the function pointer */
>> +   rb_define_attr(cCallback, "address", 1, 0);
>>     rb_define_attr(cFunction, "address", 1, 0);
>>
>>    /* Constants */
>
> Park, can you please commit this change?
>
OK. I did it.

Regards,

Park Heesob


More information about the win32utils-devel mailing list