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

Added C# example for NVDA controller client DLL #9600

merged 5 commits into from May 21, 2019


None yet
3 participants
Copy link

commented May 20, 2019

Link to issue number:

Based on #7010.

Summary of the issue:

The original author of #7010 seems not to be active anymore, even if there are still review actions to perform on the PR.

Description of how this pull request fixes the issue:

This PR introduces a C# program containing a PInvoke wrapper around nvdaControllerClient.dll, and demonstrates how to use it.
I also updated the readme. I think that the link pointing to the pre-built binaries should be updated as well.

Testing performed:

Performed the same tasks as in the Python example.

Known issues with pull request:


Change log entry:

Section: New features

  • Added a new example to demonstrate how to call the nvdaControllerClient.dll from C#.
Copy link

left a comment

Thanks for taking this on.
It looks like the file is included twice. Please delete the example.cs one, the other comments for that file also apply to the example_csharp.cs file

/// <param name="interrupt">If true, NVDA will immediately speak the text, interrupting whatever it was speaking before.</param>
public static void Speak(string text, bool interrupt = true)
if (interrupt)

This comment has been minimized.

Copy link

feerrenrut May 21, 2019


While it is certainly valid to leave the braces out, it's not recommended. It is very easy for someone to add a second line to this which will not be subject to the condition.

Show resolved Hide resolved extras/controllerClient/x86/example.cs Outdated

DataTriny added some commits May 21, 2019


This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2019

Sorry, but it is so common in the .NET world to adopt this coding style.
Everything fixed!


This comment has been minimized.

Copy link

commented May 21, 2019

No problem, I understand the temptation. I have just seen too much wasted time because of it. Thanks for making the changes.

@feerrenrut feerrenrut merged commit e5a362d into nvaccess:master May 21, 2019

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded

@nvaccessAuto nvaccessAuto added this to the 2019.2 milestone May 21, 2019

feerrenrut added a commit that referenced this pull request May 21, 2019

@DataTriny DataTriny deleted the DataTriny:cs_example branch May 21, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.