| description | Learn more about: CComObjectNoLock Class | ||||||
|---|---|---|---|---|---|---|---|
| title | CComObjectNoLock Class | ||||||
| ms.date | 11/04/2016 | ||||||
| f1_keywords |
|
||||||
| helpviewer_keywords |
|
||||||
| ms.assetid | 288c6506-7da8-4127-8d58-7f4bd779539a |
This class implements IUnknown for a nonaggregated object, but does not increment the module lock count in the constructor.
template<class Base>
class CComObjectNoLock : public Base
Base
Your class, derived from CComObjectRoot or CComObjectRootEx, as well as from any other interface you want to support on the object.
| Name | Description |
|---|---|
| CComObjectNoLock::CComObjectNoLock | Constructor. |
| CComObjectNoLock::~CComObjectNoLock | The destructor. |
| Name | Description |
|---|---|
| CComObjectNoLock::AddRef | Increments the reference count on the object. |
| CComObjectNoLock::QueryInterface | Returns a pointer to the requested interface. |
| CComObjectNoLock::Release | Decrements the reference count on the object. |
CComObjectNoLock is similar to CComObject in that it implements IUnknown for a nonaggregated object; however, CComObjectNoLock does not increment the module lock count in the constructor.
ATL uses CComObjectNoLock internally for class factories. In general, you will not use this class directly.
Base
CComObjectNoLock
Header: atlcom.h
Increments the reference count on the object.
STDMETHOD_(ULONG, AddRef)();
A value that may be useful for diagnostics or testing.
The constructor. Unlike CComObject, does not increment the module lock count.
CComObjectNoLock(void* = NULL);
void*
[in] This unnamed parameter is not used. It exists for symmetry with other CComXXXObjectXXX constructors.
The destructor.
~CComObjectNoLock();
Frees all allocated resources and calls FinalRelease.
Retrieves a pointer to the requested interface.
STDMETHOD(QueryInterface)(REFIID iid, void** ppvObject);
iid
[in] The identifier of the interface being requested.
ppvObject
[out] A pointer to the interface pointer identified by iid. If the object does not support this interface, ppvObject is set to NULL.
A standard HRESULT value.
Decrements the reference count on the object.
STDMETHOD_(ULONG, Release)();
In debug builds, Release returns a value that may be useful for diagnostics or testing. In non-debug builds, Release always returns 0.