RoRegisterActivationFactories function (roapi.h)

Registers an array out-of-process activation factories for a Windows Runtime exe server.

Syntax

HRESULT RoRegisterActivationFactories(
  [in]  HSTRING                 *activatableClassIds,
  [in]  PFNGETACTIVATIONFACTORY *activationFactoryCallbacks,
  [in]  UINT32                  count,
  [out] RO_REGISTRATION_COOKIE  *cookie
);

Parameters

[in] activatableClassIds

Type: HSTRING*

An array of class identifiers that are associated with activatable runtime classes.

[in] activationFactoryCallbacks

Type: PFNGETACTIVATIONFACTORY*

An array of callback functions that you can use to retrieve the activation factories that correspond with activatableClassIds.

[in] count

Type: UINT32

The number of items in the activatableClassIds and activationFactoryCallbacks arrays.

[out] cookie

Type: RO_REGISTRATION_COOKIE*

A cookie that identifies the registered factories.

Return value

Type: HRESULT

This function can return one of these values.

Return code Description
S_OK
The activation factory was registered successfully.
E_POINTER
cookie is NULL.
CO_E_NOT_SUPPORTED
The thread is in a neutral apartment.
CO_E_NOTINITIALIZED
The thread has not been initialized in the Windows Runtime by calling the RoInitialize function.
CO_E_ALREADYINITIALIZED
The factory has been initialized already.
REGDB_E_CLASSNOTREG
The class is not registered as OutOfProc.

Remarks

The RoRegisterActivationFactories function enables an exe server to register multiple activation factories without experiencing a race condition.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header roapi.h
Library RuntimeObject.lib
DLL ComBase.dll

See also

RO_REGISTRATION_COOKIE

RoInitialize