IIISApplicationAdmin::CreateApplication
The IIISApplicationAdmin::CreateApplication method creates an application on a path in the metabase if IIS is running in worker process isolation mode. This method optionally creates the application pool if it does not already exist. Use the GetProcessMode method to ensure that IIS is running in worker process isolation mode before using this method. For more information about isolation modes, see IIS Modes of Operation.
STDMETHODIMP CreateApplication(
LPCWSTR szMDPath,
DWORD dwAppModeIn,
LPCWSTR szAppPoolId,
BOOL CreatePool
);
Parameters
szMDPath
Specifies the metabase path to the starting point of the application, of the form "/LM/W3SVC/<path>".dwAppModeIn
Specifies the isolation mode. This parameter can have only one of the following values:Value
Meaning
0
Runs in the INETINFO process in the application pool.
1
Runs out of process in its own DLLHOST.
2
Runs in the pooled application DLLHOST.
szAppPoolId
Pointer to a NULL terminated string indicating the name of the application pool in which to run the new application. If not provided (set to NULL), the API sets AppPoolId to the inherited AppPoolId property setting.CreatePool
If TRUE, creates an application pool by the name indicated in szAppPoolId, if that pool does not already exist.
Return Values
This method returns S_OK if the method succeeded, or other error codes converted to an HRESULT if the method failed.
Requirements
Server: Requires or Windows Server 2003.
Product: IIS
Header: Declared in iwamreg.h.