Forget uninstallation ... I am assuming that
by that you mean when your hack is deleted ...
is it possible that you could cleanup when your 
hack is disabled?  You shouldn't be deleting
hacks before you disable them anyway (and there
is a hack to prevent this...)

-- 
-Richard M. Hartman
[EMAIL PROTECTED]

186,000 mi./sec ... not just a good idea, it's the LAW!


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 29, 1999 8:09 PM
> To: [EMAIL PROTECTED]
> Subject: Hack Cleanup under HackMaster
> 
> 
> I'm attempting to develop a hack using HackMaster to control 
> the installation
> process (the hack patches the SysGetEvent trap entry).
> 
> The trap routine that is installed makes some changes to the 
> OS environment that
> need to be undone when the hack is un-installed:
> 
>   1. It needs to maintain some global state between events. 
> Rather than allocate
>      memory for the global state on each event, it allocates 
> some memory (using
>      MemHandleNew) the first time the memory is needed, 
> initialises the memory
>      from preference memory, and saves the handle away in a feature.
> 
>      On subsequent events, the routine just locks the memory 
> handle to get
>      access to its global state.
> 
>      When it detects an appStopEvent event, it saves a small 
> part of this global
>      state to the preference memory, releases the memory 
> chunk, and then
>      unregisters the feature.
> 
>   2. It changes the display settings. These are normally 
> restored to their
>      original values when the appStopEvent is detected.
> 
> My problem occurs when the hack is un-installed. HackMaster 
> seems to just remove
> the trap routine from the trap chain, and doesn't give it a 
> chance to tidy up
> after itself.
> 
> The HackMaster documentation mentions a custom extension 
> routine, but gives no
> further details on the interface. I'm assuming that I could 
> do the resource
> cleanup there.
> 
> Does anyone know whether this has actually been implemented 
> within HackMaster
> and if so what the API looks like?
> 
> Any other suggestions as to how to get around this problem 
> would also be greatly
> appreciated.  
> 
> 
> Thanks - David
> 
> --------------------------------------------------------------
> ---------------
> David A. Buckle                                              
> [EMAIL PROTECTED]
> --------------------------------------------------------------
> ---------------
> 
> 
> 

Reply via email to