The Labs \ Source Viewer \ SSCLI \ Microsoft.Win32 \ UnsafeNativeMethods

  1. //------------------------------------------------------------------------------
  2. // <copyright file="UnsafeNativeMethods.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace Microsoft.Win32
  16. {
  17.     using System.Runtime.InteropServices;
  18.     using System.Threading;
  19.     using System;
  20.     using System.Security.Permissions;
  21.     using System.Collections;
  22.     using System.IO;
  23.     using System.Diagnostics.CodeAnalysis;
  24.     using System.Text;
  25.     using Microsoft.Win32.SafeHandles;
  26.     using System.Configuration;
  27.    
  28.     [HostProtectionAttribute(MayLeakOnAbort = true)]
  29.     [System.Security.SuppressUnmanagedCodeSecurity()]
  30.     static internal class UnsafeNativeMethods
  31.     {
  32.        
  33.         [DllImport(ExternDll.Kernel32, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
  34.         public static extern IntPtr GetStdHandle(int type);
  35.        
  36.         public const int GetFileExInfoStandard = 0;
  37.        
  38.         [StructLayout(LayoutKind.Sequential)]
  39.         public struct WIN32_FILE_ATTRIBUTE_DATA
  40.         {
  41.             internal int fileAttributes;
  42.             internal uint ftCreationTimeLow;
  43.             internal uint ftCreationTimeHigh;
  44.             internal uint ftLastAccessTimeLow;
  45.             internal uint ftLastAccessTimeHigh;
  46.             internal uint ftLastWriteTimeLow;
  47.             internal uint ftLastWriteTimeHigh;
  48.             internal uint fileSizeHigh;
  49.             internal uint fileSizeLow;
  50.         }
  51.        
  52.        
  53.     }
  54. }

Developer Fusion