2 * Misc Toolhelp functions
4 * Copyright 1996 Marcus Meissner
19 /* FIXME: to make this working, we have to callback all these registered
20 * functions from all over the WINE code. Someone with more knowledge than
21 * me please do that. -Marcus
26 FARPROC16 lpfnCallback
;
30 static int nrofnotifys
= 0;
32 BOOL16 WINAPI
NotifyRegister( HTASK16 htask
, FARPROC16 lpfnCallback
,
37 dprintf_toolhelp( stddeb
, "NotifyRegister(%x,%lx,%x) called.\n",
38 htask
, (DWORD
)lpfnCallback
, wFlags
);
39 for (i
=0;i
<nrofnotifys
;i
++)
40 if (notifys
[i
].htask
==htask
)
44 notifys
=(struct notify
*)xmalloc(sizeof(struct notify
));
46 notifys
=(struct notify
*)xrealloc(notifys
,sizeof(struct notify
)*(nrofnotifys
+1));
49 notifys
[i
].htask
=htask
;
50 notifys
[i
].lpfnCallback
=lpfnCallback
;
51 notifys
[i
].wFlags
=wFlags
;
55 BOOL16 WINAPI
NotifyUnregister( HTASK16 htask
)
59 dprintf_toolhelp( stddeb
, "NotifyUnregister(%x) called.\n", htask
);
60 for (i
=nrofnotifys
;i
--;)
61 if (notifys
[i
].htask
==htask
)
65 memcpy(notifys
+i
,notifys
+(i
+1),sizeof(struct notify
)*(nrofnotifys
-i
-1));
66 notifys
=(struct notify
*)xrealloc(notifys
,(nrofnotifys
-1)*sizeof(struct notify
));