[Nvda-dev] Using the NVDAControllerClient in a application

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Nvda-dev] Using the NVDAControllerClient in a application

Mike Bledig

Hi

Has anyone tried to call the NVDA API from within a vb app?

I'm trying to do this, but not to sure if I'm doing it correct or not

I've created a.bas module with the declarations as follows:

Public Declare Function nvdaController_speakText Lib
"nvdaControllerClient.dll" (ByVal StringToSpeak As String) As Long

Then a module that calls the API:


Private Sub Form_Load()
nvdaController_speakText "hello testing, blah blah"
End Sub

When I run it, I get a bad dll calling convention

Can anyone help with this?

Mike




Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] Using the NVDAControllerClient in a application

Michael Curran-3
Hi Mike,

NVDA's client dll uses the c dll calling convention, (I can't quite
remember what its really called).
But its not the stdcall calling convention that most Windows API dlls use.

So, I guess that visual basic then can only use the stdcall calling
convention then?

Right now I have no idea if I can force those functions to that calling
convention (as they are automatically generated from an RPC interface
description). However I will take a look. As this is a Windows screen
reader, I guess it does make sence for the client dll to use the most
common calling convention on Windows, so I do want to fix this if I can.

Not that this helps you though, but I should note that  C/C++ programs,
and Python programs, and probably others can use the C call calling
convention quite fine. Its only Visual Basic that seems to complain,
which is annoying.

Mick



On 23/01/2010 6:36 AM, Mike Bledig wrote:

>
> Hi
>
> Has anyone tried to call the NVDA API from within a vb app?
>
> I'm trying to do this, but not to sure if I'm doing it correct or not
>
> I've created a.bas module with the declarations as follows:
>
> Public Declare Function nvdaController_speakText Lib
> "nvdaControllerClient.dll" (ByVal StringToSpeak As String) As Long
>
> Then a module that calls the API:
>
>
> Private Sub Form_Load()
> nvdaController_speakText "hello testing, blah blah"
> End Sub
>
> When I run it, I get a bad dll calling convention
>
> Can anyone help with this?
>
> Mike
>
>
>
> _______________________________________________
> Nvda-dev mailing list
> [hidden email]
> http://lists.nvaccess.org/listinfo/nvda-dev


--
Michael Curran
President, NV Access Inc
Email: [hidden email]
Website: www.nvaccess.org
ABN 61773362390.


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] Using the NVDAControllerClient in a application

James Teh
On 23/01/2010 3:22 PM, Michael Curran wrote:
> So, I guess that visual basic then can only use the stdcall calling
> convention then?
We had a similar problem with liblouis and Visual Basic. I had to change
the liblouis dll to be stdcall for this reason.

Jamie

--
James Teh
Vice President
NV Access Inc, ABN 61773362390
Email: [hidden email]
Web site: http://www.nvaccess.org/


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] Using the NVDAControllerClient in a application

高生旺
Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] Using the NVDAControllerClient in a application

Lex-2
In reply to this post by Michael Curran-3
Hi,

23.01.2010 7:22, Michael Curran пишет:
> NVDA's client dll uses the c dll calling convention, (I can't quite
> remember what its really called).
It is called "cdecl" - the standart C calling convention.
> So, I guess that visual basic then can only use the stdcall calling
> convention then?
I hope that it is possible even in VB.


Reply | Threaded
Open this post in threaded view
|

Re: [Nvda-dev] Using the NVDAControllerClient in a application

James Teh
In reply to this post by 高生旺
On 23/01/2010 4:02 PM, 高生旺 wrote:
> http://www.nvda-project.org/nvdaControllerClient/nvdaControllerClient_main-3267.7z
> shows 403 forbidden.
Fixed. Sorry.

Jamie

--
James Teh
Vice President
NV Access Inc, ABN 61773362390
Email: [hidden email]
Web site: http://www.nvaccess.org/