RegisterMediaExtensionPackage function (comppkgsup.h)
Important
Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Registers the media extension with the given Package Family Name (PFN) for the current user.
Syntax
HRESULT RegisterMediaExtensionPackage(
[in] PCWSTR packageFamilyName
);
Parameters
[in] packageFamilyName
The Package Family Name of the media extension to be registered. For more information, see An overview of Package Identity in Windows apps.
Return value
An HRESULT including the following values:
Value | Description |
---|---|
S_OK | Success |
E_ACCESSDENIED | The API was called from a process that is not full-trust. |
ERROR_INSTALL_FAILED | The specified Package Family Name was not found on the system. |
Remarks
This API can be used to register media extensions that are already present in Windows but which have not yet been registered for the current user. Packages will not be automatically downloaded from the Microsoft Store. The API must be called from a full-trust process. For more information on the Full Trust Permission Level restricted capability. See Restricted capability list.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 11, version 24H2 |
Header | comppkgsup.h |
Library | Comppkgsup.lib |
DLL | Comppkgsup.dll |