[Win32utils-devel] win32-daemon 0.6.1 problem
Berger, Daniel
Daniel.Berger at qwest.com
Thu Nov 6 09:09:52 EST 2008
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?
Thanks,
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