コード例 #1
0
        static bool operate(FO func, string[] fileNames, string pTo, FOF flags, IntPtr handle)
        {
            SHFILEOPSTRUCT shell = new SHFILEOPSTRUCT();
            shell.hwnd = handle;
            shell.wFunc = func;
            shell.pFrom = string.Empty;

            foreach (string fileName in fileNames)
            {
                shell.pFrom += fileName + '\0';
            }

            shell.pFrom += '\0';
            shell.pTo = pTo;
            shell.fFlags = flags;
            shell.fAnyOperationsAborted = false;
            shell.hNameMappings = IntPtr.Zero;
            shell.lpszProgressTitle = string.Empty;
            return (Shell32.SHFileOperation(ref shell) == 0);
        }
コード例 #2
0
ファイル: Shell32.cs プロジェクト: project-flower/treemove
 extern public static int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);
コード例 #3
0
ファイル: Shell32.cs プロジェクト: project-flower/treemove
 public extern static int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);