Microsoft KB Archive/250563
PRB: First Chance Exception Debugging AppWizard-Generated Applications in Windows System DLLs
The information in this article applies to:
- Microsoft Windows 95
- Microsoft Windows 98
- Microsoft Windows 98 Second Edition
- Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0
- Microsoft Visual C++, 32-bit Professional Edition, version 6.0
- Microsoft Visual C++, 32-bit Learning Edition, version 6.0
IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.
When you debug a default Microsoft Foundation Class Library (MFC) AppWizard-generated program, the output window may display the following error message:
First-chance exception in <SomeApp>.exe (KERNEL32.DLL): 0xC0000005: Access Violation.
The Encompass Monitor or EncMonitor service is preinstalled on some systems. This service starts Monitor.exe and is loaded before the user logs on to the system. Monitor.exe performs the same function as the performance monitor Alert and Logging facility. With this utility, you can generate alerts and log data. This service causes the first-chance exception that is displayed in the output window.
IMPORTANT: The third-party products discussed in this article are manufactured by vendors independent of Microsoft; we make no warranty, implied or otherwise, regarding these products' performance or reliability.
WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.
For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT or Windows 2000, you should also update your Emergency Repair Disk (ERD).
To work around the problem, use any of the following three alternatives:
- You can ignore the first chance exception message, this message is harmless. This message is seen only when you debug programs, and not seen in Release versions.
- You can remove the service and run it manually, whenever needed, to alleviate the problem.
- You can use RegEdit and remove the values "Encompass Monitor" and "EncMonitor" from the following Registry keys (do not delete the keys):
Before making any modification to the registry, back up the Registry or export these keys to the Desktop before making any edits.
For additional information about RunServices, click the article number below to view the article in the Microsoft Knowledge Base:
Q179365 INFO: Run, RunOnce, RunServices, RunServicesOnce and Startup
© Microsoft Corporation 2000, All Rights Reserved.
Contributions by Vidyanand Rajpathak, Microsoft Corporation
Additional query words: EncMonitor, 0xC0000005
Keywords : kb3rdparty kbDebug kbOSWin95 kbOSWin98 kbDSupport kbGrpDSMFCATL
Issue type : kbprb
Technology : kbVCsearch kbAudDeveloper kbWin95search kbWin98search kbWin98SEsearch kbWin95 kbWin98 kbWin98SE kbVC32bitSearch kbVCPE600 kbVCEE600 kbVCLE600
Last Reviewed: May 6, 2001