def _raw_query (self, wql):
"""Execute a WQL query and return its raw results. Use the flags
recommended by Microsoft to achieve a read-only, semi-synchronous
query where the time is taken while looping through.
NB Backslashes need to be doubled up.
"""
flags = wbemFlagReturnImmediately | wbemFlagForwardOnly
wql = wql.replace ("\\", "\\\\")
try:
return self._namespace.ExecQuery (strQuery=wql, iFlags=flags)
except pywintypes.com_error:
handle_com_error ()
评论列表
文章目录