Click here to Skip to main content
15,914,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends...
i am using .net 3.5 and i got a code in study that is

VB
Public Declare Auto Function SHGetFileInfo Lib "shell32.dll" (ByVal pszPath As String, ByVal dwFileAttributes As Integer, ByRef psfi As SHFILEINFO, ByVal cbFileInfo As Integer, ByVal uFlags As Integer) As IntPtr
    ' declare some constants that SHGetFileInfo requires

    Public Const SHGFI_ICON = &H100
    Public Const SHGFI_SMALLICON = &H1
    Public Const SHGFI_LARGEICON = &H0         ' Large icon
    Public Const SHGFI_USEFILEATTRIBUTES = &H10
    Public Const FILE_ATTRIBUTE_DIRECTORY = &H10
    Public Const FILE_ATTRIBUTE_NORMAL = &H80

    ' define the SHFILEINFO structure
    Structure SHFILEINFO
        Public hIcon As IntPtr
        Public iIcon As Integer
        Public dwAttributes As Integer

        <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=260)> Public szDisplayName As String
        <Runtime.InteropServices.MarshalAs(Runtime.InteropServices.UnmanagedType.ByValTStr, SizeConst:=80)> Public szTypeName As String
    End Structure


i want to know about these keyword, functions, variable.
i want to learn about this. can anyone help me out to learn these things
in detail.
Posted
Updated 10-Jan-14 19:50pm
v2

1 solution

No, not really - that isn't a question, it's a tutorial! And we can't give tutorials on complex subjects - which this most definitely is - in a little text box like this...

So start with MSDN: Using P/Invoke to Call Unmanaged APIs from Your Managed Classes[^] and see if that helps.
 
Share this answer
 
Comments
PDBHONGAON 11-Jan-14 5:00am    
Thanks
OriginalGriff 11-Jan-14 5:10am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900