Skip to content

Latest commit

 

History

History
61 lines (44 loc) · 1.52 KB

File metadata and controls

61 lines (44 loc) · 1.52 KB
title CreateClassFactory Function | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.technology
cpp-windows
ms.topic reference
f1_keywords
module/Microsoft::WRL::Details::CreateClassFactory
dev_langs
C++
helpviewer_keywords
CreateClassFactory function
ms.assetid 772d5d1b-8872-4745-81ca-521a39564713
author mikeblome
ms.author mblome
ms.workload
cplusplus
uwp

CreateClassFactory Function

Creates a factory that produces instances of the specified class.

Syntax

template<typename Factory>
inline HRESULT STDMETHODCALLTYPE CreateClassFactory(
   _In_ unsigned int *flags,
   _In_ const CreatorMap* entry,
   REFIID riid,
   _Outptr_ IUnknown **ppFactory
) throw();

Parameters

flags
A combination of one or more RuntimeClassType enumeration values.

entry
Pointer to a CreatorMap that contains initialization and registration information about parameter riid.

riid
Reference to an interface ID.

ppFactory
If this operation completes successfully, a pointer to a class factory.

Return Value

S_OK if successful; otherwise, an HRESULT that indicates the error.

Remarks

An assert error is emitted if template parameter Factory doesn't derive from interface IClassFactory.

Requirements

Header: module.h

Namespace: Microsoft::WRL

See Also

Microsoft::WRL::Wrappers::Details Namespace