EnumerateSecurityPackagesA function

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

Syntax

SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(
  unsigned long *pcPackages,
  PSecPkgInfoA  *ppPackageInfo
);

Parameters

pcPackages

A pointer to a ULONG variable that receives the number of packages available on the system. This includes packages that are already loaded and packages available on demand.

ppPackageInfo

A pointer to a variable that receives a pointer to an array of SecPkgInfo structures. Each structure contains information from the security support provider (SSP) that describes the capabilities of the security package available within that SSP.

When you have finished using the array, free the memory by calling the FreeContextBuffer function.

Return Value

If the function succeeds, the function returns SEC_E_OK.

If the function fails, it returns a nonzero error code. Possible values include, but are not limited to, those in the following table.

Return code/value Description
SEC_E_INSUFFICIENT_MEMORY
0x80090300L
There was not sufficient memory to allocate one or more of the buffers.
SEC_E_INVALID_HANDLE
0x80090301L
An invalid handle was specified.
SEC_E_SECPKG_NOT_FOUND
0x80090305L
The specified package was not found.

Remarks

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

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header sspi.h (include Security.h)
Library Secur32.lib
DLL SspiCli.dll

See Also

AcquireCredentialsHandle (General)

FreeContextBuffer

SSPI Functions

SecPkgInfo