diff options
Diffstat (limited to 'src/Text/Impl/TextModel/NativeMethods.cs')
-rw-r--r-- | src/Text/Impl/TextModel/NativeMethods.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Text/Impl/TextModel/NativeMethods.cs b/src/Text/Impl/TextModel/NativeMethods.cs new file mode 100644 index 0000000..78d507b --- /dev/null +++ b/src/Text/Impl/TextModel/NativeMethods.cs @@ -0,0 +1,28 @@ +using System.Runtime.InteropServices; + +namespace Microsoft.VisualStudio.Text.Implementation +{ + [StructLayout(LayoutKind.Sequential)] + internal struct BY_HANDLE_FILE_INFORMATION + { + public uint FileAttributes; + public System.Runtime.InteropServices.ComTypes.FILETIME CreationTime; + public System.Runtime.InteropServices.ComTypes.FILETIME LastAccessTime; + public System.Runtime.InteropServices.ComTypes.FILETIME LastWriteTime; + public uint VolumeSerialNumber; + public uint FileSizeHigh; + public uint FileSizeLow; + public uint NumberOfLinks; + public uint FileIndexHigh; + public uint FileIndexLow; + } + + internal static class NativeMethods + { + [DllImport("kernel32.dll", SetLastError = true)] + internal static extern bool GetFileInformationByHandle( + Microsoft.Win32.SafeHandles.SafeFileHandle hFile, + out BY_HANDLE_FILE_INFORMATION lpFileInformation + ); + } +} |