예제 #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);
예제 #3
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;
 }
예제 #4
0
 private static extern int SHFileOperation64(ref SHFILEOPSTRUCT64 lpFileOp);