{
internal static partial class NetSecurityNative
{
- [DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseGssBuffer")]
- internal static extern void ReleaseGssBuffer(
+ [GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseGssBuffer")]
+ internal static partial void ReleaseGssBuffer(
IntPtr bufferPtr,
ulong length);
int inputNameByteCount,
out SafeGssNameHandle outputName);
- [DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseName")]
- internal static unsafe extern Status ReleaseName(
- Status* minorStatus,
- IntPtr* inputName);
+ [GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseName")]
+ internal static partial Status ReleaseName(
+ out Status minorStatus,
+ ref IntPtr inputName);
[GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_AcquireAcceptorCred")]
internal static partial Status AcquireAcceptorCred(
int passwordLen,
out SafeGssCredHandle outputCredHandle);
- [DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseCred")]
- internal static unsafe extern Status ReleaseCred(
- Status* minorStatus,
- IntPtr* credHandle);
+ [GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_ReleaseCred")]
+ internal static partial Status ReleaseCred(
+ out Status minorStatus,
+ ref IntPtr credHandle);
[GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_InitSecContext")]
internal static partial Status InitSecContext(
out uint retFlags,
out bool isNtlmUsed);
- [DllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_DeleteSecContext")]
- internal static unsafe extern Status DeleteSecContext(
- Status* minorStatus,
- IntPtr* contextHandle);
+ [GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_DeleteSecContext")]
+ internal static partial Status DeleteSecContext(
+ out Status minorStatus,
+ ref IntPtr contextHandle);
[GeneratedDllImport(Interop.Libraries.NetSecurityNative, EntryPoint="NetSecurityNative_GetUser")]
internal static partial Status GetUser(
get { return handle == IntPtr.Zero; }
}
- protected override unsafe bool ReleaseHandle()
+ protected override bool ReleaseHandle()
{
Interop.NetSecurityNative.Status minorStatus;
- fixed (IntPtr* handleRef = &handle)
- {
- Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.ReleaseName(&minorStatus, handleRef);
- SetHandle(IntPtr.Zero);
- return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
- }
+ Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.ReleaseName(out minorStatus, ref handle);
+ SetHandle(IntPtr.Zero);
+ return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
}
public SafeGssNameHandle()
get { return handle == IntPtr.Zero; }
}
- protected override unsafe bool ReleaseHandle()
+ protected override bool ReleaseHandle()
{
Interop.NetSecurityNative.Status minorStatus;
- fixed (IntPtr* handlePtr = &handle)
- {
- Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.ReleaseCred(&minorStatus, handlePtr);
- SetHandle(IntPtr.Zero);
- return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
- }
+ Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.ReleaseCred(out minorStatus, ref handle);
+ SetHandle(IntPtr.Zero);
+ return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
}
private static bool InitIsNtlmInstalled()
protected override unsafe bool ReleaseHandle()
{
Interop.NetSecurityNative.Status minorStatus;
- fixed (IntPtr* handlePtr = &handle)
- {
- Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.DeleteSecContext(&minorStatus, handlePtr);
- SetHandle(IntPtr.Zero);
- return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
- }
+ Interop.NetSecurityNative.Status status = Interop.NetSecurityNative.DeleteSecContext(out minorStatus, ref handle);
+ SetHandle(IntPtr.Zero);
+ return status == Interop.NetSecurityNative.Status.GSS_S_COMPLETE;
}
}
}