Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to enable COM+ and COM diagnostic tracing


View products that this article applies to.

Warning You should not enable tracing functionality on production systems unless a Microsoft support representative indicates that the tracing information is required to diagnose an issue. The performance of the computer may be affected. As soon as the reason for the issue is found and resolved, you should disable tracing functionality. By default, tracing functionality is disabled. Therefore, there is no performance effect on a regular installation.

↑ Back to the top


INTRODUCTION

Event Tracing for Windows (ETW) provides a mechanism to trace and log events that are raised by user-mode applications and kernel-mode drivers. In Windows Server 2003 Service Pack 2 (SP2), in Windows Vista, or in newer Windows operating systems, you can use ETW to trace events for some COM+ components and for some base COM components. COM tracing can help you troubleshoot issues that are related to permission, activation, or registration.

The tracing mechanism produces a binary file. The binary file must be formatted by Microsoft so that it can be analyzed.

You can trace the following COM+ and COM providers:
  • COMSVCS
  • COMADMIN
  • DCOMSCM (RPCSS)
  • OLE32
This article describes how to enable and collect diagnostic trace output for COM+ and COM components in Windows Server 2003 SP2, Windows Vista, and newer Windows operating systems.

↑ Back to the top


More Information

Start tracing for the COMSVCS, COMADMIN, and DCOMSCM providers

To start the tracing for COMSVCS, COMADMIN, and DCOMSCM providers, run one of the following commands as appropriate at the command prompt:
logman -start comsvcs -p {B46FA1AD-B22D-4362-B072-9F5BA07B046D} 0xf 0x5 -ets

logman -start comadmin -p {A0C4702B-51F7-4ea9-9C74-E39952C694B8} 0xf 0x5 -ets

logman -start dcomscm -p {9474a749-a98d-4f52-9f45-5b20247e4f01} 0x7 0x5 -ets

Start tracing for the OLE32 provider

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
By default, OLE32 tracing is not enabled. Therefore, you must enable OLE32 tracing before you can start tracing. You can do this by adding the required registry entries as described in this section. You can enable OLE32 tracing on all processes that use OLE32 or on specific processes. OLE32.dll is loaded in many processes, and enabling tracing for all processes may cause decreased performance. Therefore, we do not recommend enabling tracing for all processes.
  • At the command prompt, run the following command to enable OLE32 tracing on all the processes that use OLE32:
    reg add HKEY_LOCAL_MACHINE\Software\Microsoft\OLE\Tracing /v ExecutablesToTrace /t REG_MULTI_SZ /d * /f
  • At the command prompt, run the following command to enable OLE32 tracing on specific processes that use OLE32:
    reg add HKEY_LOCAL_MACHINE\Software\Microsoft\OLE\Tracing /v ExecutablesToTrace /t REG_MULTI_SZ /d "c:\test\app1.exe\0c:\test\app2.exe" /f
Note You can type multiple executables in the registry value. You must type the full path of each executable. Notice the use of double quotation marks and the null terminator (\0). After enabling OLE32 tracing, you must restart the process for the change to take effect.

After you enable OLE32 tracing, start the tracing by running the following command at the command prompt:
logman -start ole32 -p {bda92ae8-9f11-4d49-ba1d-a4c2abca692e} 0xf 0x5 -ets

Stop tracing for all providers

Important You must stop the tracing so that the buffer is written to disk. To do this, run one of the following commands as appropriate at the command prompt:
logman -stop comsvcs -ets

logman -stop comadmin -ets

logman -stop dcomscm -ets

logman -stop ole32 -ets

Log file location

The start command will create a log file that has an .etl extension, such as Dcomscm.etl, Ole32.etl, and so on, in the current directory. You can use the -o option to change the output path when you run the start command.

Next Steps

  1. The binary file must be formatted by Microsoft so that it can be analyzed. Please forward the .etl files to your support contact. For more information about how to contact Microsoft Customer Service and Support, click the following article number to view the article in the Microsoft Knowledge Base:
     
    295539 How and when to contact Microsoft Customer Service and Support
     
  2. Delete the registry key after the trace session is completed. To do this, at the command prompt, run the following command:
    reg delete HKEY_LOCAL_MACHINE\Software\Microsoft\OLE\Tracing /v ExecutablesToTrace /f 

↑ Back to the top


References

For more information about COM and COM+ tracing, visit the following MSDN Web site:

↑ Back to the top


Keywords: kbhowto, kbinfo, kb

↑ Back to the top

Article Info
Article ID : 926098
Revision : 4
Created on : 9/29/2020
Published on : 9/29/2020
Exists online : False
Views : 1765