Skip to content

Commit

Permalink
[test\test_urlhistory.py] Use WinDLL instead of windll (#766)
Browse files Browse the repository at this point in the history
  • Loading branch information
moi15moi authored Jan 26, 2025
1 parent 183991d commit 4fd8cc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions comtypes/test/test_urlhistory.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from ctypes import *
from comtypes.client import GetModule, CreateObject
from comtypes.patcher import Patch
from comtypes.GUID import _CoTaskMemFree

# ./urlhist.tlb was downloaded somewhere from the internet (?)

Expand All @@ -23,8 +24,8 @@ def __ctypes_from_outparam__(self):
for n, _ in self._fields_:
setattr(result, n, getattr(self, n))
url, title = self.pwcsUrl, self.pwcsTitle
windll.ole32.CoTaskMemFree(cast_field(self, "pwcsUrl", c_void_p))
windll.ole32.CoTaskMemFree(cast_field(self, "pwcsTitle", c_void_p))
_CoTaskMemFree(cast_field(self, "pwcsUrl", c_void_p))
_CoTaskMemFree(cast_field(self, "pwcsTitle", c_void_p))
return result


Expand Down

0 comments on commit 4fd8cc3

Please sign in to comment.