IEmptyVolumeCache::Purge method (emptyvc.h)
Notifies the handler to start deleting its unneeded files.
Syntax
HRESULT Purge(
[in] DWORDLONG dwlSpaceToFree,
[in] IEmptyVolumeCacheCallBack *picb
);
Parameters
[in] dwlSpaceToFree
Type: DWORDLONG
The amount of disk space that the handler should free. If this parameter is set to -1, the handler should delete all its files.
[in] picb
Type: IEmptyVolumeCacheCallback*
A pointer to the disk cleanup manager's IEmptyVolumeCacheCallBack interface. This pointer can be used to call the interface's PurgeProgress method to report on the progress of the operation.
Return value
Type: HRESULT
This method can return one of these values.
Return code | Description |
---|---|
|
Success. |
|
The operation was ended prematurely. This value is usually returned when PurgeProgress returns E_ABORT. This typically happens when the user cancels the operation by clicking the disk cleanup manager's Cancel button. |
Remarks
For Windows 98, the dwSpaceToFree parameter is always set to the value specified by the handler when IEmptyVolumeCache::GetSpaceUsed was called.
In general, handlers should be kept simple and delete all of their files when this function is called. If there are significant performance advantages to only deleting a portion of the files, the handler should implement the ShowProperties method. When called, this method displays a UI that allows the user to select the files to be deleted.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional, Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | emptyvc.h |
DLL | Shell32.dll (version 5.0 or later) |