Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
[Applies to KMDF and UMDF]
The WdfObjectReference macro increments the reference count for a specified framework object.
Syntax
VOID WdfObjectReference(
[in] WDFOBJECT Handle
);
Parameters
Handle [in]
A handle to a framework object.
Return value
None.
A bug check occurs if the driver supplies an invalid object handle.
Remarks
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.
Examples
The following code example increments an object's reference count.
WdfObjectReference(Object);
Requirements
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 |