Skip to main content
IAppxFile::GetName method

Retrieves the name of the file, including its path relative to the package root directory.

Syntax


HRESULT GetName(
  [out, retval]  LPWSTR *fileName
);

Parameters

fileName [out, retval]

Type: LPWSTR*

A string that contains the name and relative path of the file.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The string returned in fileName is identical to the file name listed in the block map.

The caller is responsible for deallocating the memory used by fileName. Use the CoTaskMemFree function to deallocate the string's memory.

Examples

For an example, see Quickstart: Extract app package contents.

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_IAppxFile is defined as 91df827b-94fd-468f-827b-57f41b2f6f2e

See also

IAppxFile