Desktop Functions: Smart Device Functions:
|
Search Results for "SHFileOperation" in [All]StructuresUnder x64, the SHFILEOPSTRUCT must be declared without the Pack = 1 parameter, or it will fail. This is a real pain if you want your code to be platform independent, as you have to declare two separate structures, one with Pack = 1, and one without. You then have to declare two different SHFileOperation calls, one for each of the structures. Then you have to decide which one to call depending on whether you are running on 32 or 64 bit. shell32If you are interested in this you might want to use the SHFileOperation to move things to the recycle bin.
static extern int SHFileOperation([In] ref SHFILEOPSTRUCT lpFileOp);
Public Function SHFileOperation(<MarshalAs(UnmanagedType.Struct)>ByRef lpFileOp As SHFILEOPSTRUCT) As Integer
Public Declare Function SHFileOperation Lib "shell32" Alias "SHFileOperationA" _
public class InteropSHFileOperation
static extern int SHFileOperation([In, Out] ref SHFILEOPSTRUCT lpFileOp);
public InteropSHFileOperation()
return SHFileOperation(ref this._ShFile) == 0;//true if no errors |