Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Support Forum
Download Visual Studio Add-In

Terms of Use
Privacy Policy

Search Results for "SHFileOperation" in [All]

Structures

.
Summary
.

Under 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.

shell32

.

If you are interested in this you might want to use the SHFileOperation to move things to the recycle bin.

. .
Summary
.

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

.
Documentation
[SHFileOperation] on MSDN

 
Access PInvoke.net directly from VS: