Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64-bit: Properly prototype *all* the used functions #1805

Open
Athanasius opened this issue Jan 12, 2023 · 3 comments · Fixed by #2263
Open

64-bit: Properly prototype *all* the used functions #1805

Athanasius opened this issue Jan 12, 2023 · 3 comments · Fixed by #2263
Assignees
Labels
bug dependencies Pull requests that update a dependency file OS Issue python Pull requests that update Python code

Comments

@Athanasius
Copy link
Contributor

LCU No Fool Like One reported seeing:

exception ignored on calling ctypes callback function: <function EDLogs.game_running.<locals>.callback at 0x0000020E9C9D0EA0>
Traceback (most recent call last):
  File "monitor.pyc", line 2041, in callback
  File "monitor.pyc", line 2034, in WindowTitle
ctypes.ArgumentError: argument 1: OverflowError: int too long to convert

presumably on the 5.7.1-alpha1 64-bit pre-release. That makes File "monitor.pyc", line 2034, in WindowTitle to be the line:

length = GetWindowTextLength(h) + 1

That function hasn't been properly prototyped, so will be returning int, instead of the proper type. I note that this is also actually GetWindowTextLengthW.

So, we should really just properly prototype all of the ctypes functions we use to be sure of no issues going forwards.

@Athanasius Athanasius added bug unconfirmed An unconfirmed bug python Pull requests that update Python code labels Jan 12, 2023
@Athanasius
Copy link
Contributor Author

Note that I couldn't reproduce this specific issue, not with 64-bit 3.11.1 under PyCharm nor with the 5.7.1-alpha1 64-bit pre-release.

@Rixxan
Copy link
Contributor

Rixxan commented Jun 11, 2024

It looks like pywin32's next version should include some of the holdouts we've been missing for so long.

Rixxan added a commit to HullSeals/EDMarketConnector that referenced this issue Jun 11, 2024
@Rixxan Rixxan self-assigned this Jun 17, 2024
@Rixxan Rixxan modified the milestones: Pre-6.0 Changes, 5.12 Jun 17, 2024
@Rixxan Rixxan added dependencies Pull requests that update a dependency file OS Issue and removed unconfirmed An unconfirmed bug labels Jun 17, 2024
@Rixxan Rixxan linked a pull request Jun 18, 2024 that will close this issue
@Rixxan
Copy link
Contributor

Rixxan commented Jul 22, 2024

Some work done but not marking as staged. Will be a continual thing as Pywin32 continues to be updated. Updated to my knowledge through version 306.

@Rixxan Rixxan modified the milestones: 5.12, Pre-6.0 Changes Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file OS Issue python Pull requests that update Python code
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

2 participants