Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class INetwork(DispatchBaseClass):
- """Network"""
- CLSID = IID('{DCB00002-570F-4A9B-8D69-199FDBA5723B}')
- coclass_clsid = None
- def GetCategory(self):
- """Returns the category of this network."""
- return self._oleobj_.InvokeTypes(12, LCID, 1, (3, 0), (),)
- def GetConnectivity(self):
- """Returns the connectivity state of this network."""
- return self._oleobj_.InvokeTypes(11, LCID, 1, (3, 0), (),)
- def GetDescription(self):
- """Get the network description."""
- # Result is a Unicode object
- return self._oleobj_.InvokeTypes(3, LCID, 1, (8, 0), (),)
- def GetDomainType(self):
- """Get the domain type."""
- return self._oleobj_.InvokeTypes(6, LCID, 1, (3, 0), (),)
- def GetName(self):
- """Get the name of this network."""
- # Result is a Unicode object
- return self._oleobj_.InvokeTypes(1, LCID, 1, (8, 0), (),)
- # Result is of type IEnumNetworkConnections
- def GetNetworkConnections(self):
- """Get the list of network connections for this network."""
- ret = self._oleobj_.InvokeTypes(7, LCID, 1, (9, 0), (),)
- if ret is not None:
- ret = Dispatch(ret, u'GetNetworkConnections', '{DCB00006-570F-4A9B-8D69-199FDBA5723B}')
- return ret
- def GetNetworkId(self):
- """Get the network ID."""
- return self._ApplyTypes_(5, 1, (36, 0), (), u'GetNetworkId', None,)
- def GetTimeCreatedAndConnected(self, pdwLowDateTimeCreated=pythoncom.Missing, pdwHighDateTimeCreated=pythoncom.Missing, pdwLowDateTimeConnected=pythoncom.Missing, pdwHighDateTimeConnected=pythoncom.Missing):
- """Get the time and date this network was created."""
- return self._ApplyTypes_(8, 1, (24, 0), ((16403, 2), (16403, 2), (16403, 2), (16403, 2)), u'GetTimeCreatedAndConnected', None,pdwLowDateTimeCreated
- , pdwHighDateTimeCreated, pdwLowDateTimeConnected, pdwHighDateTimeConnected)
- def SetCategory(self, NewCategory=defaultNamedNotOptArg):
- """Sets the category of this network. This change takes effect immediately."""
- return self._oleobj_.InvokeTypes(13, LCID, 1, (24, 0), ((3, 1),),NewCategory
- )
- def SetDescription(self, szDescription=defaultNamedNotOptArg):
- """Set the network description. This change takes effect immediately."""
- return self._oleobj_.InvokeTypes(4, LCID, 1, (24, 0), ((8, 1),),szDescription
- )
- def SetName(self, szNetworkNewName=defaultNamedNotOptArg):
- """Rename this network. This change takes effect immediately."""
- return self._oleobj_.InvokeTypes(2, LCID, 1, (24, 0), ((8, 1),),szNetworkNewName
- )
- _prop_map_get_ = {
- "IsConnected": (10, 2, (11, 0), (), "IsConnected", None),
- "IsConnectedToInternet": (9, 2, (11, 0), (), "IsConnectedToInternet", None),
- }
- _prop_map_put_ = {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement