コード例 #1
0
        public static int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp)
        {
            if (IntPtr.Size == 4)
            {
                return(SHFileOperation32(ref lpFileOp));
            }
            SHFILEOPSTRUCT64 shfileopstruct = new SHFILEOPSTRUCT64();

            shfileopstruct.hwnd   = lpFileOp.hwnd;
            shfileopstruct.wFunc  = lpFileOp.wFunc;
            shfileopstruct.pFrom  = lpFileOp.pFrom;
            shfileopstruct.pTo    = lpFileOp.pTo;
            shfileopstruct.fFlags = lpFileOp.fFlags;
            shfileopstruct.fAnyOperationsAborted = lpFileOp.fAnyOperationsAborted;
            shfileopstruct.hNameMappings         = lpFileOp.hNameMappings;
            shfileopstruct.lpszProgressTitle     = lpFileOp.lpszProgressTitle;
            int num = SHFileOperation64(ref shfileopstruct);

            lpFileOp.fAnyOperationsAborted = shfileopstruct.fAnyOperationsAborted;
            return(num);
        }
コード例 #2
0
 private static extern int SHFileOperation64(ref SHFILEOPSTRUCT64 lpFileOp);