Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

IFileDialog (Interfaces)
 
.
Summary
TODO - a short description

C# Definition:

[ComImport, Guid ( "973510DB-7D7F-452B-8975-74A85828D354" ), InterfaceType ( ComInterfaceType.InterfaceIsIUnknown )]
interface IFileDialogEvents
{
    // NOTE: some of these callbacks are cancelable - returning S_FALSE means that
    // the dialog should not proceed (e.g. with closing, changing folder); to
    // support this, we need to use the PreserveSig attribute to enable us to return
    // the proper HRESULT
    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime ), PreserveSig]
    HRESULT OnFileOk ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd );

[ComImport, Guid ( "42f85136-db7e-439c-85f1-e4075d135fc8" ), InterfaceType ( ComInterfaceType.InterfaceIsIUnknown )]
interface IFileDialog : IModalWindow
{
    // Defined on IModalWindow - repeated here due to requirements of COM interop layer
    // --------------------------------------------------------------------------------
    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime ), PreserveSig]
    HRESULT OnFolderChanging ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd,
                   [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psiFolder );
    int Show ( [In] IntPtr parent );

    // IFileDialog-Specific interface members
    // --------------------------------------------------------------------------------
    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void OnFolderChange ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd );
    void SetFileTypes ( [In] uint cFileTypes,
                [In, MarshalAs ( UnmanagedType.LPArray )] COMDLG_FILTERSPEC[] rgFilterSpec );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void OnSelectionChange ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd );
    void SetFileTypeIndex ( [In] uint iFileType );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void OnShareViolation ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd,
                [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psi,
                out FDE_SHAREVIOLATION_RESPONSE pResponse );
    void GetFileTypeIndex ( out uint piFileType );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void OnTypeChange ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd );
    void Advise ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialogEvents pfde, out uint pdwCookie );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void OnOverwrite ( [In, MarshalAs ( UnmanagedType.Interface )] IFileDialog pfd,
               [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psi,
               out FDE_OVERWRITE_RESPONSE pResponse );
}
    void Unadvise ( [In] uint dwCookie );

VB Definition:

<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface IFileDialogEvents
   TODO
End Interface

User-Defined Types:

None.

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetOptions ( [In] FOS fos );

Notes:

None.

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void GetOptions ( out FOS pfos );

Documentation

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetDefaultFolder ( [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psi );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetFolder ( [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psi );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void GetFolder ( [MarshalAs ( UnmanagedType.Interface )] out IShellItem ppsi );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void GetCurrentSelection ( [MarshalAs ( UnmanagedType.Interface )] out IShellItem ppsi );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetFileName ( [In, MarshalAs ( UnmanagedType.LPWStr )] string pszName );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void GetFileName ( [MarshalAs ( UnmanagedType.LPWStr )] out string pszName );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetTitle ( [In, MarshalAs ( UnmanagedType.LPWStr )] string pszTitle );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetOkButtonLabel ( [In, MarshalAs ( UnmanagedType.LPWStr )] string pszText );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetFileNameLabel ( [In, MarshalAs ( UnmanagedType.LPWStr )] string pszLabel );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void GetResult ( [MarshalAs ( UnmanagedType.Interface )] out IShellItem ppsi );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void AddPlace ( [In, MarshalAs ( UnmanagedType.Interface )] IShellItem psi, NativeMethods.FDAP fdap );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetDefaultExtension ( [In, MarshalAs ( UnmanagedType.LPWStr )] string pszDefaultExtension );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void Close ( [MarshalAs ( UnmanagedType.Error )] int hr );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetClientGuid ( [In] ref Guid guid );

    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void ClearClientData ( );

    // Not supported:  IShellItemFilter is not defined, converting to IntPtr
    [MethodImpl ( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )]
    void SetFilter ( [MarshalAs ( UnmanagedType.Interface )] IntPtr pFilter );
    }
}

VB Definition:

<ComImport> _
<Guid("TODO")> _
'TODO: Insert <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _ if this doesn't derive from IDispatch
Interface IFileDialog
   TODO
End Interface

User-Defined Types:

None.

Notes:

None.

Documentation
IFileDialog on MSDN

Please edit this page!

Do you have...

  • helpful tips?
  • corrections to the existing content?
  • alternate definitions?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions