RxpTrackReference tracks requests to reference SRV_CALL, NET_ROOT, V_NET_ROOT, FOBX, FCB, and SRV_OPEN structures in checked builds. A log of these reference requests can be accessed by the logging system and WMI.
VOID RxpTrackReference( _In_ ULONG TraceType, _In_ PCSTR FileName, _In_ ULONG Line, _In_ PVOID pInstance );
- TraceType [in]
The value that determines which reference request type is tracked. This value can be one of the following macros defined in fcb.h:
A reference request on a SRV_CALL structure.
A reference request on a NET_ROOT structure.
A reference request on a V_NET_ROOT structure.
A reference request on an FOBX structure.
A reference request on an FCB structure.
A reference 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 referenced.
RxpTrackReference always returns TRUE on checked builds.
In checked builds, RxpTrackReference is used to track requests to reference 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 these dereference operations 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 reference the structure passed (increment 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 RxpTrackReference routine to log diagnostic information about the request before calling the corresponding RxReference routine.
For retail builds, this function does nothing.