コード例 #1
0
 public static int OnSelectionChange(IntPtr thisPtr, IntPtr pfd)
 {
     try
     {
         Shell32.IFileDialogEvents inst = ComInterfaceDispatch.GetInstance <Shell32.IFileDialogEvents>((ComInterfaceDispatch *)thisPtr);
         Shell32.IFileDialog       fd   = (Shell32.IFileDialog)Instance.GetOrCreateObjectForComInstance(pfd, CreateObjectFlags.Unwrap);
         return((int)inst.OnSelectionChange(fd));
     }
     catch (Exception ex)
     {
         return(ex.HResult);
     }
 }
コード例 #2
0
 public static int OnShareViolation(IntPtr thisPtr, IntPtr pfd, IntPtr psi, Shell32.FDESVR *pResponse)
 {
     try
     {
         Shell32.IFileDialogEvents inst = ComInterfaceDispatch.GetInstance <Shell32.IFileDialogEvents>((ComInterfaceDispatch *)thisPtr);
         Shell32.IFileDialog       fd   = (Shell32.IFileDialog)Instance.GetOrCreateObjectForComInstance(pfd, CreateObjectFlags.Unwrap);
         Shell32.IShellItem        si   = (Shell32.IShellItem)Instance.GetOrCreateObjectForComInstance(psi, CreateObjectFlags.Unwrap);
         return((int)inst.OnShareViolation(fd, si, pResponse));
     }
     catch (Exception ex)
     {
         return(ex.HResult);
     }
 }
コード例 #3
0
 public static int OnFolderChanging(IntPtr thisPtr, IntPtr pfd, IntPtr psiFolder)
 {
     try
     {
         Shell32.IFileDialogEvents inst     = ComInterfaceDispatch.GetInstance <Shell32.IFileDialogEvents>((ComInterfaceDispatch *)thisPtr);
         Shell32.IFileDialog       fd       = (Shell32.IFileDialog)Instance.GetOrCreateObjectForComInstance(pfd, CreateObjectFlags.Unwrap);
         Shell32.IShellItem        siFolder = (Shell32.IShellItem)Instance.GetOrCreateObjectForComInstance(psiFolder, CreateObjectFlags.Unwrap);
         return((int)inst.OnFolderChanging(fd, siFolder));
     }
     catch (Exception ex)
     {
         return(ex.HResult);
     }
 }
コード例 #4
0
 void Shell32.IFileOpenDialog.Advise(Shell32.IFileDialogEvents pfde, out uint pdwCookie)
 {
     ((Shell32.IFileDialog) this).Advise(pfde, out pdwCookie);
 }