From f117a8969795b71a96b302e33b0bd4edd4cdaca7 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 7 Apr 2017 12:35:20 -0700 Subject: [PATCH] src: dotnet: WIP --- src/dotnet/FileSystem.cs | 14 +++++++------- src/dotnet/Interop.cs | 20 ++++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/dotnet/FileSystem.cs b/src/dotnet/FileSystem.cs index 5979a3b1..317101dd 100644 --- a/src/dotnet/FileSystem.cs +++ b/src/dotnet/FileSystem.cs @@ -129,7 +129,7 @@ namespace Fsp MountPoint); } Int32 Mount(String MountPoint, - byte[] SecurityDescriptor = null, + Byte[] SecurityDescriptor = null, Boolean Synchronized = false, UInt32 DebugLog = 0) { @@ -195,7 +195,7 @@ namespace Fsp protected virtual Int32 GetSecurityByName( String FileName, out UInt32 FileAttributes/* or ReparsePointIndex */, - ref byte[] SecurityDescriptor) + ref Byte[] SecurityDescriptor) { FileAttributes = default(UInt32); return STATUS_INVALID_DEVICE_REQUEST; @@ -336,7 +336,7 @@ namespace Fsp protected virtual Int32 GetSecurity( Object FileNode, Object FileDesc, - ref byte[] SecurityDescriptor) + ref Byte[] SecurityDescriptor) { return STATUS_INVALID_DEVICE_REQUEST; } @@ -344,7 +344,7 @@ namespace Fsp Object FileNode, Object FileDesc, UInt32 SecurityInformation, - byte[] SecurityDescriptor) + Byte[] SecurityDescriptor) { return STATUS_INVALID_DEVICE_REQUEST; } @@ -427,7 +427,7 @@ namespace Fsp } /* FSP_FILE_SYSTEM_INTERFACE */ - private static byte[] SecurityDescriptorNotNull = new byte[0]; + private static Byte[] SecurityDescriptorNotNull = new Byte[0]; private static Int32 GetVolumeInfo( IntPtr FileSystem, out VolumeInfo VolumeInfo) @@ -473,7 +473,7 @@ namespace Fsp try { UInt32 FileAttributes; - byte[] SecurityDescriptorBytes = null; + Byte[] SecurityDescriptorBytes = null; Int32 Result; if (IntPtr.Zero != PSecurityDescriptorSize) SecurityDescriptorBytes = SecurityDescriptorNotNull; @@ -836,7 +836,7 @@ namespace Fsp try { Object FileNode, FileDesc; - byte[] SecurityDescriptorBytes = null; + Byte[] SecurityDescriptorBytes = null; Int32 Result; Api.GetFullContext(ref FullContext, out FileNode, out FileDesc); if (IntPtr.Zero != PSecurityDescriptorSize) diff --git a/src/dotnet/Interop.cs b/src/dotnet/Interop.cs index 1901b035..c9db4a63 100644 --- a/src/dotnet/Interop.cs +++ b/src/dotnet/Interop.cs @@ -542,11 +542,11 @@ namespace Fsp.Interop internal static unsafe Int32 FspFileSystemSetMountPointEx( IntPtr FileSystem, String MountPoint, - byte[] SecurityDescriptor) + Byte[] SecurityDescriptor) { if (null != SecurityDescriptor) { - fixed (byte *P = SecurityDescriptor) + fixed (Byte *P = SecurityDescriptor) return _FspFileSystemSetMountPointEx(FileSystem, MountPoint, (IntPtr)P); } else @@ -556,7 +556,7 @@ namespace Fsp.Interop internal unsafe static Object GetUserContext( IntPtr NativePtr) { - IntPtr UserContext = *(IntPtr *)((byte *)NativePtr + sizeof(IntPtr)); + IntPtr UserContext = *(IntPtr *)((Byte *)NativePtr + sizeof(IntPtr)); return IntPtr.Zero != UserContext ? GCHandle.FromIntPtr(UserContext).Target : null; } internal unsafe static void SetUserContext( @@ -565,17 +565,17 @@ namespace Fsp.Interop { if (null != Obj) { - Debug.Assert(IntPtr.Zero == *(IntPtr *)((byte *)NativePtr + sizeof(IntPtr))); + Debug.Assert(IntPtr.Zero == *(IntPtr *)((Byte *)NativePtr + sizeof(IntPtr))); GCHandle Handle = GCHandle.Alloc(Obj, GCHandleType.Weak); - *(IntPtr *)((byte *)NativePtr + sizeof(IntPtr)) = (IntPtr)Handle; + *(IntPtr *)((Byte *)NativePtr + sizeof(IntPtr)) = (IntPtr)Handle; } else { - IntPtr UserContext = *(IntPtr *)((byte *)NativePtr + sizeof(IntPtr)); + IntPtr UserContext = *(IntPtr *)((Byte *)NativePtr + sizeof(IntPtr)); if (IntPtr.Zero != UserContext) { GCHandle.FromIntPtr(UserContext).Free(); - *(IntPtr *)((byte *)NativePtr + sizeof(IntPtr)) = IntPtr.Zero; + *(IntPtr *)((Byte *)NativePtr + sizeof(IntPtr)) = IntPtr.Zero; } } } @@ -622,7 +622,7 @@ namespace Fsp.Interop } internal unsafe static Int32 CopySecurityDescriptor( - byte[] SecurityDescriptorBytes, + Byte[] SecurityDescriptorBytes, IntPtr SecurityDescriptor, IntPtr PSecurityDescriptorSize) { @@ -645,12 +645,12 @@ namespace Fsp.Interop } return 0/*STATUS_SUCCESS*/; } - internal static byte[] MakeSecurityDescriptor( + internal static Byte[] MakeSecurityDescriptor( IntPtr SecurityDescriptor) { if (IntPtr.Zero != SecurityDescriptor) { - byte[] SecurityDescriptorBytes = new byte[GetSecurityDescriptorLength(SecurityDescriptor)]; + Byte[] SecurityDescriptorBytes = new Byte[GetSecurityDescriptorLength(SecurityDescriptor)]; Marshal.Copy(SecurityDescriptor, SecurityDescriptorBytes, 0, SecurityDescriptorBytes.Length); return SecurityDescriptorBytes;