Expand Minimize

QueryDepthSList function

Retrieves the number of entries in the specified singly linked list.

Syntax


USHORT WINAPI QueryDepthSList(
  _In_  PSLIST_HEADER ListHead
);

Parameters

ListHead [in]

A pointer to an SLIST_HEADER structure that represents the head of a singly linked list. This structure is for system use only.

The list must be previously initialized with the InitializeSListHead function.

Return value

The function returns the number of entries in the list, up to a maximum value of 65535.

Remarks

The system does not limit the number of entries in a singly linked list. However, the return value of QueryDepthSList is truncated to 16 bits, so the maximum value it can return is 65535. If the specified singly linked list contains more than 65535 entries, QueryDepthSList returns the number of entries in the list modulo 65535. For example, if the specified list contains 65536 entries, QueryDepthSList returns zero.

The return value of QueryDepthSList should not be relied upon in multithreaded applications because the item count can be changed at any time by another thread.

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows XP [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2003 [desktop apps | Windows Store apps]

Header

WinBase.h on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2 (include Windows.h);
Interlockedapi.h on Windows 8 and Windows Server 2012

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Interlocked Singly Linked Lists
InitializeSListHead

 

 

Community Additions

ADD
Show:
© 2014 Microsoft