次の方法で共有


SHFileOperation (Compact 2013)

3/28/2014

This function can be used to copy, move, rename, or delete a file system object.

Syntax

int SHFileOperation(
  LPSHFILEOPSTRUCT lpFileOp
);

Parameters

  • lpFileOp
    [in] Address of an SHFILEOPSTRUCT structure that contains information this function needs to carry out the specified operation.

Return Value

Returns zero if successful, or nonzero otherwise.

Remarks

You should use fully qualified path names with this function. Using it with relative path names is not thread-safe.

When used to delete a file, SHFileOperation attempts to place the deleted file in the Recycle Bin. If you wish to delete a file and guarantee that it is not placed in the Recycle Bin, use DeleteFile.

Requirements

Header

shellapi.h

Library

ceshell.lib

See Also

Reference

Shell Functions
SHFILEOPSTRUCT

Other Resources

DeleteFile