NdisMCreateLog allocates and opens a log file in which a miniport driver can write data to be displayed by a driver-dedicated Win32 application.
NDIS_STATUS NdisMCreateLog( NDIS_HANDLE MiniportAdapterHandle, UINT Size, PNDIS_HANDLE LogHandle );
Specifies the handle input to MiniportInitializeEx.
Specifies how many bytes to allocate for the log file. NDIS creates a temporary file that is not stored on disk.
Pointer to a caller-supplied variable in which this function returns a handle to the log file. This handle is a required parameter to the NdisXxxLog functions that the miniport driver calls subsequently.
NdisMCreateLog can return one of the following:
||The miniport driver can use the handle returned at LogHandle to write data to the NDIS-allocated log file.|
||A log file of the specified size could not be allocated.|
||The driver already called NdisMCreateLog successfully.|
A miniport driver can call the NdisM..Log functions to provide any information the driver writer chooses. Whatever the miniport driver logs can be displayed by a driver-dedicated Win32 application. Such an application calls the Win32 function DeviceIoControl with IOCTL_NDIS_GET_LOG_DATA periodically to retrieve whatever the miniport driver has written to the log file. For example, an under-development miniport driver might write test data to be displayed by its corresponding application.
If NdisMCreateLog returns NDIS_STATUS_RESOURCES, the driver can adjust the original Size down and try calling this function again. However, a miniport driver cannot call NdisMCreateLog to create more than one log file after a call succeeds.
Whatever size of log file is allocated, subsequent calls to NdisMWriteLogData store data in this file, which is treated as a circular buffer. That is, a sequence of calls to NdisMWriteLogData eventually overwrites the data originally written to the log file.
|Minimum supported client||Supported for NDIS 6.0 and NDIS 5.1 drivers (see NdisMCreateLog (NDIS 5.1)) in Windows Vista. Supported for NDIS 5.1 drivers (see NdisMCreateLog (NDIS 5.1)) in Windows XP.|
|Header||ndis.h (include Ndis.h)|
|DDI compliance rules||Irql_Miniport_Driver_Function|
Send feedback about: