I've never tried this, and if you try it, be sure to do it inside a virtual machine so you don't hose your host OS. Because if I'm wrong, you surely will make your Win32 subsystem unstartable.
But, if you add a registry key under:
[tt]HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options[/tt]
for Explorer.exe, and added a sub-key named Debugger, whose value points to a program you write, that program might be able to reject the startup of the app that was started via Windows Explorer.
I got this information from Inside Windows NT, 2nd Ed. in the section on process startup.
If you aren't already familiar with the contents of the book and/or the DDK, you might want to abandon this project.
Chip H.
____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first