win32net.NetWkstaSetInfo - How to use it?

Patrick Blanchette pblanchette at pixelsystems.com
Wed Dec 13 09:18:28 EST 2000


I,
   I'm trying to set the computer name of a WinNT workstation using the 
NetWkstaSetInfo and the NetWkstaSetInfofunctions.  When I call 
NetWkstaSetInfo, It always returns the errorno 998:Invalid access to 
memory location.


 >>> info = NetWkstaGetInfo(None, 100)
 >>> info['computername'] = Unicode('NewComputerName')
 >>> NetWkstaSetInfo(None, 100, info)
Traceback (innermost last):
  File "<interactive input>", line 1, in ?
api_error: (998, 'NetWkstaSetInfo', 'Invalid access to memory location.')


Whats wrong?  How should I use these functions?


Thanks in advance.




More information about the Python-list mailing list