src: dll,dotnet: add out-of-line API's

This commit is contained in:
Bill Zissimopoulos
2017-04-08 21:13:21 -07:00
parent f938bf5e3f
commit f9b8bfc020
4 changed files with 107 additions and 10 deletions

View File

@@ -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()
{

View File

@@ -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);