Skip to content

Commit

Permalink
[test\test_imfattributes.py] Use WinDLL instead of windll
Browse files Browse the repository at this point in the history
Partially fix enthought#735
  • Loading branch information
moi15moi committed Jan 12, 2025
1 parent 6e3762f commit bc6b5e0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions comtypes/test/test_imfattributes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import contextlib
import unittest as ut

from ctypes import POINTER, pointer, windll
from ctypes import HRESULT, POINTER, WinDLL, c_uint32, pointer
from comtypes import GUID
import comtypes.client

Expand All @@ -12,8 +12,15 @@ def test_imfattributes(self):
comtypes.client.GetModule("msvidctl.dll")
from comtypes.gen import MSVidCtlLib

_mfplat = WinDLL("mfplat")

UINT32 = c_uint32
_MFCreateAttributes = _mfplat.MFCreateAttributes
_MFCreateAttributes.argtypes = [POINTER(POINTER(MSVidCtlLib.IMFAttributes)), UINT32]
_MFCreateAttributes.restype = HRESULT

imf_attrs = POINTER(MSVidCtlLib.IMFAttributes)()
hres = windll.mfplat.MFCreateAttributes(pointer(imf_attrs), 2)
hres = _MFCreateAttributes(pointer(imf_attrs), 2)
self.assertEqual(hres, 0)

MF_TRANSCODE_ADJUST_PROFILE = GUID("{9c37c21b-060f-487c-a690-80d7f50d1c72}")
Expand Down

0 comments on commit bc6b5e0

Please sign in to comment.