MSFN Forum: enableStatic() errors out with NETCFG_E_NO_WRITE_LOCK on Win2008 core - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

enableStatic() errors out with NETCFG_E_NO_WRITE_LOCK on Win2008 core Rate Topic: -----

#1 User is offline   gauravkr 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 19-January 09

Posted 28 August 2009 - 01:15 AM

Hi,
I am trying to programmatically set static IPs in a multi NIC multi IP setup (using C++) - 64bit Win2008 Standard Core installation.

I am deploying WMI to do the same. However, the behaviour of enableStatic() is un-deterministic. I see that it successfully sets the IPs at times and fails to do the same in few other retry attempts; it fails with error 0x8004A024 = NETCFG_E_NO_WRITE_LOCK, which means some other application is holding the lock on the nic.

I got to know of this as a known issue as listed in the KB article: KB950134.
As suggested here I tried installing the hotfixes; but the only effect was frequency of this error coming up has reduced, but it is still erroring out. I also tried patching it to SP2 (note that this hotfix has gone into SP2), but even that did not help and am again getting the enableStatic failure with 0x8004A024.

I even tried using INetCfg to find the status of Write lock when enableStatic() has failed using WMI and then releasing it, but this doesnt work either (I used INetCfgLock::IsWriteLocked() and then INetCfgLock::ReleaseWriteLock() but this does not seem to work. It is returning success but not able to release the lock).

Does anyone have any suggestions on how to get over it?
Is there any other way to handle the NETCFG_E_NO_WRITE_LOCK error caused by enableStatic?

Any suggestions and pointers will be greatly appreciated.

Thanks,
~GK

This post has been edited by gauravkr: 28 August 2009 - 01:19 AM



#2 User is offline   gauravkr 

  • Newbie
  • Group: Members
  • Posts: 12
  • Joined: 19-January 09

Posted 07 September 2009 - 12:33 AM

Does anybody have any suggesttions?
Any pointers on this is greatly appreciated.

Thanks,
~GK

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy