SetUnhandledExceptionFilter don't work because the it will trap only exceptions that have no other handler.
Because the runtime already set the catching of all execptions for housekeeping duties you will get no trapping in your code.
It is also not wise to use in shuch DLL's that could be unloaded (like that user loaded or removable) because in this case if the library is no more in memory the handler will still refer to the address set previously resulting a call in unexistent code.
Using same care when coding a DLL, maybe you can use AddVectoredExceptionHandler().
For usage sample see
here.