DOCUMENT:Q195768 25-OCT-2001 [iis] TITLE :HOWTO: Profile an ISAPI DLL PRODUCT :Internet Information Server PROD/VER::4.0,5.0 OPER/SYS: KEYWORDS:kbISAPI kbDSupport kbiis400 kbiis500 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Internet Information Server versions 4.0, 5.0 ------------------------------------------------------------------------------- SUMMARY ======= This article provides information about profiling an ISAPI DLL. This information is not available in Microsoft Source Profiler documentation. MORE INFORMATION ================ Use the following steps to profile an ISAPI DLL: 1. Build your DLL. Enable profiling and generation of a map file on the linker options. 2. Run this command on your ISAPI DLL: prep /om /ft .dll 3. This generates a file called ._ll. Rename your original DLL to something else and then rename the ._ll file to .dll. 4. Copy this profiling version of your ISAPI dll and profile.dll to the directory where they will be run on your IIS server. 5. Copy the following files from the \Microsoft Visual Studio\VC98\Bin directory to where they will be run on your IIS server: Profile.EXE, Profile.DLL, Profile.Ini. 6. Set the __ProfileBPI and __ProfilePBO environment variables as per the instructions in the Knowledge Base article: Q117681 Profiling Windows NT Services 7. Stop and restart IIS (to ensure that the environment variables are valid for Inetinfo.exe while it is running) and then run whatever processes you are going to use to exercise the code in your ISAPI DLL. NOTE: To stop IIS 4.0, issue this command: net stop iisadmin /y To start Web Publishing Service again, use: net start w3svc. 8. Stop IIS and run these commands in the directory where the PBI and PBO files are located: prep /m plist NOTE: Do not add the .DLL extension onto these last two commands. Errors are generated if .DLL extension is added. REFERENCES ========== For additional information, please see the following article(s) in the Microsoft Knowledge Base: Q117681 Profiling Windows NT Services Visual C++ online documentation (c) Microsoft Corporation 1998, All Rights Reserved. Contributions by Scott deBeaubien, Microsoft Corporation. Additional query words: ====================================================================== Keywords : kbISAPI kbDSupport kbiis400 kbiis500 Technology : kbiisSearch kbiis500 kbiis400 Version : :4.0,5.0 Issue type : kbhowto ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 2001.