GetAdaptersStartupMode

static DWORD CNdisApi::GetAdaptersStartupMode();

Return Value:
The configured default adapter filter mode stored in the registry, or 0 if the value cannot be read.

Parameters:
None

Remarks:
This function reads the registry configuration; it does not query the active mode of a loaded adapter. The 3.6.2 SDK comment advises a reboot for changes made by SetAdaptersStartupMode to take effect. Use GetAdapterMode for the current mode of an adapter.

Stored configuration: These APIs write or read the StartupMode REG_DWORD in the standard driver’s HKLM\SYSTEM\CurrentControlSet\Services\ndisrd\Parameters key; they do not issue an IOCTL. The getter reports stored startup configuration, not the active mode of an adapter. A stored zero, a missing value and a failed registry operation all return 0. The setter requires registry write permission, and the getter also opens/creates the key through RegCreateKey.

The reboot guidance is stated in the SDK comment; the public user-mode implementation does not show the driver’s adoption timing. For immediate per-adapter mode changes, use SetAdapterMode. See the pinned startup-mode implementation and guidance.