分享
 
 
 

如何发布IE控件

王朝vb·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

Beginning with Microsoft?Internet Explorer 4.0, application developers who want to redistribute Internet Explorer technologies梥uch as the WebBrowser Control, Wininet.dll, Urlmon.dll, or Comctl32.dll (or Common Controls DLL)梞ust obtain a royalty-free redistribution license for Internet Explorer and download a copy of the Internet Explorer Administration Kit (IEAK) through the IEAK Web Site.

Determining the Installed Version of Internet Explorer

Downloading a Version of Internet Explorer for Redistribution

Adding an Application to the Warning List When Uninstalling Internet Explorer

Related Topics

Determining the Installed Version of Internet Explorer

If your application requires Internet Explorer services, you must determine the version of Internet Explorer installed on the local system before installing your application. There are two methods that can be used to determine the installed version of Internet Explorer. The first obtains the version information from the registry, and the second obtains the version information from one of the Internet Explorer components.

Determining the Internet Explorer Version from the Registry

To obtain the installed Internet Explorer version from the registry, open the following registry key:

HKEY_LOCAL_MACHINE\

Software\

Microsoft\

Internet Explorer

In this key, obtain the Version value. This is a string value that contains the Internet Explorer version in the following format:

"<major version>.<minor version>.<build number>.<sub-build number>"

Additionally, this registry key contains a Build value, a five-character entry that takes the following format:

"<major version><build number>"

The following are the versions of Internet Explorer and the Version and Build values they return.

Internet Explorer Version

Version Value

Build Value

Prior to 4.0

N/A

N/A

4.0

4.71.1712.6

41712

4.01

4.72.2106.8

42016

4.01 SP1

4.72.3110.3

43110

5

5.00.2014.0216

52016

5.5

5.50.4134.0100

54134

6.0 Public Preview

6.0.2462.0000

62462

6.0 Public Preview Refresh

6.0.2479.0006

62479.0006

6.0 RTM

6.0.2600.0000

62600

Determining the Internet Explorer Version from Shdocvw.dll

Because the Internet Explorer browser is implemented in Shdocvw.dll, the version of this dynamic-link library (DLL) can be used to determine which version of Internet Explorer is installed. The absence of this file in the system indicates that Internet Explorer is either not installed or not installed properly.

The following are the versions of Internet Explorer and their corresponding versions of Shdocvw.dll.

Internet Explorer Version

Shdocvw.dll Version

1.0 (Plus!)

4.40.308

2.0

4.40.520

3.0

4.70.1155

3.0 (OSR2)

4.70.1158

3.01

4.70.1215

3.02

4.70.1300

4.0 Platform Preview 1.0 (PP1)

4.71.544

4.0 Platform Preview 2.0 (PP2)

4.71.1008.3

4.0

4.71.1712.6

4.01

4.72.2106.8

4.01 SP1

4.72.3110.3

5 Beta

5.00.0010.1309

5

5.00.2014.0216

5.5

5.50.4134.100

6.0 Public Preview

6.00.2462.0000

6.0 Public Preview Refresh

6.00.2479.0006

6.0 RTM

6.00.2600.0000

The following function retrieves the major and minor version numbers of the Shdocvw.dll currently installed on the local system.

Show Example

#include <windows.h>

#include <shlwapi.h>

HRESULT GetBrowserVersion(LPDWORD pdwMajor, LPDWORD pdwMinor)

{

HINSTANCE hBrowser;

if(IsBadWritePtr(pdwMajor, sizeof(DWORD)) ||

IsBadWritePtr(pdwMinor, sizeof(DWORD)))

return E_INVALIDARG;

*pdwMajor = 0;

*pdwMinor = 0;

//Load the DLL.

hBrowser = LoadLibrary(TEXT("shdocvw.dll"));

if (hBrowser == NULL)

{

//Error loading module -- fail as securely as possible

return;

}

if(hBrowser)

{

HRESULT hr = S_OK;

DLLGETVERSIONPROC pDllGetVersion;

// You must get this function explicitly.

pDllGetVersion = (DLLGETVERSIONPROC)GetProcAddress(hBrowser, TEXT("DllGetVersion"));

if(pDllGetVersion)

{

DLLVERSIONINFO dvi;

ZeroMemory(&dvi, sizeof(dvi));

dvi.cbSize = sizeof(dvi);

hr = (*pDllGetVersion)(&dvi);

if(SUCCEEDED(hr))

{

*pdwMajor = dvi.dwMajorVersion;

*pdwMinor = dvi.dwMinorVersion;

}

}

else

{

// If GetProcAddress failed, there is a problem with the DLL.

hr = E_FAIL;

}

FreeLibrary(hBrowser);

return hr;

}

return E_FAIL;

}

Security Alert Using LoadLibrary incorrectly can compromise the security of your application by loading the wrong DLL. Refer to the LoadLibrary documentation for information on how to correctly load DLLs with different versions of Microsoft Windows?

Downloading a Version of Internet Explorer for Redistribution

The IEAK enables the application developer to have complete control over the redistribution of Internet Explorer. In some cases, however, the minimal installation package may be sufficient for an application's needs.

To download a minimal installation of Internet Explorer for redistribution, perform the following steps:

Run IE6Setup.exe and select Install Minimal or Customize Your Browser.

Click Advanced, select Download Only to download just the minimal components to your system, and click OK to exit the dialog box.

Click Next.

Specify the location where the files should be downloaded. Otherwise, the files will be downloaded to the Windows Update Setup Files folder.

Select a platform for installation, either Windows 98, Microsoft Windows NT? or Windows 2000.

The files are then downloaded to the local computer in the directory specified in step 4.

The following command line will install the Internet Explorer 6 minimal installation package in quiet mode, suppressing prompts as files are extracted.

ie6setup.exe /Q /M:0

For more information about other installation options, refer to the documentation provided with the IEAK.

Note When installing Internet Explorer in a Windows NT environment, make sure that the setup application has proper administration rights and that there is enough available space on the hard drive for the installation. The minimal installation package requires approximately 60 MB of available space to accommodate the temporary and installed files.

Adding an Application to the Warning List When Uninstalling Internet Explorer

Internet Explorer 4.0 introduced a registry key that identifies all applications in the system that require Internet Explorer. Any attempt to uninstall Internet Explorer causes a warning dialog box to appear, enumerating the applications that may not function correctly once Internet Explorer is removed from the user's machine.

If your application requires Internet Explorer 4.0 or later, be sure to add a string value under the following registry key; conversely, when your application is uninstalled, remember to remove that string value from the registry.

HKEY_LOCAL_MACHINE\

Software\

Microsoft\

IE4\

DependentComponents

The string value should take the following format, where AppID is a unique application identifier, and sAppName is a string that contains the application name that will be displayed in the warning dialog when Internet Explorer is uninstalled.

AppID = sAppName

New Registry Key, Moving Forward

To ensure compatibility with future versions of Internet Explorer, Internet Explorer 5 introduced a new registry key and value format that allows the application developer to indicate the version of Internet Explorer it requires.

HKEY_LOCAL_MACHINE\

Software\

Microsoft\

IE Setup\

DependentComponents

The string value to create under this registry key takes the following format:

AppName = sIEVersion

For example, the following registry entries indicate the Internet Explorer versions required by Microsoft Visual Studio?6 and Microsoft Office 2000.

Visual Studio 6.0 = "4.71"

Office 2000 = "5.0"

As was done in Internet Explorer 4.0, when Internet Explorer 5 or later is uninstalled, users are warned with the list of applications that require Internet Explorer on the system, and they are asked if they want to go ahead with the removal of Internet Explorer files.

Note For backward compatibility, Internet Explorer 5 and later will continue to support the following registry key introduced in Internet Explorer 4.0:

HKEY_LOCAL_MACHINE\Software\Microsoft\IE4\DependentComponents

Related Topics

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有