mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 17:03:12 -05:00
dotnet: log exceptions
This commit is contained in:
parent
ff725f931d
commit
f1ac28b0aa
@ -50,6 +50,7 @@ namespace Fsp
|
|||||||
/* operations */
|
/* operations */
|
||||||
public virtual Int32 ExceptionHandler(Exception ex)
|
public virtual Int32 ExceptionHandler(Exception ex)
|
||||||
{
|
{
|
||||||
|
Api.FspDebugLog("%s\n", ex.ToString());
|
||||||
return STATUS_UNEXPECTED_IO_ERROR;
|
return STATUS_UNEXPECTED_IO_ERROR;
|
||||||
}
|
}
|
||||||
public virtual Int32 Init(Object Host)
|
public virtual Int32 Init(Object Host)
|
||||||
|
@ -595,6 +595,10 @@ namespace Fsp.Interop
|
|||||||
internal delegate UInt32 FspWin32FromNtStatus(
|
internal delegate UInt32 FspWin32FromNtStatus(
|
||||||
Int32 Status);
|
Int32 Status);
|
||||||
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
|
internal delegate void FspDebugLog(
|
||||||
|
[MarshalAs(UnmanagedType.LPStr)] String Format,
|
||||||
|
[MarshalAs(UnmanagedType.LPStr)] String Message);
|
||||||
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
|
||||||
internal delegate void FspDebugLogSetHandle(
|
internal delegate void FspDebugLogSetHandle(
|
||||||
IntPtr Handle);
|
IntPtr Handle);
|
||||||
|
|
||||||
@ -658,6 +662,7 @@ namespace Fsp.Interop
|
|||||||
internal static Proto.FspVersion FspVersion;
|
internal static Proto.FspVersion FspVersion;
|
||||||
internal static Proto.FspNtStatusFromWin32 FspNtStatusFromWin32;
|
internal static Proto.FspNtStatusFromWin32 FspNtStatusFromWin32;
|
||||||
internal static Proto.FspWin32FromNtStatus FspWin32FromNtStatus;
|
internal static Proto.FspWin32FromNtStatus FspWin32FromNtStatus;
|
||||||
|
internal static Proto.FspDebugLog FspDebugLog;
|
||||||
internal static Proto.FspDebugLogSetHandle FspDebugLogSetHandle;
|
internal static Proto.FspDebugLogSetHandle FspDebugLogSetHandle;
|
||||||
|
|
||||||
internal static unsafe Int32 FspFileSystemSetMountPointEx(
|
internal static unsafe Int32 FspFileSystemSetMountPointEx(
|
||||||
@ -950,6 +955,7 @@ namespace Fsp.Interop
|
|||||||
FspVersion = GetEntryPoint<Proto.FspVersion>(Module);
|
FspVersion = GetEntryPoint<Proto.FspVersion>(Module);
|
||||||
FspNtStatusFromWin32 = GetEntryPoint<Proto.FspNtStatusFromWin32>(Module);
|
FspNtStatusFromWin32 = GetEntryPoint<Proto.FspNtStatusFromWin32>(Module);
|
||||||
FspWin32FromNtStatus = GetEntryPoint<Proto.FspWin32FromNtStatus>(Module);
|
FspWin32FromNtStatus = GetEntryPoint<Proto.FspWin32FromNtStatus>(Module);
|
||||||
|
FspDebugLog = GetEntryPoint<Proto.FspDebugLog>(Module);
|
||||||
FspDebugLogSetHandle = GetEntryPoint<Proto.FspDebugLogSetHandle>(Module);
|
FspDebugLogSetHandle = GetEntryPoint<Proto.FspDebugLogSetHandle>(Module);
|
||||||
}
|
}
|
||||||
private static void CheckVersion()
|
private static void CheckVersion()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user