Retrieves information about a specified security package. This information includes the bounds on sizes of authentication information, credentials, and contexts.
[DllImport("secur32.dll", SetLastError=true)]
static extern long QuerySecurityPackageInfo(string pszPackageName, out IntPtr ppPackageInfo);
[StructLayout(LayoutKind.Sequential)]
public struct SecPkgInfo
{
public UInt32 fCapabilities;
public UInt16 wVersion;
public UInt16 wRPCID;
public UInt32 cbMaxToken;
public string Name;
public string Comment;
}
Declare Function QuerySecurityPackageInfo Lib "secur32.dll" (TODO) As TODO
None.
Do you know one? Please contribute it!
None.
Please add some!
IntPtr packagePtr;
QuerySecurityPackageInfo("Kerberos", out packagePtr);
int error = Marshal.GetLastWin32Error();
if (error == 0 && packagePtr != IntPtr.Zero)
{
SecPkgInfo secPkgInfo = (SecPkgInfo)Marshal.PtrToStructure(packagePtr, typeof(SecPkgInfo));
}