CComPolyObject::CreateInstance
Allows you to create a new **CComPolyObject<**contained > object without the overhead of CoCreateInstance.
static HRESULT WINAPI CreateInstance(
LPUNKNOWN pUnkOuter,
CComPolyObject< contained >** pp
);
Параметры
- pp
[out] A pointer to a CComPolyObject< contained**>** pointer. If CreateInstance is unsuccessful, pp is set to NULL.
Возвращаемое значение
A standard HRESULT value.
Заметки
The object returned has a reference count of zero, so call AddRef immediately, then use Release to free the reference on the object pointer when you're done.
If you don't need direct access to the object, but still want to create a new object without the overhead of CoCreateInstance, use CComCoClass::CreateInstance instead.
Требования
Header: atlcom.h