ExtractIconEx

C# Signature:

[DllImport("shell32.dll", CharSet=CharSet.Auto)]
static extern uint ExtractIconEx(string szFileName, int nIconIndex,
   IntPtr[] phiconLarge, IntPtr[] phiconSmall, uint nIcons);

VB Signature:

<DllImport("shell32.dll", CharSet:=CharSet.Auto)> _
Shared Function ExtractIconEx(ByVal szFileName As String, _
            ByVal nIconIndex As Integer, _
            ByRef phiconLarge() As IntPtr, _
            ByRef phiconSmall() As IntPtr, _
            ByVal nIcons As UInteger) As UInteger
End Function

VB 6 Signature:

Declare Function ExtractIconEx _
     Lib "shell32.dll" _
     Alias "ExtractIconExA" _
        (ByVal lpszFile As String, _
         ByVal nIconIndex As Integer, _
         ByRef phiconLarge As Integer, _
         ByRef phiconSmall As Integer, _
         ByVal nIcons As Long) As Integer

Sample Code:

Sample Code (VB Version of above):

Última actualización