Partager via


IEInstallScope function

This function provides the current Install Scope to a Microsoft ActiveX DLL.

Syntax

HRESULT IEInstallScope(
  _Out_ LPDWORD *pdwScope
);

Parameters

pdwScope [out]

A pointer to a DWORD which contains one of the Install Scope values.

(INSTALL_SCOPE_USER)

The ActiveX control should register in the current user profile.

(INSTALL_SCOPE_MACHINE)

The ActiveX control should register machine-wide.

(INSTALL_SCOPE_INVALID)

The Install Scope could not be retrieved. The ActiveX control should not install.

Return value

This function can return one of these values.

Return code Description
S_OK

The Install Scope was successfully retrieved.

E_FAIL

An error occurred.

 

Remarks

This function call is intended to be used by an ActiveX DLL during its install-time registration. It provides the current Install Scope to the ActiveX DLL. The ActiveX package developer can choose to install or not, depending on the returned scope. For example, if the ActiveX package requires machine scope, but only user scope is available, the developer can choose not to install the package.

Registration is done using DllRegisterServer or DllUnregisterServer.

Important   The ActiveX package should install and register only if both S_OK and a valid value for pdwScope have been returned.

 

S_OK is also returned when the configuration does not support Windows Internet Explorer Install Scope. Therefore, when Windows Internet Explorer 8 is running on an operating system that is earlier than Windows Vista, the function will return INSTALL_SCOPE_MACHINE. The ActiveX control should install machine-wide in this case.

Only one Install Scopes value will be returned by this function.

The ActiveX templates in Active Template Library (ATL) 7 and earlier do not support per-user ActiveX Install Scope.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Product

Internet Explorer 8

Header

Urlmon.h

Library

Urlmon.lib

DLL

Urlmon.dll