TWUGetPIF

The TWUGetPIF function retrieves and parses a package information file from the remote or local server. If successful, the resulting packages can be enumerated or accessed with TWUEnumPackages, TWUEnumPackageDependencies, TWUFindPackage, and TWUGetPackage. The total number of packages is available through TWUGetPackageCount.

Tip: TWUOpenUpdateURL combines the functionality of TWUOpenSession and TWUGetPIF. You might find it more convenient to use that function.

URESULT TWUGetPIF(
    TWUHANDLE hSession,
    const TCHAR *pszPIFPath
);

Delphi version:

function TWUGetPIF(
    hSession: TWUHANDLE;
    pszPIFPath: PTCHAR
): URESULT;

Parameters

hSession
[Input] Handle to an open TWU session.
pszPIFPath
[Input] Path to the package information file on the server. This path must be fully qualified and must use the format required by the server on which it resides. (For example, on Unix or Linux based servers, you must use forward slashes '/' as path separators.)

Return value

If the function succeeds, it returns ERROR_SUCCESS (0). If it fails, it returns a nonzero Win32 API error code. You can use TWUGetErrorMessage to retrieve the error message that corresponds to the error code.