IExtractIcon (Interfaces)
Last changed: -98.92.131.209

.
Summary
TODO - a short description

C# Signature:

// UNICODE version

[ComImport()]
[Guid("000214fa-0000-0000-c000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IExtractIcon
{
   [PreserveSig]
   int GetIconLocation(
        uint uFlags,
        [Out, MarshalAs(UnmanagedType.LPWStr, SizeParamIndex = 2 )] StringBuilder szIconFile,
        int cchMax,
        out int piIndex,
        out uint pwFlags);

   [PreserveSig]
   int Extract(
        [MarshalAs( UnmanagedType.LPWStr )] string pszFile,
        uint nIconIndex,
        out IntPtr phiconLarge,
        out IntPtr phiconSmall,
        uint nIconSize);
}

// ANSI version

[ComImport()]
[Guid("000214eb-0000-0000-c000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
interface IExtractIcon
{
   [PreserveSig]
   int GetIconLocation(uint uFlags,
   [MarshalAs(UnmanagedType.LPStr)] StringBuilder szIconFile,
              int cchMax,
              out int piIndex,
              out uint pwFlags);

   [PreserveSig]
   int Extract(string pszFile,
          uint nIconIndex,
          out IntPtr phiconLarge,
          out IntPtr phiconSmall,
          uint nIconSize);
}

VB Signature:

<ComImport()> _
<Guid("000214eb-0000-0000-c000-000000000046")> _
<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _

     <PreserveSig()> _
     Function GetIconLocation(ByVal uFlags As Integer, _
                 <MarshalAs(UnmanagedType.LPStr)> _
                  ByRef szIconFile As StringBuilder, _
                  ByVal cchMax As Integer, _
                  ByRef piIndex As Integer, _
                  ByRef pwFlags As Integer) As Integer

Public Interface IExtractIcon
     <PreserveSig()> _
     Function Extract(ByVal pszFile As IntPtr, _
              ByVal nIconIndex As Integer, _
              ByVal phiconLarge As IntPtr, _
              ByVal phiconSmall As IntPtr, _
              ByVal nIconSize As Integer) As Integer
End Interface

User-Defined Types:

None.

Notes:

GetIconLocation() must be declared before Extract()! If you don't, you will get a cryptic runtime error (Read/write of protected memory).

-> olala...

Documentation