IAppxFile::GetContentType method (appxpackaging.h)

Retrieves the content type of the file.

Syntax

HRESULT GetContentType(
  [out, retval] LPWSTR *contentType
);

Parameters

[out, retval] contentType

Type: LPWSTR*

The content type of the file.

Return value

Type: HRESULT

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

Remarks

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

Examples

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

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header appxpackaging.h

See also

IAppxFile