mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 16:33:02 -05:00
src: dotnet: WIP
This commit is contained in:
parent
858f77cdf7
commit
74c2494bbd
@ -367,10 +367,25 @@ namespace Fsp
|
||||
Boolean ResolveLastPathComponent,
|
||||
out IoStatusBlock PIoStatus,
|
||||
IntPtr Buffer,
|
||||
out UIntPtr PSize)
|
||||
ref UIntPtr PSize)
|
||||
{
|
||||
return Api.FspFileSystemResolveReparsePoints(
|
||||
_FileSystem,
|
||||
GetReparsePointByName,
|
||||
IntPtr.Zero,
|
||||
FileName,
|
||||
ReparsePointIndex,
|
||||
ResolveLastPathComponent,
|
||||
out PIoStatus,
|
||||
Buffer,
|
||||
ref PSize);
|
||||
}
|
||||
protected virtual Int32 GetReparsePointByName(
|
||||
String FileName,
|
||||
Boolean IsDirectory,
|
||||
IntPtr Buffer,
|
||||
ref UIntPtr PSize)
|
||||
{
|
||||
PIoStatus = default(IoStatusBlock);
|
||||
PSize = default(UIntPtr);
|
||||
return STATUS_INVALID_DEVICE_REQUEST;
|
||||
}
|
||||
protected virtual Int32 GetReparsePoint(
|
||||
@ -897,7 +912,7 @@ namespace Fsp
|
||||
Boolean ResolveLastPathComponent,
|
||||
out IoStatusBlock PIoStatus,
|
||||
IntPtr Buffer,
|
||||
out UIntPtr PSize)
|
||||
ref UIntPtr PSize)
|
||||
{
|
||||
FileSystem self = (FileSystem)Api.FspFileSystemGetUserContext(FileSystem);
|
||||
try
|
||||
@ -908,12 +923,33 @@ namespace Fsp
|
||||
ResolveLastPathComponent,
|
||||
out PIoStatus,
|
||||
Buffer,
|
||||
out PSize);
|
||||
ref PSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
PIoStatus = default(IoStatusBlock);
|
||||
PSize = default(UIntPtr);
|
||||
return self.ExceptionHandler(ex);
|
||||
}
|
||||
}
|
||||
private static Int32 GetReparsePointByName(
|
||||
IntPtr FileSystem,
|
||||
IntPtr Context,
|
||||
String FileName,
|
||||
Boolean IsDirectory,
|
||||
IntPtr Buffer,
|
||||
ref UIntPtr PSize)
|
||||
{
|
||||
FileSystem self = (FileSystem)Api.FspFileSystemGetUserContext(FileSystem);
|
||||
try
|
||||
{
|
||||
return self.GetReparsePointByName(
|
||||
FileName,
|
||||
IsDirectory,
|
||||
Buffer,
|
||||
ref PSize);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return self.ExceptionHandler(ex);
|
||||
}
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ namespace Fsp.Interop
|
||||
Boolean ResolveLastPathComponent,
|
||||
out IoStatusBlock PIoStatus,
|
||||
IntPtr Buffer,
|
||||
out UIntPtr PSize);
|
||||
ref UIntPtr PSize);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
internal delegate Int32 GetReparsePoint(
|
||||
IntPtr FileSystem,
|
||||
@ -416,6 +416,24 @@ namespace Fsp.Interop
|
||||
internal static extern Int32 FspFileSystemStopDispatcher(
|
||||
IntPtr FileSystem);
|
||||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern Int32 FspFileSystemFindReparsePoint(
|
||||
IntPtr FileSystem,
|
||||
GetReparsePointByName GetReparsePointByName,
|
||||
IntPtr Context,
|
||||
[MarshalAs(UnmanagedType.LPWStr)] String FileName,
|
||||
out UInt32 PReparsePointIndex);
|
||||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern Int32 FspFileSystemResolveReparsePoints(
|
||||
IntPtr FileSystem,
|
||||
GetReparsePointByName GetReparsePointByName,
|
||||
IntPtr Context,
|
||||
[MarshalAs(UnmanagedType.LPWStr)] String FileName,
|
||||
UInt32 ReparsePointIndex,
|
||||
Boolean ResolveLastPathComponent,
|
||||
out IoStatusBlock PIoStatus,
|
||||
IntPtr Buffer,
|
||||
ref UIntPtr PSize);
|
||||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern Int32 FspVersion(
|
||||
out UInt32 PVersion);
|
||||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
|
||||
@ -424,6 +442,16 @@ namespace Fsp.Interop
|
||||
[DllImport(DllName, CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern UInt32 FspWin32FromNtStatus(
|
||||
Int32 Status);
|
||||
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
internal delegate Int32 GetReparsePointByName(
|
||||
IntPtr FileSystem,
|
||||
IntPtr Context,
|
||||
[MarshalAs(UnmanagedType.LPWStr)] String FileName,
|
||||
Boolean IsDirectory,
|
||||
IntPtr Buffer,
|
||||
ref UIntPtr PSize);
|
||||
|
||||
internal static unsafe Int32 FspFileSystemSetMountPointEx(
|
||||
IntPtr FileSystem,
|
||||
String MountPoint,
|
||||
|
Loading…
x
Reference in New Issue
Block a user