From 07b6c4c77c2f225ad2a96a91d6fb0dcf81fc3bf0 Mon Sep 17 00:00:00 2001 From: antiduh Date: Thu, 19 Jun 2014 21:52:53 +0000 Subject: [PATCH] Add the DllImport attrib for InitializeSecurityContext_Client; still only a rough idea of how it will be used. --- NativeMethods.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/NativeMethods.cs b/NativeMethods.cs index 2c36f98..85b8772 100644 --- a/NativeMethods.cs +++ b/NativeMethods.cs @@ -9,7 +9,6 @@ namespace NSspi { public class NativeMethods { - // http://msdn.microsoft.com/en-us/library/windows/desktop/aa374713(v=vs.85).aspx /* @@ -160,6 +159,13 @@ namespace NSspi ); */ + [DllImport( + "Secur32.dll", + EntryPoint = "InitializeSecurityContext", + CallingConvention = CallingConvention.Winapi, + CharSet = CharSet.Unicode, + SetLastError = true + )] public static extern SecurityStatus InitializeSecurityContext_Client( ref long credentialHandle, ref long prevContextHandle, @@ -167,7 +173,7 @@ namespace NSspi int requiredAttribs, int reserved1, int dataRep, - IntPtr dataBuffers, + IntPtr inputBuffer, int reserved2, ref long newContextHandle, IntPtr outputBuffer,