Platform SDK: Logon Authentication

EnumerateSecurityPackages

The EnumerateSecurityPackages function returns an array of SecPkgInfo structures that describe the security packages available to the client.

SECURITY_STATUS EnumerateSecurityPackages(
  PULONG pcPackages,          // receives the number of packages
  PSecPkgInfo *ppPackageInfo  // receives array of information
);

Parameters

pcPackages
[in] Pointer to a ULONG variable that receives the number of packages returned.
ppPackageInfo
[in] Pointer to a variable that receives a pointer to an array of SecPkgInfo structures. Each structure contains information from the SSP describing a security package available within that SSP.

Return Values

If the function succeeds, the return value is SEC_E_OK.

If the function fails, the return value is a nonzero error code.

Remarks

The SecPkgInfo structures provide information that the caller can use to determine which security package best satisfies the requirements of the caller.

The caller can use the Name member of a SecPkgInfo structure to specify a security package in a call to the AcquireCredentialsHandle function.

The caller must assume that the SSP includes all available security packages in the single call to EnumerateSecurityPackages.

The caller must call the FreeContextBuffer function to free the buffer returned in ppPackageInfo.

The prototype for this function can be found in Sspi.h.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Sspi.h; include Security.h.
  Library: Use Secur32.lib.
  Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.

See Also

AcquireCredentialsHandle, EnumerateSecurityPackages, FreeContextBuffer, SecPkgInfo