Freigeben über


3.1.4.12.2 QueryFile (Opnum 4)

This method is called by a client to retrieve information about an installer package file.

 HRESULT QueryFile(
   [in, string] WCHAR* pwszInstallerPackage,
   [out] DWORD* pdwConglomerations,
   [out, string, size_is(, *pdwConglomerations)] 
     LPWSTR** ppNames,
   [out, string, size_is(, *pdwConglomerations)] 
     LPWSTR** ppDescriptions,
   [out] DWORD* pdwUsers,
   [out] DWORD* pdwIsProxy,
   [out] DWORD* pcModules,
   [out, string, size_is(, *pcModules)] 
     LPWSTR** ppModules
 );

pwszInstallerPackage:  A path in UNC to a file that the server will recognize as an installer package file.

pdwConglomerations:  A pointer to a variable that, upon successful completion, MUST be set to the number of conglomerations represented in the installer package file.

ppNames:  A pointer to a variable that, upon successful completion, MUST be set to an array of string values, each of which is the value of the Name property (see section 3.1.1.3.3) of a conglomeration represented in the installer package file.

ppDescriptions:  A pointer to a variable that, upon successful completion, MUST be set to an array of string values, each of which is the value of the Description property (see section 3.1.1.3.1 ) of a conglomeration represented in the installer package file.

pdwUsers:  A pointer to a variable that, upon successful completion, MUST be set to the value TRUE (0x00000001) if the installer package file contains configuration for user accounts, and FALSE (0x00000000) otherwise.

pdwIsProxy:  A pointer to a variable that, upon successful completion, MUST be set to the value TRUE (0x00000001) if the installer package file contains a proxy conglomeration, and FALSE (0x00000000) otherwise.

pcModules:  A pointer to a variable that, upon successful completion, MUST be set to the number of module contained in the installer package file.

ppModules:  A pointer to a variable that, upon successful completion, MUST be set to an array of strings, one for each module contained in the installer package file, each representing a file name for the module.

Return Values:  This method MUST return S_OK (0x00000000) on success, and a failure result, as specified in [MS-ERREF] section 2.1, on failure. All failure results MUST be treated identically.

Return value/code

Description

0x00000000

S_OK

The call was successful.

Upon receiving a call to this method, the server MUST verify that catalog version negotiation has been performed by checking the negotiated catalog version (see section 3.1.1.5), and fail the call if not.

The server MUST then perform parameter validation as follows:

  • The server SHOULD<338> verify that pwszInstallerPackage is a path in UNC and fail the call if not.

The server MUST then verify that the file located by the path exists and is accessible, and that the server recognizes the file as an installer package file, and fail the call if not.

The server MUST then attempt to determine the following information about the installer package file and set the values referenced by the out parameters, failing the call if it cannot:

  • The server MUST set the value referenced by pdwConglomerations to the number of conglomerations in the installer package file, and the values referenced by ppNames and ppDescriptions to arrays of Name and Description properties of these conglomerations.

  • The server MUST set the values referenced by pdwUsers to indicate whether or not the installer package file contains configuration for user accounts, and pdwIsProxy to indicate whether any of the conglomerations are proxy conglomerations; in other words, the IsProxyApp property is set to TRUE (0x00000001).

  • The server MUST set the value referenced by pcModules to the number of modules contained in the installer package file, and ppModules to strings representing file names for these modules.