IHttpApplicationResolveModulesProvider::RegisterModule Method
Registers an HTTP module.
Syntax
virtual HRESULT RegisterModule(
IN HTTP_MODULE_ID parentModuleId,
IN IHttpModuleFactory* pModuleFactory,
IN PCWSTR pszModuleName,
IN PCWSTR pszModuleType,
IN PCWSTR pszModulePreCondition,
IN DWORD dwRequestNotifications,
IN DWORD dwPostRequestNotifications
) = 0;
Parameters
parentModuleId
[IN] The unique identifier for the parent module.
pModuleFactory
[IN] A pointer to the IHttpModuleFactory interface for the HTTP module.
pszModuleName
[IN] A pointer to a string that contains the name of the module to register.
pszModuleType
[IN] A pointer to a string that contains the type of the module.
pszModulePreCondition
[IN] A pointer to a string that contains any preconditions for the module.
dwRequestNotifications
[IN] A bitmask value that contains the request notifications to set for the module. (Defined in Httpserv.h.)
dwPostRequestNotifications
[IN] A bitmask value that contains the post-request notifications to set for the module. (Defined in Httpserv.h.)
Return Value
An HRESULT
. Possible values include, but are not limited to, those in the following table.
Value | Description |
---|---|
S_OK | Indicates that the operation was successful. |
ERROR_FILE_NOT_FOUND | Indicates that the module cannot be found. |
ERROR_INVALID_PARAMETER | Indicates that one of the parameters is not valid. |
ERROR_NOT_ENOUGH_MEMORY | Indicates that there is insufficient memory to perform the operation. |
Remarks
Use the RegisterModule
method inside a CGlobalModule::OnGlobalApplicationResolveModules method to register additional modules that are not listed in the IIS configuration.
Note
Do not confuse the RegisterModule
method with the exported RegisterModule function that is required for all HTTP modules.
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - IIS Express 7.5, IIS Express 8.0, IIS Express 10.0 |
Header | Httpserv.h |