[BRLTTY] using BrlApi with Visual Studio

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Nov 18 19:38:03 EST 2008


Thijs Koerselman, le Tue 18 Nov 2008 23:02:30 +0100, a écrit :
> The first time I connect to it from my application it appears to
> work. Every time after that I get the message that where are too many
> simultaneous connections.

Ah, right, small bug. Dave, here is a patch. I have uploaded a -11
version on

http://brl.thefreecat.org/brltty/brltty-win-3.10-11.exe
http://brl.thefreecat.org/brltty/brltty-win-3.10-11.zip

which includes the fix.  In your case, please _do_ use enterTtyMode().
enterTtyModeWithPath() is only useful for screen readers like NVDA.  In
your case, you do not want to take the control of the whole desktop, but
just of your own window.  If your application is console-based, you can
just call enterTtyMode().  If it is window-based, pass the Windows ID to
enterTtyMode()

> I thought maybe its wrong to not run it as a service,

No, that is fine.

> Now I can't seem to find how to install it as a service.

Simply run install.bat

> C:\Program Files\BRLTTY\bin>installutil brltty.exe

I don't know installutil, brltty probably doesn't meet its expectations.

Samuel
-------------- next part --------------
Index: Programs/brlapi_server.c
===================================================================
--- Programs/brlapi_server.c	(revision 4047)
+++ Programs/brlapi_server.c	(working copy)
@@ -629,7 +629,7 @@
 /* Frees all resources associated to a connection */
 static void freeConnection(Connection *c)
 {
-  if (c->fd>=0) {
+  if (c->fd != INVALID_FILE_DESCRIPTOR) {
     if (c->auth != 1) unauthConnections--;
     closeFileDescriptor(c->fd);
   }


More information about the BRLTTY mailing list