mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-04 09:52:56 -05:00
src: dll,dotnet: add out-of-line API's
This commit is contained in:
64
src/dll/fs.c
64
src/dll/fs.c
@ -619,3 +619,67 @@ FSP_API FSP_FILE_SYSTEM_OPERATION_CONTEXT *FspFileSystemGetOperationContext(VOID
|
||||
{
|
||||
return (FSP_FILE_SYSTEM_OPERATION_CONTEXT *)TlsGetValue(FspFileSystemTlsKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Out-of-Line
|
||||
*/
|
||||
|
||||
FSP_API PWSTR FspFileSystemMountPointF(FSP_FILE_SYSTEM *FileSystem)
|
||||
{
|
||||
return FspFileSystemMountPoint(FileSystem);
|
||||
}
|
||||
|
||||
FSP_API NTSTATUS FspFileSystemEnterOperationF(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response)
|
||||
{
|
||||
return FspFileSystemEnterOperation(FileSystem, Request, Response);
|
||||
}
|
||||
|
||||
FSP_API NTSTATUS FspFileSystemLeaveOperationF(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FSCTL_TRANSACT_REQ *Request, FSP_FSCTL_TRANSACT_RSP *Response)
|
||||
{
|
||||
return FspFileSystemLeaveOperation(FileSystem, Request, Response);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemSetOperationGuardF(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FILE_SYSTEM_OPERATION_GUARD *EnterOperation,
|
||||
FSP_FILE_SYSTEM_OPERATION_GUARD *LeaveOperation)
|
||||
{
|
||||
FspFileSystemSetOperationGuard(FileSystem, EnterOperation, LeaveOperation);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemSetOperationGuardStrategyF(FSP_FILE_SYSTEM *FileSystem,
|
||||
FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY GuardStrategy)
|
||||
{
|
||||
FspFileSystemSetOperationGuardStrategy(FileSystem, GuardStrategy);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemSetOperationF(FSP_FILE_SYSTEM *FileSystem,
|
||||
ULONG Index,
|
||||
FSP_FILE_SYSTEM_OPERATION *Operation)
|
||||
{
|
||||
FspFileSystemSetOperation(FileSystem, Index, Operation);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemGetDispatcherResultF(FSP_FILE_SYSTEM *FileSystem,
|
||||
NTSTATUS *PDispatcherResult)
|
||||
{
|
||||
FspFileSystemGetDispatcherResult(FileSystem, PDispatcherResult);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemSetDispatcherResultF(FSP_FILE_SYSTEM *FileSystem,
|
||||
NTSTATUS DispatcherResult)
|
||||
{
|
||||
FspFileSystemSetDispatcherResult(FileSystem, DispatcherResult);
|
||||
}
|
||||
|
||||
FSP_API VOID FspFileSystemSetDebugLogF(FSP_FILE_SYSTEM *FileSystem,
|
||||
UINT32 DebugLog)
|
||||
{
|
||||
FspFileSystemSetDebugLog(FileSystem, DebugLog);
|
||||
}
|
||||
|
||||
FSP_API BOOLEAN FspFileSystemIsOperationCaseSensitiveF(VOID)
|
||||
{
|
||||
return FspFileSystemIsOperationCaseSensitive();
|
||||
}
|
||||
|
@ -162,12 +162,10 @@ namespace Fsp
|
||||
if (0 <= Result)
|
||||
{
|
||||
Api.SetUserContext(_FileSystem, this);
|
||||
#if false
|
||||
FspFileSystemSetOperationGuardStrategy(_FileSystem, Synchronized ?
|
||||
FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY_COARSE :
|
||||
FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY_FINE);
|
||||
FspFileSystemSetDebugLog(_FileSystem, DebugLog);
|
||||
#endif
|
||||
Api.FspFileSystemSetOperationGuardStrategy(_FileSystem, Synchronized ?
|
||||
1/*FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY_COARSE*/ :
|
||||
0/*FSP_FILE_SYSTEM_OPERATION_GUARD_STRATEGY_FINE*/);
|
||||
Api.FspFileSystemSetDebugLog(_FileSystem, DebugLog);
|
||||
Result = Api.FspFileSystemSetMountPointEx(_FileSystem, MountPoint,
|
||||
SecurityDescriptor);
|
||||
if (0 <= Result)
|
||||
@ -187,10 +185,7 @@ namespace Fsp
|
||||
}
|
||||
public String MountPoint()
|
||||
{
|
||||
return "UNKNOWN";
|
||||
#if false
|
||||
return 0 != _FileSystem ? FspFileSystemMountPoint(_FileSystem) : 0;
|
||||
#endif
|
||||
return IntPtr.Zero != _FileSystem ? Api.FspFileSystemMountPoint(_FileSystem) : null;
|
||||
}
|
||||
public IntPtr FileSystemHandle()
|
||||
{
|
||||
|
@ -440,6 +440,18 @@ namespace Fsp.Interop
|
||||
internal delegate Int32 FspFileSystemStopDispatcher(
|
||||
IntPtr FileSystem);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
[return: MarshalAs(UnmanagedType.LPWStr)]
|
||||
internal delegate String FspFileSystemMountPointF(
|
||||
IntPtr FileSystem);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
internal delegate void FspFileSystemSetOperationGuardStrategyF(
|
||||
IntPtr FileSystem,
|
||||
Int32 GuardStrategy);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
internal delegate void FspFileSystemSetDebugLogF(
|
||||
IntPtr FileSystem,
|
||||
UInt32 DebugLog);
|
||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||
internal delegate Boolean FspFileSystemAddDirInfo(
|
||||
IntPtr DirInfo,
|
||||
IntPtr Buffer,
|
||||
@ -585,6 +597,9 @@ namespace Fsp.Interop
|
||||
internal static Proto.FspFileSystemRemoveMountPoint FspFileSystemRemoveMountPoint;
|
||||
internal static Proto.FspFileSystemStartDispatcher FspFileSystemStartDispatcher;
|
||||
internal static Proto.FspFileSystemStopDispatcher FspFileSystemStopDispatcher;
|
||||
internal static Proto.FspFileSystemMountPointF FspFileSystemMountPoint;
|
||||
internal static Proto.FspFileSystemSetOperationGuardStrategyF FspFileSystemSetOperationGuardStrategy;
|
||||
internal static Proto.FspFileSystemSetDebugLogF FspFileSystemSetDebugLog;
|
||||
internal static Proto.FspFileSystemAddDirInfo _FspFileSystemAddDirInfo;
|
||||
internal static Proto.FspFileSystemFindReparsePoint FspFileSystemFindReparsePoint;
|
||||
internal static Proto.FspFileSystemResolveReparsePoints FspFileSystemResolveReparsePoints;
|
||||
@ -803,6 +818,9 @@ namespace Fsp.Interop
|
||||
FspFileSystemRemoveMountPoint = GetEntryPoint<Proto.FspFileSystemRemoveMountPoint>(Module);
|
||||
FspFileSystemStartDispatcher = GetEntryPoint<Proto.FspFileSystemStartDispatcher>(Module);
|
||||
FspFileSystemStopDispatcher = GetEntryPoint<Proto.FspFileSystemStopDispatcher>(Module);
|
||||
FspFileSystemMountPoint = GetEntryPoint<Proto.FspFileSystemMountPointF>(Module);
|
||||
FspFileSystemSetOperationGuardStrategy = GetEntryPoint<Proto.FspFileSystemSetOperationGuardStrategyF>(Module);
|
||||
FspFileSystemSetDebugLog = GetEntryPoint<Proto.FspFileSystemSetDebugLogF>(Module);
|
||||
_FspFileSystemAddDirInfo = GetEntryPoint<Proto.FspFileSystemAddDirInfo>(Module);
|
||||
FspFileSystemFindReparsePoint = GetEntryPoint<Proto.FspFileSystemFindReparsePoint>(Module);
|
||||
FspFileSystemResolveReparsePoints = GetEntryPoint<Proto.FspFileSystemResolveReparsePoints>(Module);
|
||||
|
Reference in New Issue
Block a user