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

📄 01_9_17_20.asp.html

📁 有用的VC教程,包括编程思想编程技巧程序效率等方面的指导
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<html><head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<TITLE>计算机世界网-检测DLL的版本号</TITLE></HEAD>
<style>
.a14{font-size:14px;text-indent:25px;line-height:20px}
.f{font-size:18px;color=#0f3ccd}
img{border:0px;}
td,p,input{font-fammily:verdana,宋体;font-size:12px;}
A:link {text-decoration:none;color:black}
A:visited {text-decoration:none;color:#80006f}
A:hover {text-decoration:underline;color:black}
</style>
<center>
<BODY topmargin=2 leftmargin=0>
<style>
.v12{font-size:10pt;color:"#ffffff";FONT-WEIGHT: bold}
.v14{font-size:14px;text-indent:25px;line-height:20px}
img{border:0px;}
td,p,input,select{font-fammily:verdana,宋体;font-size:12px;}
A:link {text-decoration:none;color:black}
A:visited {text-decoration:none;color:#80006f}
A:hover {text-decoration:underline;color:black}
</style>

<style>
.v13{font-size:10pt;color:"#ffffff";FONT-WEIGHT: bold}
.v12{font-size:13px;color:"#4C029C";FONT-WEIGHT: bold}
.v14{font-size:14px;text-indent:25px;line-height:20px}
img{border:0px;}
td,p,input,select{font-fammily:verdana,宋体;font-size:12px;}
A:link {text-decoration:none;color:black}
A:visited {text-decoration:none;color:#80006f}
A:hover {text-decoration:underline;color:black}
</style>

<!--头-->

<table align=center cellpadding="0" cellspacing="0" border="0" width="767">
  <tr><td valign=bottom>
      <table cellpadding="0" cellspacing="0" border=0>
        <tr><td valign=top><img src="../../../../../center/image/ccwlogo.gif"></td></tr>
        <tr><td height="27" valign=top><img src="../../../../../center/image/knowledge.gif" width="207" height="27"></td></tr>
      </table></td>
	<td valign=bottom width=556 bgcolor="#4c029c" height=96>
		  <table cellpadding="0" cellspacing="0" border=0 width=556 bgcolor="#4c029c" height=96>
        <tr><td height=25 valign=bottom bgcolor="#ffffff"  colspan=2 ><img src="../../../../../image2002/top.gif" usemap="#F"></td></tr>
	<tr  valign=middle >
		<td align=center valign=middle height="60" align=center>
		<!-- <a href="http://www.ccw.com.cn/search/" target=_blank><img src="../../../../../img2/esearch.GIF" border=0 width=468 height=60></a> --><a href="http://www.ccw.com.cn/html/search/thememail/" target=_blank><img src="../../../../../img2/topbanner_thememail.GIF" border=0 width=468 height=60></a>	
		</td>		
		<td  align=center width=15%>
			<table width=95%>
				<tr><td><a href="mailto:center@ccw.com.cn?subject=我要投稿:" target=_blank><font class=v13>我要投稿</a><br><a href="mailto:center@ccw.com.cn?subject=编读往来"><font class=v13>编读往来</a><br><a href="javascript:AddBookMark('计算机世界网首页')"><font class=v13>加入收藏</a></font></td></tr>
			</table>
		</td>
	</tr>
		<tr><td bgcolor="#ffffff" height=1 colspan=2 ></td></tr>
		<tr><td bgcolor="#b4aafc" height=2 colspan=2 ></td></tr></table>
		<map name="F">
<area href="http://www.ccw.com.cn/" shape="rect" coords="29, 3, 61, 18" target=_blank>
<area href="http://www.ccw.com.cn/news1/" shape="rect" coords="72, 3, 143, 18" target=_blank>
<area href="http://www.ccw.com.cn/center/" shape="rect" coords="155, 2, 216, 18" target=_blank>
<area href="http://www.ccw.com.cn/work/" shape="rect" coords="225, 2, 299, 18" target=_blank>
<area href="http://www.ccw.com.cn/search/" shape="rect" coords="310, 3, 364, 19" target=_blank>
<area href="http://www3.ccw.com.cn/" shape="rect" coords="372, 2, 412, 19" target=_blank>
<area href="http://www2.ccw.com.cn/" shape="rect" coords="424, 2, 550, 18" target=_blank></map>
	</td></tr>
	<tr><td colspan=2 bgcolor="#b4aafc">
	<table border=0 cellpadding=0 cellspacing=0 width=100%>
		<tr>
            <td width=26% align=center><font  class=v12>【2003年6月24日】&nbsp;&nbsp;&nbsp;</font></td>
            <td CLASS=V12> <a href="http://www.ccw.com.cn/center/topic.asp">专 题</a> /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/tech.asp">技 术</a>  /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/prod.asp">产 品</a> /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/app.asp">应 用</a> /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/net.asp">网 络</a> /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/prog.asp">编 程</a> /</td>
            <td CLASS=V12><a href="http://www.ccw.com.cn/center/skill.asp">技 巧</a> </td>
         </tr>
	</table>
	</td></tr>
</table>
<table align=center width=728>
<tr><td align=center><br><h2><font color='#0f3ccd'>检测DLL的版本号</font></h2>
<br><b>作者:Eran Yariv   编译:刘峰</b>
</td></tr><tr><td align=right>01-9-17 下午 01:24:00<br><hr size=1 width=718 color=#f46240></td></tr></table><br>
<table align=center width=728><tr><td valign=top width=600>
<table width=100% ><tr><td class=a14>这篇文章包含了一些关于COMCTL32.DLL和Unimodem/V TAPI驱动程序的信息。并讲述了如何通过你的MFC应用程序检测DLL的版本信息。</td></tr></table><table width=100% ><tr><td class=a14>
COMCTL32.DLL versions</td></tr></table><table width=100% ><tr><td class=a14>
该DLL负责Windows使用的所有控制。Windows95首先使用该库,版本号为4.0.Internet Explorer3.x升级它为4.70.Internet Explorer 4.0的版本为4.71.</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
扩展控制(如带检取框的列表视)只在比4.00版以上得到支持。</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
关于公用控制版本的详细信息可到下列网址获取:</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
http://www.microsoft.com/msdn/sdk/inetsdk/help/inet1560.htm </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
UnimodemV</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
   Unimodem是一个通过TAPI使用的标准的Modem驱动程序。modem硬件提供的驱动程序95%以上仅仅是参数文件.Unimodem的32位驱动程序放在Windows系统目录中的UMDN32.dll.</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
   最近,微软发布了Voice modems的升级版本,命名为UnimodemV.该版本支持一些新的特点,如:呼叫者ID,特殊的响铃等.</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
该升级版可到如下网址下载:</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
http://www.microsoft.com/kb/articles/Q139/3/83.htm </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
原有的Unimodem的版本是UMDM32.DLL 4.00。UnimodemV用4.10版本替换了该动态链接库。</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
如何发现一个DLL的版本信息呢?</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
下面类实现了接受DLL版本信息:</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
Class header file: </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
/*  For some odd reason, Microsoft published a sample code that uses shlwapi.h </td></tr></table><table width=100% ><tr><td class=a14>
    (and shlwapi.lib)</td></tr></table><table width=100% ><tr><td class=a14>
    to tinker file versions.</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
    This header file could not be found anywhere !!!</td></tr></table><table width=100% ><tr><td class=a14>
    Not in Visual C++ 4.2, Visual C++ 5.0 or MSDN versions up to July 97`.</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
    So, I just took out the interesting structures from scraps I found </td></tr></table><table width=100% ><tr><td class=a14>
    and re-defined them here.</td></tr></table><table width=100% ><tr><td class=a14>
*/</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
//  Remember: You must link version.lib to the project for this class to work !!</td></tr></table><table width=100% ><tr><td class=a14>
// 切记:为使该类正常工作,你必须将version.lib链接到你的项目中!!</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
#ifndef _DLL_VERSION_H_</td></tr></table><table width=100% ><tr><td class=a14>
#define _DLL_VERSION_H_</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
#ifndef DLLVERSIONINFO</td></tr></table><table width=100% ><tr><td class=a14>
typedef struct _DllVersionInfo</td></tr></table><table width=100% ><tr><td class=a14>
{</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD cbSize;</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD dwMajorVersion;</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD dwMinorVersion;</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD dwBuildNumber;</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD dwPlatformID;</td></tr></table><table width=100% ><tr><td class=a14>
}DLLVERSIONINFO;</td></tr></table><table width=100% ><tr><td class=a14>
#endif</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
#ifndef DLLGETVERSIONPROC</td></tr></table><table width=100% ><tr><td class=a14>
typedef int (FAR WINAPI *DLLGETVERSIONPROC) (DLLVERSIONINFO *);</td></tr></table><table width=100% ><tr><td class=a14>
#endif</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
class CDLLVersion</td></tr></table><table width=100% ><tr><td class=a14>
{</td></tr></table><table width=100% ><tr><td class=a14>
    typedef enum {  WIN_DIR, // Windows directory (e.g.: "C:\Windows\")</td></tr></table><table width=100% ><tr><td class=a14>
                    SYS_DIR, // Windows system directory (e.g.: "C:\Windows\System")</td></tr></table><table width=100% ><tr><td class=a14>
                    CUR_DIR, // Current directory (e.g.: ".")</td></tr></table><table width=100% ><tr><td class=a14>
                    NO_DIR}  // No directory (path in file name)</td></tr></table><table width=100% ><tr><td class=a14>
        FileLocationType;   // Possible ways to add a path prefix to a file</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
public:</td></tr></table><table width=100% ><tr><td class=a14>
    CDLLVersion (LPSTR szDLLFileName) :</td></tr></table><table width=100% ><tr><td class=a14>
        m_dwMajor (0),</td></tr></table><table width=100% ><tr><td class=a14>
        m_dwMinor (0),</td></tr></table><table width=100% ><tr><td class=a14>
        m_dwBuild (0)</td></tr></table><table width=100% ><tr><td class=a14>
    {</td></tr></table><table width=100% ><tr><td class=a14>
        m_bValid = GetDLLVersion (szDLLFileName, m_dwMajor, m_dwMinor, m_dwBuild);</td></tr></table><table width=100% ><tr><td class=a14>
    }</td></tr></table><table width=100% ><tr><td class=a14>
        </td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
    virtual ~CDLLVersion () {};</td></tr></table><table width=100% ><tr><td class=a14>
</td></tr></table><table width=100% ><tr><td class=a14>
    DWORD GetMajorVersion ()</td></tr></table><table width=100% ><tr><td class=a14>
    {</td></tr></table><table width=100% ><tr><td class=a14>
        return m_dwMajor;</td></tr></table><table width=100% ><tr><td class=a14>
    }</td></tr></table><table width=100% ><tr><td class=a14>

⌨️ 快捷键说明

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