Ability to write a custom DllMain routine
Posted: Fri May 23, 2008 5:03 pm
Hi all!
PB has support for all dll attach/detach etc. events, but returning zero from AttachProcess does not work. (According to MSDN, returning 0 from a dllmain procedure when attaching to a process makes the system unload the dll immediately and return an error for the caller, or if it's called at process creation, the creation itself fails)
A nice feature would be to allow users to create their own dllmain procedure (if they want to, or just stick with PB's handler which calls AttachProcess() AttachThread(), etc.)
PB has support for all dll attach/detach etc. events, but returning zero from AttachProcess does not work. (According to MSDN, returning 0 from a dllmain procedure when attaching to a process makes the system unload the dll immediately and return an error for the caller, or if it's called at process creation, the creation itself fails)
A nice feature would be to allow users to create their own dllmain procedure (if they want to, or just stick with PB's handler which calls AttachProcess() AttachThread(), etc.)