Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
Available now!
Buy at Amazon US or
Buy at Amazon UK



Articles

1.Windows API reference
2.HTML to WML Converter
3.Webcam streaming in VB.NET
4.Remoting with firewalls
5.RSA from first principles
6.Key & MouseLogger in .NET
7.Networking Resource Kit for .NET
8.Automatic Reboot with .NET
9.XAML Schema
10.Migrating VB6 Winsock to VB.NET
11.Migrating C++ sockets to C#
12.RFC Reference guide
13.Lingua - Localization webservice
14.COM Reference guide
15.WMI Reference guide
16.SQL stored procedures
17.TCP & UDP port reference
18..NET Framework reference
19.Ethernet Type codes
20.IP to country webservice
21.MAC address assignments
22.DLL entry point reference
23.WHOIS server list
24. Turing Numbers
25. Boost SQL performance
26. Progress Bar in ASP.NET
27. OleDb WebService
27. Internet Explorer

Contact us

SHGetFileInfo Reference in C#, VB.NET and VB6

Library:shell32.dll

Visual Basic 6 definition
Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA" (ByVal pszPath As Any, ByVal dwFileAttributes As Long, psfi As SHFILEINFO, ByVal cbFileInfo As Long, ByVal uFlags As Long) As Long

Visual Basic .NET definition
Declare Function SHGetFileInfo Lib "shell32.dll" Alias "SHGetFileInfoA"(ByVal pszPath As String, ByVal dwFileAttributes As Integer, ByRef psfi As SHFILEINFO, ByVal cbFileInfo As Integer, ByVal uFlags As Integer) As Integer

C# definition
[DllImport("shell32.dll", EntryPoint="SHGetFileInfo")] public static extern int SHGetFileInfoA(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, int uFlags)

Description

SHGetFileInfo retrieves information about a file system object in the shell. Such file system objects include files, directories, virtual folders, and drives. The information retrieved generally relates to how the object appears in the system shell.

Return Value

If the uFlags parameter contains the SHGFI_EXETYPE flag, the function returns a value identifying the type of the executable file. If both the low-order and high-order words are not zero, the file is a Windows application. If only the low-order word is not zero but the high-order word is zero, the file is an MS-DOS based program or batch file or a 32-bit Windows console application. If the entire return value is zero, an error occured. If the uFlags parameter instead contains the SHGFI_SYSICONINDEX flag, the function returns a handle to an internal image list which contains the icon requested by the function. If this value is zero, an error occured. If neither of those two flags are specified, the return value is a non-zero value if successful, or zero if an error occured.

Parameters

Constants

Further Information:

For further information on Windows API functions such as these, and how to use these API's in your C# and VB.NET applications, please refer to the book 'Network programming in .NET' (Buy at Amazon UK) (Buy at Amazon US)

Visual Basic 6 example source code

Visual Basic .NET example source code

C# example source code

Provide a code example

C#
VB.NET
VB6




Google

Free SMS UK Free SMS Ireland SMS Gratis Norway SMS Gratis Sverige Ilmainen SMS Suomi SMS Gratis Danmark SMS Tasuta Eestisse SMS Nemokamai Lietuva SMS Bezmaksas Latviju Darmowe smsy Polska SMS Zdarma Ceské SMS Zdarma Slovensko SMS Gratis Deutschland SMS Gratis Schweiz SMS Gratis Österreich SMS Gratuit Belgique SMS Gratis Nederland SMS Gratuit France SMS Gratis Espańa SMS Gratis Portugal Free SMS South Africa Free SMS USA SMS Percuma Malaysia Free SMS Hong Kong