I'm aware this is not a Pymem issue, but declaring and using the types within Pymem avoid this issue from occurring, and considering I can't really think of a reason why you wouldn't want to add the types and there's a more likely chance Pymem will release a minor version before pyglet 2.0 lands, I'm hoping I can sneak this through the door 🙏🏽 (I have unblocked myself by building a patched pymem locally with these changes)
Came across this issue when trying to use
Pymem
withpyglet
(https://pyglet.org/). It seems that the Kernel32.SetLastError types are incorrect for the current pyglet version 1.5. https://github.com/pyglet/pyglet/blob/6de9cc853c0ced894971f5bbf2b7f61174f8c632/pyglet/libs/win32/__init__.py#L159-L160However the types are now fixed in this PR: https://github.com/pyglet/pyglet/pull/525 but are yet to be released as they are waiting for a 2.0 release.
I'm aware this is not a Pymem issue, but declaring and using the types within Pymem avoid this issue from occurring, and considering I can't really think of a reason why you wouldn't want to add the types and there's a more likely chance Pymem will release a minor version before pyglet 2.0 lands, I'm hoping I can sneak this through the door 🙏🏽 (I have unblocked myself by building a patched pymem locally with these changes)
I searched the Github Issues and Discord, looks like someone had experienced this before and I assume gave up:![image](https://user-images.githubusercontent.com/28290599/171411640-080cddf5-3230-40c5-a181-0e1f372049d1.png)