Fix UWP OCR on 64 bit NVDA#18858
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes Windows OCR functionality on 64-bit NVDA builds by correcting ctypes definitions and reorganizing code structure.
- Creates a new
NVDAHelper.localWin10module with properly defined ctypes for Win10 helper DLL functions - Refactors UWP OCR code to use the new module instead of inline ctypes definitions
- Adds deprecation warnings for moved/removed symbols
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| user_docs/en/changes.md | Documents deprecation of bstrReturn and uwpOcr_Callback |
| source/screenBitmap.py | Adds parentheses to fix operator precedence in array size calculation |
| source/contentRecog/uwpOcr.py | Refactors to use new NVDAHelper.localWin10 module imports |
| source/NVDAHelper/localWin10.py | New module with proper ctypes definitions for Win10 helper DLL |
| source/NVDAHelper/init.py | Moves and deprecates bstrReturn function |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
seanbudd
approved these changes
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None
Summary of the issue:
Windows OCR doesn't work on 64 bit builds of NVDA.
Description of user facing changes:
Windows OCR works on 64-bit builds of NVDA.
Description of developer facing changes:
Deprecations
Description of development approach:
nvdaHelperLocalWin10.dllthat were causing problemsNVDAHelper.localWin10moduleTesting strategy:
Recognise text (NVDA welcome dialog) on:
Known issues with pull request:
I have not moved all ctypes definitions for functions exported by
nvdaHelperLocalWin10.dlltoNVDAHelper.localWin10. I believe this is best done in a separate PR, to allow this bugfix to be merged sooner than later.Code Review Checklist: