I have somehow come out with a signature for this api call, but the call does not work in the expected fashion. Some vital data structures are not get populated properly hence I am not getting intended output. The signature I've used is:
[DllImport("secur32.dll", SetLastError = true)]
static extern ulong AcquireCredentialsHandle(
string pszPrincipal,
string pszPackage,
ulong fCredentialsUse,
IntPtr pvLogonID,
ref SEC_WINNT_AUTH_IDENTITY pAuthData,
//IntPtr pAuthData,
IntPtr pGetKeyFn,
IntPtr pGetArgumentKey,
//ref SecHandle phCredential,
IntPtr phCredential,
ref TimeStamp ptsExpiry);
Please ignore the comments.
The c-based function call I used for reference can be found here. I want to know what did I do wrong...