IAppxFactory::CreateValidatedBlockMapReader method

Creates a read-only block map object model from contents provided by an IStream and a digital signature.

Syntax


HRESULT CreateValidatedBlockMapReader(
  [in]           IStream *blockMapStream,
  [in]           LPCWSTR fileName,
  [out, retval]  IAppxBlockMapReader **blockMapReader
);

Parameters

blockMapStream [in]

Type: IStream*

The stream that delivers block map XML for reading. The stream must support Read, Seek, and Stat.

fileName [in]

Type: LPCWSTR

The file that contains a digital signature used to validate the contents of the input stream.

blockMapReader [out, retval]

Type: IAppxBlockMapReader**

The block map reader.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. Otherwise, it returns an error code that includes, but is not limited to, those below. This method might return errors that are passed from the underlying validation APIs that are used. For example, this method might return "Crypto and WinTrust error codes (0x8009xxxx, 0x800bxxxx) if the signature can't be read, is invalid, or doesn't match the content of blockMapStream.

Return codeDescription
APPX_E_INVALID_BLOCKMAP

The blockMapStream does not contain syntactically valid XML for the block map.

 

Remarks

This method is used when the block map exists alone, outside of an app package. The block map object provides access to all data elements and attributes in the block map XML.

The fileName parameter should include the path of a package digital signature (.p7x) file on disk. If this parameter is not NULL, this method will validate the format of the signature file and validate the contents of blockMapStream against the signature.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

AppxPackaging.h

IDL

AppxPackaging.idl

IID

IID_IAppxFactory is defined as beb94909-e451-438b-b5a7-d79e767b75d8

See also

IAppxFactory
IAppxFactory::CreateBlockMapReader

 

 

Show:
© 2014 Microsoft