dotnet: GetOperationProcessId

This commit is contained in:
Bill Zissimopoulos 2017-10-11 17:07:38 -07:00
parent 92e7dbad21
commit 436e31da34
2 changed files with 14 additions and 0 deletions

View File

@ -983,6 +983,16 @@ namespace Fsp
return Api.FspWin32FromNtStatus(Status);
}
/// <summary>
/// Gets the originating process ID.
/// </summary>
/// <remarks>
/// Valid only during Create, Open and Rename requests when the target exists.
/// </remarks>
public static int GetOperationProcessId()
{
return (int)Api.FspFileSystemOperationProcessId();
}
/// <summary>
/// Modifies a security descriptor.
/// </summary>
/// <remarks>

View File

@ -539,6 +539,8 @@ namespace Fsp.Interop
IntPtr FileSystem,
UInt32 DebugLog);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
internal delegate UInt32 FspFileSystemOperationProcessIdF();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
[return: MarshalAs(UnmanagedType.U1)]
internal delegate Boolean FspFileSystemAddDirInfo(
IntPtr DirInfo,
@ -706,6 +708,7 @@ namespace Fsp.Interop
internal static Proto.FspFileSystemMountPointF FspFileSystemMountPoint;
internal static Proto.FspFileSystemSetOperationGuardStrategyF FspFileSystemSetOperationGuardStrategy;
internal static Proto.FspFileSystemSetDebugLogF FspFileSystemSetDebugLog;
internal static Proto.FspFileSystemOperationProcessIdF FspFileSystemOperationProcessId;
internal static Proto.FspFileSystemAddDirInfo _FspFileSystemAddDirInfo;
internal static Proto.FspFileSystemFindReparsePoint FspFileSystemFindReparsePoint;
internal static Proto.FspFileSystemResolveReparsePoints FspFileSystemResolveReparsePoints;
@ -1015,6 +1018,7 @@ namespace Fsp.Interop
FspFileSystemMountPoint = GetEntryPoint<Proto.FspFileSystemMountPointF>(Module);
FspFileSystemSetOperationGuardStrategy = GetEntryPoint<Proto.FspFileSystemSetOperationGuardStrategyF>(Module);
FspFileSystemSetDebugLog = GetEntryPoint<Proto.FspFileSystemSetDebugLogF>(Module);
FspFileSystemOperationProcessId = GetEntryPoint<Proto.FspFileSystemOperationProcessIdF>(Module);
_FspFileSystemAddDirInfo = GetEntryPoint<Proto.FspFileSystemAddDirInfo>(Module);
FspFileSystemFindReparsePoint = GetEntryPoint<Proto.FspFileSystemFindReparsePoint>(Module);
FspFileSystemResolveReparsePoints = GetEntryPoint<Proto.FspFileSystemResolveReparsePoints>(Module);