Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InstantiateComponentFromPackage

InstantiateComponentFromPackage function

[Some information relates to pre-released 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.]

Creates an instance of a class in an application package.

Syntax


HRESULT InstantiateComponentFromPackage(
  _In_  HSTRING      classId,
  _In_  HSTRING      packageFullName,
  _Out_ IInspectable **instance
);

Parameters

classId [in]

The class to activate in the named package.

packageFullName [in]

The full name of the package.

instance [out]

Receives an instance of the class.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The function succeeded.

REGDB_E_CLASSNOTREG

The class is not registered or the class is not listed under the registry key "HKEY_LOCAL_MACHINE\Software\Microsoft\MediaEngine\MediaExtensions\EME\CDMS". See remarks for more info.

 

Remarks

This function can only be used with packages whose "PackageFamilyName" is defined as a subkey key that is registered under the "HKEY_LOCAL_MACHINE\Software\Microsoft\MediaEngine\MediaExtensions\EME\CDMS" key.

This API should only be called in very exceptional circumstances because code installed from the application store should not be invoked from desktop applications as it is has a lower level of trust associated with it.

Requirements

Minimum supported client

Windows 8.1 [desktop apps only]

Minimum supported server

Windows Server 2012 R2 [desktop apps only]

Header

Comppkgsup.h

Library

Comppkgsup.lib

DLL

CompPkgSup.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft