@@ -511,26 +511,11 @@ def CreateTypeLib(filename, syskind=SYS_WIN32):
511511 _oleaut32 .CreateTypeLib2 (syskind , c_wchar_p (filename ), byref (ctlib ))
512512 return ctlib
513513
514- if os .name == "ce" :
515- # See also:
516- # http://blogs.msdn.com/larryosterman/archive/2006/01/09/510856.aspx
517- #
518- # windows CE does not have QueryPathOfRegTypeLib. Emulate by reading the registry:
519- def QueryPathOfRegTypeLib (libid , wVerMajor , wVerMinor , lcid = 0 ):
520- "Return the path of a registered type library"
521- import _winreg
522- try :
523- hkey = _winreg .OpenKey (_winreg .HKEY_CLASSES_ROOT , r"Typelib\%s\%s.%s\%x\win32" % (libid , wVerMajor , wVerMinor , lcid ))
524- except WindowsError :
525- # On CE, some typelib names are not in the ..\win32 subkey:
526- hkey = _winreg .OpenKey (_winreg .HKEY_CLASSES_ROOT , r"Typelib\%s\%s.%s\%x" % (libid , wVerMajor , wVerMinor , lcid ))
527- return _winreg .QueryValueEx (hkey , "" )[0 ]
528- else :
529- def QueryPathOfRegTypeLib (libid , wVerMajor , wVerMinor , lcid = 0 ):
530- "Return the path of a registered type library"
531- pathname = BSTR ()
532- _oleaut32 .QueryPathOfRegTypeLib (byref (GUID (libid )), wVerMajor , wVerMinor , lcid , byref (pathname ))
533- return pathname .value .split ("\0 " )[0 ]
514+ def QueryPathOfRegTypeLib (libid , wVerMajor , wVerMinor , lcid = 0 ):
515+ "Return the path of a registered type library"
516+ pathname = BSTR ()
517+ _oleaut32 .QueryPathOfRegTypeLib (byref (GUID (libid )), wVerMajor , wVerMinor , lcid , byref (pathname ))
518+ return pathname .value .split ("\0 " )[0 ]
534519
535520################################################################
536521# Structures
0 commit comments