mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-25 18:14:28 +01:00
HRESULT has moved from wintypes in python 3.8
This commit is contained in:
parent
f615b44ace
commit
860bcf0088
1 changed files with 2 additions and 1 deletions
|
|
@ -1471,12 +1471,13 @@ def event_type_name(ev_or_etype):
|
|||
def set_app_uid(val):
|
||||
import ctypes
|
||||
from ctypes import wintypes
|
||||
from ctypes import HRESULT
|
||||
try:
|
||||
AppUserModelID = ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID
|
||||
except Exception: # Vista has no app uids
|
||||
return False
|
||||
AppUserModelID.argtypes = [wintypes.LPCWSTR]
|
||||
AppUserModelID.restype = wintypes.HRESULT
|
||||
AppUserModelID.restype = HRESULT
|
||||
try:
|
||||
AppUserModelID(unicode_type(val))
|
||||
except Exception as err:
|
||||
|
|
|
|||
Loading…
Reference in a new issue