>Wrap your MyEvtGetEvent() function into a shared library, load that library
>before your SysSetTrapAddress (if it isn't already loaded!), and just never
>unload it. Now, your app can safely do its SysSetTrapAddress(
Wow! That's even more complicated than I was contemplating, but thanks
for the interesting suggestions.
My own three solutions, in order of increasing complexity were:
1) Don't worry about it and hope it doesn't crash for anyone (really! = yeah,
how lame!)
2) When I go to uninstall my own patches, see if SysGetTrapAddress is no
longer pointing to me, in which case I just don't unpatch myself (seems
similar in effect to your library solution, I think.) No extra heap used,
but does leave my patch installed until a reset occurs.
3) I patch SysGetTrapAddress and SysSetTrapAddress myself to monitor
things until I'm done. While active, any requests for my patched traps
return the old unpatched address(es). This means that new patches will
be ignored until I'm through. When I uninstall myself, I glue
the calling chain back together (somehow).
This must be sort of the way that EvPlugBase and TrapWeaver do it.
Thanks for the suggestions
Rick