// wdfobject.h
VOID WdfObjectReference(
[in] WDFOBJECT Handle
);
View the official Windows hardware development documentationNo description available.
[Applies to KMDF and UMDF]
The WdfObjectReference macro increments the reference count for a specified framework object.
Handle [in] A handle to a framework object.
None.
A bug check occurs if the driver supplies an invalid object handle.
If your driver calls WdfObjectReference to increment a reference count, the driver must call WdfObjectDereference to decrement the count.
Instead of calling WdfObjectReference, a driver can call WdfObjectReferenceWithTag or WdfObjectReferenceActual.
For more information about object reference counts, see Framework Object Life Cycle.
The following code example increments an object's reference count.
WdfObjectReference(Object);
| Target platform | Universal |
| Minimum KMDF version | 1.0 |
| Minimum UMDF version | 2.0 |
| Header | Wdfobject.h (include Wdf.h) |
| Library | Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF) |
| IRQL | <= DISPATCH_LEVEL |
| DDI compliance rules | DriverCreate, MemAfterReqCompletedIntIoctlA, MemAfterReqCompletedIoctlA, MemAfterReqCompletedReadA, MemAfterReqCompletedWriteA |