⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 displayloadedmodules.asp

📁 显示WINDOWS中进程已载入的所有模块。
💻 ASP
字号:
<!- The Code Project article submission template

    Using this template will help us post your article sooner.
    We are using MS IIS and ASP pages on the server, allowing
    us to simplify the templates used to create the articles.

    To fill in this template, just follow the 3 easy steps below:
 
     1. Fill in the article description details
     2. Add links to your images and downloads
     3. Include the main article text

    That's all there is to it! All formatting will be done by the
    ASP script engine.
-->


<!-- STEP 1. Fill in the details below -->

<% 
strTitle  = "Display Loaded Modules - Debugging Tool for Application using Multiple DLLs" 
strAuthor = "Emmanuel KARTMANN"
strEmail  = "emmanuel@kartmann.com"
strEnv    = "VC++ 6.0, NT 4.0, Win98"
strKey    = "Loaded Modules, DLL, Process"
strLevel  = "Advanced"
strPosted = "17 Nov 1999"
strUpdate = "18 Nov 1999"
%>

<!-- This must be included -->
<!--#include virtual="/includes/article_header.inc" -->



<!-- STEP 2. Include download and sample image information -->

<li><font size="2"><a href="DisplayLoadedModules.zip">Download executable project - 111 Kb</a></font></li>
<li><font size="2"><a href="DisplayLoadedModules_src.zip">Download source - 153 Kb</a></font></li>

<p><img src="DisplayLoadedModules.jpg" alt="Sample Image"></p>



<!-- STEP 3. Add the article text.-->

<CENTER><H3><FONT COLOR="#AOAO99">

Display Loaded Modules v1.5

</FONT></H3></CENTER><HR>

<p><u>Environment:</u> VC6 SP3, NT4 SP5 <B>or</B> VC6 SP3, Windows98 SE

<p>

Have you ever experienced an error while loading a DLL when you start an application?
Invalid DLL version? Entry point @XXXX not found? 
<p>

If the answer is yes, then this application is for you!
<p>
On you LAN, there may be thousands of versions of a DLL! Which version are you using? 
Which DLL has effectively been loaded by your application? You must check the PATH, the 
current working directory of your process, etc...
<p>

This small application, called "DisplayLoadedModules", <B>connects to a running process</B>, gets the <EM>list of DLLs 
loaded by the process</EM>, and display the following information for every DLL:
<P>

<UL>
<LI>Module File Path (e.g. "C:\WINNT4\System32\WS2_32.dll")

<LI>Module Description (e.g. "Windows Socket 2.0 32-Bit DLL")

<LI>Module File Version (e.g. "4.00")

<LI>Associated Product Name (e.g. "Microsoft(R) Windows NT(TM) Operating System")

<LI>Associated Product Version (e.g. "4.00")

<LI>Module File Size (e.g. "59664 bytes")

<LI>Module Creation Date (e.g. "October 14, 1996 03:38:00")
</UL>

<P>

The application can also save the output to a text file. If your application runs on a machine "A" and not on a 
machine "B", you can compare (using 'diff' or 'windiff') the output of the program on both machines. If you're
experiencing a DLL version problem, you'll figure out very easily...

<P>

On Windows NT, the executable uses two additional DLLs/Lib: PSAPI.DLL and PDH.DLL
For more on these APIs, please refer to MSDN Platform SDK:
<UL>
<LI>Process Status Helper (PSAPI)<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_25ki.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_25ki.htm</A>
<LI>OpenProcess<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/prothred_478z.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/prothred_478z.htm</A>
<LI>EnumProcessModules<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_1wz7.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_1wz7.htm</A>
<LI>GetModuleFileNameEx<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_8x88.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/psapi_8x88.htm</A>
</UL>

<P>

On Windows 98, the executable uses the ToolHelp32 library.
For more on this APIs, please refer to MSDN Platform SDK:
<UL>
<LI>ToolHelp Library<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_5pfd.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_5pfd.htm</A>
<LI>Taking a Snapshot and Viewing Processes<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_99rn.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_99rn.htm</A>
<LI>Traversing the Module List<BR>
		<A HREF="http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_4t6c.htm">http://msdn.microsoft.com/library/sdkdoc/winbase/toolhelp_4t6c.htm</A>
</UL>

<P>
Note that you must select the proper WIN32 Configuration to build the executable:
<UL>
<LI>On Windows 98: select configuration <B>Win32 Windows 98 Debug</B> or <B>Win32 Windows 98 Release</B>
<LI>On Windows NT: select configuration <B>Win32 Windows NT Debug</B> or <B>Win32 Windows NT Release</B>
</UL>




<!-- This must be included -->
<!--#include virtual="/includes/article_footer.inc" -->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -