예제 #1
0
파일: APIsShell.cs 프로젝트: utobe/QuickMon
        public static bool DoOperation(IntPtr Handle, string[] source, string dest, APIsEnums.FileOperations operation)
        {
            APIsStructs.SHFILEOPSTRUCT fileop = new APIsStructs.SHFILEOPSTRUCT();
            fileop.hwnd = Handle;
            fileop.lpszProgressTitle = Enum.GetName(typeof(APIsEnums.FileOperations), operation);
            fileop.wFunc             = (uint)operation;
            fileop.pFrom             = Marshal.StringToHGlobalUni(StringArrayToMultiString(source));
            fileop.pTo = Marshal.StringToHGlobalUni(dest);
            fileop.fAnyOperationsAborted = 0;
            fileop.hNameMappings         = IntPtr.Zero;

            return(SHFileOperation(ref fileop) == 0);
        }
예제 #2
0
파일: APIsShell.cs 프로젝트: utobe/QuickMon
 public static extern Int32 SHFileOperation(
     ref APIsStructs.SHFILEOPSTRUCT FileOp);