RxpTrackDereference is used in checked builds to track requests to dereference SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures in checked builds. A log of these dereference requests can be accessed by the logging system and WMI.
BOOLEAN RxpTrackDereference( _In_ ULONG TraceType, _In_ PCSTR FileName, _In_ ULONG Line, _In_ PVOID pInstance );
- TraceType [in]
The value that determines which dereference request type is tracked. This value can be one of the following macros defined in fcb.h:
A dereference request on a SRV_CALL structure.
A dereference request on a NET_ROOT structure.
A dereference request on a V_NET_ROOT structure.
A dereference request on an FOBX structure.
A dereference request on an FCB structure.
A dereference request on a SRV_OPEN structure.
- FileName [in]
The name of the source file where this routine was called.
- Line [in]
The line number in the source file where this routine was called.
- pInstance [in]
A pointer to the structure to be dereferenced.
RxpTrackDereference always returns TRUE on checked builds.
In checked builds, RxpTrackDereference is used to track requests to dereference SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures. For retail builds, this function does nothing.
If WMI is enabled, a log of the dereference requests is sent as a WMI event to user-mode WMI components that have requested notification. The deference request is also logged to the RDBSS logging system by calling the _RxLog routine to record an I/O error log entry if logging is enabled.
Note that this routine does not actually dereference the structure passed (decrement the reference count on the structure).
A number of macros are defined in fcb.h for debugging that are the preferred way to call this routine. These macros provide a wrapper around the RxReference or RxDereference routines used for file structure management operations on SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures. These macros first call the corresponding RxpTrackDereference routine to log diagnostic information about the request before calling the corresponding RxDereference routine.