Export (0) Print
Expand All

IBITSExtensionSetup::GetCleanupTask method

Use the GetCleanupTask method to retrieve an interface pointer to the cleanup task associated with the virtual directory.

Syntax


HRESULT GetCleanupTask(
  [in]   REFIID riid,
  [out]  IUnknown **ppTask
);

Parameters

riid [in]

Identifies the task scheduler interface to return in ppTask. For a list of identifiers, see the ITaskScheduler::Activate method.

ppTask [out]

A pointer to the interface specified by riid. Use the interface to modify the properties of the task. Release ppTask when done.

Return value

This method returns S_OK for success. Otherwise, the method returns S_FALSE if a task has not been created for the virtual directory.

Remarks

When you create a virtual directory and enable it for BITS uploads, BITS adds a work item in the Task Scheduler. The work item cleans up the virtual directory once every 12 hours by deleting jobs that have not been modified within the time-out period. To specify the time-out period, set the BITSSessionTimeout IIS extension property.

To change the cleanup schedule, see the BITSCleanupUseDefault BITS IIS extension property.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Redistributable

BITS 1.5 on Windows XP

Header

Bitscfg.h

IDL

Bitscfg.idl

DLL

BitsMgr.dll

IID

IID_IBITSExtensionSetup is defined as 29CFBBF7-09E4-4B97-B0BC-F2287E3D8EB3

See also

IBITSExtensionSetup::EnableBITSUploads
IBITSExtensionSetup::GetCleanupTaskName

 

 

Community Additions

ADD
Show:
© 2014 Microsoft