How to profile an OLE server or an OLE control in Visual C++ 6.0
This article was previously published under Q147393 SUMMARY
The Visual C++ Books Online section "Profiling Dynamic-Link Libraries"
explains the steps involved in profiling dynamic-link libraries and
profiling multiple .dll and .exe files.
Because an OLE server is basically an .exe or .dll file and an OLE control is a DLL even though it has an extension of .ocx, profiling them is similar to profiling an .exe or .dll file. When you profile an OLE server or OLE control, you follow the same steps and use the same commands that you would for an .exe or .dll file. The same profiling rules that apply to .exe and .dll files (such as the need to include debugging information and to supply a .map file) also apply to OLE servers and OLE controls. MORE INFORMATION
The following four examples illustrate the steps required to profile an OLE
full server, an OLE mini-server, an In-Process OLE Automation server, and
an OLE control.
You may have to register the OLE mini-server, the in-process OLE automation server, or the OLE control explicitly. You can do one of the following to register them:
Each step in the following examples is a command at the command prompt. Alternatively, you could create a batch file that contains these commands. In the command line arguments for most profile commands, you should specify the file names without the extension. Look at the following examples to see when extensions should be included. To profile an OLE full server or an OLE automation server:
PREP /OM /FT FullSrvr
To profile an OLE mini server:
PROFILE FullSrvr PREP /M FullSrvr PLIST FullSrvr > FullSrvr.txt where FullSrvr.exe is the file corresponding to an OLE full server or OLE automation server.
COPY MiniSrvr.exe MiniSrvr.sav
To profile an In-Process OLE Automation Server (these steps are similar to
those of OLE mini server except that you have a .dll extension instead of
an .exe extension):
PREP /OM /FT MiniSrvr COPY MiniSrvr._xe MiniSrvr.exe PROFILE /I MiniSrvr /O MiniSrvr Container PREP /M MiniSrvr PLIST MiniSrvr > MiniSrvr.txt COPY MiniSrvr.sav MiniSrvr.exe where MiniSrvr.exe is the file corresponding to an OLE mini server and Container.exe is a container application that runs the MiniSrvr.
COPY InProc.dll InProc.sav
To profile an OLE control that has an .ocx extension (these steps are also
similar except that you now have an .ocx extension):
PREP /OM /FT InProc.dll COPY InProc._ll InProc.dll PROFILE /I InProc /O InProc Client PREP /M InProc PLIST InProc > InProc.txt COPY InProc.sav InProc.dll where InProc.dll is the file corresponding to an In-Process OLE Automation server and Client is an OLE Automation client application that drives the InProc.dll.
COPY Control.ocx Control.sav
For more information about how to profile more than one module, click the following article number to view the article in the Microsoft Knowledge Base:
PREP /OM /FT Control.ocx COPY Control._cx Control.ocx PROFILE /I Control /O Control ControlContainer PREP /M Control PLIST Control > Control.txt COPY Control.sav Control.ocx where Control.ocx is the OLE control and ControlContainer is an OLE control container application. 179269 (http://support.microsoft.com/kb/179269/)
How to use Source Profiler to profile dynamic-link libraries
REFERENCES
Profiler Reference, Visual C++ User's Guide.
Advanced Profiling, Programming Techniques. Both of these references are available in the online documentation that comes with Visual C++ versions 4.0 and later. APPLIES TO
| Article Translations
|

Back to the top
