IEInstallScope function

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


HRESULT IEInstallScope(
  _Out_ LPDWORD *pdwScope


pdwScope [out]

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


The ActiveX control should register in the current user profile.


The ActiveX control should register machine-wide.


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

The Install Scope was successfully retrieved.


An error occurred.



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.


Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008


Internet Explorer 8