mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
33 lines
1.2 KiB
Python
33 lines
1.2 KiB
Python
import windows
|
|
import windows.generated_def as gdef
|
|
|
|
manager = windows.system.device_manager
|
|
print(manager)
|
|
for devcls in manager.classes:
|
|
print("- {0!r}".format(devcls))
|
|
for device in devcls.devices:
|
|
print(u" - [{dev.name}] <{dev.description}> ({dev.device_object_name})".format(dev=device))
|
|
devconf = device.get_first_logical_configuration(gdef.ALLOC_LOG_CONF)
|
|
if devconf:
|
|
# import pdb;pdb.set_trace()
|
|
# print(devconf)
|
|
print(" <config:>")
|
|
for resource in devconf.resources:
|
|
print(" - {0}".format(resource))
|
|
|
|
# print(dev.description)
|
|
# print(dev.device_object_name)
|
|
# # x = dev.get_first_logical_configuration(gdef.ALLOC_LOG_CONF)
|
|
# x = dev.get_first_logical_configuration(gdef.BOOT_LOG_CONF)
|
|
# if x:
|
|
# print(x)
|
|
# for res in x.resources:
|
|
# print(res)
|
|
# # print(repr(res.rawdata))
|
|
# print(res.header)
|
|
# assert not res.data
|
|
# # import pdb;pdb.set_trace()
|
|
# import pdb;pdb.set_trace()
|
|
# print("BYE")
|
|
|