Win32Api Network Adapter set Power Managament

Emre Demircan 21 Reputation points
2020-10-31T13:30:49.527+00:00

Hello!
I want to change Network adapter's power managament settings. I want to check 3 checkboxes.

I searched this on google but i couldn't successfull.
I changed HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002bE10318}\DeviceNumber on regedit but it's not applying.

This regedit value is true but i think it's readonly.

How can i set 3 checkboxes checked and save?

36601-powermanagement.png

Thanks a lot!

36582-regedit.png

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,592 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,693 questions
0 comments No comments
{count} votes

Accepted answer
  1. Castorix31 84,546 Reputation points
    2020-11-01T04:40:23.643+00:00

    It is done with WmiSetSingleInstance

    I tested on Windows 10 with similar code I had posted at Disabling auto-suspend (of an USB hub) using c++
    by replacing

    hdi = SetupDiGetClassDevs(&GUID_DEVCLASS_NET, NULL, NULL, DIGCF_PRESENT);
    
    • the test on lpszCompDescription by a given network adapter
    • GUIDs for 2 other check boxes : DEFINE_GUID(GUID_POWER_DEVICE_WAKE_ENABLE, 0xa9546a82L, 0xfeb0, 0x11d0, 0xbd, 0x26, 0x00, 0xaa, 0x00, 0xb7, 0xb3, 0x2a);
      DEFINE_GUID(GUID_POWER_DEVICE_WAKE_ON_MAGIC_PACKET_ONLY, 0xa14f1c97L, 0x8839, 0x4f8a, 0x99, 0x96, 0xa2, 0x89, 0x96, 0xeb, 0xbf, 0x1d);
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.