GetPackageInfo function

Gets the package information for the specified package.

Syntax

LONG GetPackageInfo(
  PACKAGE_INFO_REFERENCE packageInfoReference,
  const UINT32           flags,
  UINT32                 *bufferLength,
  BYTE                   *buffer,
  UINT32                 *count
);

Parameters

packageInfoReference

Type: PACKAGE_INFO_REFERENCE

A reference to package information.

flags

Type: const UINT32

The package constants that specify how package information is retrieved.

bufferLength

Type: UINT32*

On input, the size of buffer, in bytes. On output, the size of the package information returned, in bytes.

buffer

Type: BYTE*

The package information, represented as an array of PACKAGE_INFO structures.

count

Type: UINT32*

The number of packages in the buffer.

Return Value

Type: LONG

If the function succeeds it returns ERROR_SUCCESS. Otherwise, the function returns an error code. The possible error codes include the following.

Return code Description
ERROR_INSUFFICIENT_BUFFER
The buffer is not large enough to hold the data. The required size is specified by bufferLength.

Requirements

   
Windows version Windows 8 [desktop apps only] Windows Server 2012 [desktop apps only]
Target Platform Windows
Header appmodel.h
Library Kernel32.lib
DLL Kernel32.dll

See Also

ClosePackageInfo

GetCurrentPackageInfo

GetPackagePath

OpenPackageInfoByFullName