Microsoft KB Archive/195768

= How To Profile an ISAPI DLL =

Article ID: 195768

Article Last Modified on 7/2/2004

-

APPLIES TO


 * Microsoft Internet Information Server 4.0
 * Microsoft Internet Information Services 5.0

-



This article was previously published under Q195768



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:  Build your DLL. Enable profiling and generation of a map file on the linker options. Run this command on your ISAPI DLL:

prep /om /ft .dll

 This generates a file called ._ll. Rename your original DLL to something else and then rename the ._ll file to .dll. Copy this profiling version of your ISAPI dll and profile.dll to the directory where they will be run on your IIS server. 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.

</li> Set the __ProfileBPI and __ProfilePBO environment variables as per the instructions in the Knowledge Base article:

117681 Profiling Windows NT Services

</li> 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.</li> Stop IIS and run these commands in the directory where the PBI and PBO files are located:

prep /m <yourDLL>

plist <yourDLL>

NOTE: Do not add the .DLL extension onto these last two commands. Errors are generated if .DLL extension is added.</li></ol>

<div class="references_section">