HOWTO: Profile an OLE Server or an OLE ControlLast reviewed: October 7, 1997Article ID: Q147393 |
The information in this article applies to:
SUMMARYThe 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 INFORMATIONThe 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 need 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 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.To profile an OLE mini server:
COPY MiniSrvr.exe MiniSrvr.sav 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.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):
COPY InProc.dll InProc.sav 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.To profile an OLE control that has an .ocx extension (these steps are also similar except that you now have an .ocx extension):
COPY Control.ocx Control.sav 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. REFERENCESProfiler 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 5.0.
|
Additional query words: mini-server
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |