locked
The EnableStatic method of the Win32_NetworkAdapterConfiguration class fails for the second network adapter RRS feed

  • Question

  • I'm trying to set static address for both the two network adapters present on my device using EnableStatic method of the  Win32_NetworkAdapterConfiguration class, but while for the first one all works correctly for the second one the setting fails.
    When it fails the ReturnValue property is set to 0x8004a024 (it's 0 when it works).
    I've found that a similar problem is present in Windows Vista:
    http://support.microsoft.com/kb/950134/en-us/
    The web page explains that 0x8004a024 is the error code for NETCFG_E_NO_WRITE_LOCK, so I've tried to delay the EnableStatic call for the second network adapter and it works. I'm surprised about that becouse I'm calling the EnableStatic method in synchronous mode, so I'm expecting that I can call the method for two consecutive times without any problem.
    I wanna know if the Windows Vista problem is fixed for Windows7 Embedded or if I need to install some hotfix, and in case that I haven't need to install anything how I can know when the first call to EnableStatic is really completed with the lock release.

    Wednesday, October 6, 2010 2:16 PM