Repository navigation
Conversation
The ZDSR API's Braille export was introduced after its speech exports. Requiring it prevented older API DLLs from loading even though speech was available. Resolve an app-local DLL first, then the product installation path from the registry, and only then use the ambient Windows DLL search path. This prevents a stale same-named DLL in PATH from shadowing the registered installation while preserving app-local deployments. Bind Braille as an optional export. When it is absent, omit the Braille feature, return not-implemented for direct Braille calls, and let output continue with speech only. Signed-off-by: qt06 <qt06.com@gmail.com>
754e3ed to
3a8dc33
Compare
|
So, this PR description is slightly inaccurate (it affects everything that loads a DLL, not just ZDSR) and I have some other issues with it:
|
|
Also, please bring backend notes and error code/docs up to date with respect to the ZDSR backends behavior now. I did not immediately consider the implications of PRs #177 and #178 and how they broke expected behavior, and to be fair this was an easy thing to miss. However, this does need to be corrected at some point. You may either do it in this PR or you may do it in a follow-up. |
|
Closing this PR as requested; the changes have been split by concern:
PR #181 covers the code and Braille API note. PR #182 documents the behaviors from #177 and #178. The suggested merge order is #180 and #181 independently, then #182 after #177/#178 and #181 are merged. |
|
Closed in favor of the split PRs linked above. |
The ZDSR API's
Brailleexport was introduced after its four speech exports. RequiringBrailleprevented older API DLLs from loading even though speech was available.open_optional_librarypreviously triedLoadLibraryby bare name before checking Prism's module directory and the registry-selected product installation path. Windows could therefore resolve an older same-namedZDSRAPI.dllfrom%PATH%and never try the installed copy.Search the Prism module directory first, then the registered installation directory, and only then use Windows' ambient DLL search path. This preserves app-local DLL overrides while avoiding stale
%PATH%copies shadowing the installed API. BindBrailleas optional: when absent, the backend omitsSUPPORTS_BRAILLE, direct Braille calls returnPRISM_ERROR_NOT_IMPLEMENTED, andoutputcontinues with speech only.Verified on Windows:
ZDSRAPI_x64.dll(noBraille) in a%PATH%directory and no app-local copy, the previous loader failed backend initialization; the updated loader selects the registry-installed DLL and initializes successfully.Braille, initialization succeeds, Braille is not advertised, direct Braille returns not-implemented, and speech-onlyoutputsucceeds.The shared loader change affects backends that specify a registered install location (ZDSR and Boy PC Reader). No diagnostic logging was added.