none
IShellDetails interface definition for VB.Net RRS feed

  • Question

  • Hi All,

     

    i'm looking for the IShellDetails interface definition for VB.Net to use the GetDetailsOf function of an

    IShellFolder

     

    Thanks in advance.

     

    Yomm

     

     

     

    Thursday, April 19, 2007 5:40 PM

Answers

  •  

    i found :

     

    #Region " IShellDetails"

    <ComImportAttribute(), _

    Guid("000214EC-0000-0000-C000-000000000046"), _

    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _

    Public Interface IShellDetails

    <PreserveSig()> _

    Function GetDetailsOf( _

    ByVal pidl As System.IntPtr, _

    ByVal iColumn As Integer, _

    ByRef pDetails As SHELLDETAILS) As Integer

    <PreserveSig()> _

    Function ColumnClick(ByVal iColumn As Integer) As Integer

    End Interface

    #End Region

     

    #Region " STRRET"

    <StructLayout(LayoutKind.Explicit)> _

    Public Structure STRRET

    <FieldOffset(0)> Public uType As Integer ' One of the STRRET_* values

    <FieldOffset(4)> Public pOleStr As Integer ' must be freed by caller of GetDisplayNameOf

    <FieldOffset(4)> Public uOffset As Integer ' Offset into SHITEMID

    <FieldOffset(4)> Public [cStr] As Integer ' NOT USED

    End Structure

    #End Region

    #Region " SHELLDETAILS"

    <StructLayout(LayoutKind.Sequential)> _

    Public Structure SHELLDETAILS

    Public Justify As Integer

    Public Width As Integer

    Public Text As STRRET

    End Structure

    #End Region

    #End Region

    Friday, April 20, 2007 4:01 PM

All replies

  •  

    I founded something like

     

        <ComImport(), _

        Guid("000214EC-0000-0000-C000-000000000046"), _

        InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _

        Public Interface IShellDetails

            Inherits IUnknown

            <PreserveSig()> _

            Function GetDetailsOf( _

                ByVal pidl As System.IntPtr, _

                ByVal iColumn As Integer, _

                <MarshalAs(UnmanagedType.U4)> _

                ByVal pDetails As SHELLDETAILS) As Integer 

            <PreserveSig()> _

            Function ColumnClick(ByVal iColumn As Integer) As Integer

    End Interface

     

    but i receive an AccessViolationException error when i use isfParent.CreateViewObject(hwndOwner, IID_IShellDetails, isdParent)

     

    The isdParent variable is defined as an IShellDetails and the CreateViewObject function is defined in the IShellFolder interface as :

     

    <PreserveSig()> _

    Function CreateViewObject( _

       ByVal hwndOwner As IntPtr, _

       ByVal riid As Guid, _

       ByVal ppvOut As IShellDetails) As Integer

     

    I tried to change the type IShellDetails in the declaration with IUnknown but with no results.

     

    I'm sure the isfParent is good that's why the problem must come from de IShellDetails declaration or the CreateViewObject one.

     

    Thanks to anyone who could help me.

    Friday, April 20, 2007 12:17 PM
  •  

    i found :

     

    #Region " IShellDetails"

    <ComImportAttribute(), _

    Guid("000214EC-0000-0000-C000-000000000046"), _

    InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _

    Public Interface IShellDetails

    <PreserveSig()> _

    Function GetDetailsOf( _

    ByVal pidl As System.IntPtr, _

    ByVal iColumn As Integer, _

    ByRef pDetails As SHELLDETAILS) As Integer

    <PreserveSig()> _

    Function ColumnClick(ByVal iColumn As Integer) As Integer

    End Interface

    #End Region

     

    #Region " STRRET"

    <StructLayout(LayoutKind.Explicit)> _

    Public Structure STRRET

    <FieldOffset(0)> Public uType As Integer ' One of the STRRET_* values

    <FieldOffset(4)> Public pOleStr As Integer ' must be freed by caller of GetDisplayNameOf

    <FieldOffset(4)> Public uOffset As Integer ' Offset into SHITEMID

    <FieldOffset(4)> Public [cStr] As Integer ' NOT USED

    End Structure

    #End Region

    #Region " SHELLDETAILS"

    <StructLayout(LayoutKind.Sequential)> _

    Public Structure SHELLDETAILS

    Public Justify As Integer

    Public Width As Integer

    Public Text As STRRET

    End Structure

    #End Region

    #End Region

    Friday, April 20, 2007 4:01 PM