@@ -223,13 +223,13 @@ def GetClassObject(progid, clsctx=None, pServerInfo=None, interface=None):
223
223
224
224
225
225
@overload
226
- def CreateObject (progid : _UnionT [str , CoClass , GUID ]) -> Any :
226
+ def CreateObject (progid : _UnionT [str , Type [ CoClass ] , GUID ]) -> Any :
227
227
...
228
228
229
229
230
230
@overload
231
231
def CreateObject (
232
- progid : _UnionT [str , CoClass , GUID ],
232
+ progid : _UnionT [str , Type [ CoClass ] , GUID ],
233
233
clsctx : Optional [int ] = None ,
234
234
machine : Optional [str ] = None ,
235
235
interface : Optional [Type [_T_IUnknown ]] = None ,
@@ -240,7 +240,7 @@ def CreateObject(
240
240
241
241
242
242
def CreateObject (
243
- progid : _UnionT [str , CoClass , GUID ], # which object to create
243
+ progid : _UnionT [str , Type [ CoClass ] , GUID ], # which object to create
244
244
clsctx : Optional [int ] = None , # how to create the object
245
245
machine : Optional [str ] = None , # where to create the object
246
246
interface : Optional [Type [IUnknown ]] = None , # the interface we want
@@ -289,7 +289,7 @@ def CreateObject(
289
289
pServerInfo ,
290
290
)
291
291
if machine is not None and pServerInfo is not None :
292
- msg = "You can notset both the machine name and server info."
292
+ msg = "You cannot set both the machine name and server info."
293
293
raise ValueError (msg )
294
294
obj = comtypes .CoCreateInstanceEx (
295
295
clsid ,
0 commit comments