GetFileInformationByHandle (kernel32)
Last changed: imaginarydevelopment@googlemail.com-50.193.161.217

.
Summary

C# Signature:

[DllImport("kernel32.dll", SetLastError = true)]
static extern bool GetFileInformationByHandle(
    IntPtr hFile,
    out BY_HANDLE_FILE_INFORMATION lpFileInformation
);

or, if you want to use a handle from managed code:

[DllImport("kernel32.dll", SetLastError = true)]
static extern bool GetFileInformationByHandle(
    Microsoft.Win32.SafeHandles.SafeFileHandle hFile,
    out BY_HANDLE_FILE_INFORMATION lpFileInformation
);

VB.NET Signature:

Declare Auto Function GetFileInformationByHandle Lib "kernel32.dll" (ByVal hFile As IntPtr, ByRef lpFileInformation As BY_HANDLE_FILE_INFORMATION) As Boolean

User-Defined Types:

http://pinvoke.net/default.aspx/Structures/BY_HANDLE_FILE_INFORMATION.html

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation