August 14, 2016

ATL services: turning off error dialogs

To prevent error dialogs from appearing when the Release version of your ATL service fails, add the following code to WinMain():

Alternatively, you can suppress the Windows Error Reporting UI for all programs by creating/setting the registry value

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
DontShowUI (REG_DWORD) = 1

WARNING: the registry location should be of the correct bitness (64- or 32-bit).

It's also a good idea to set filter for unhandled exceptions:

No comments:

Post a Comment