[jawsscripts] Re: Creating a Com Object in JAWS scripts

  • From: Soronel Haetir <soronel.haetir@xxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Thu, 16 Jul 2015 07:26:47 -0800

I'm not sure that ATL is included with the free versions of VS, sorry
I forgot about that. I have Pro and it is definitely included there,
Along with the project wizards.

If the free versions do not have ATL you can do the IDispatch steps
that ATL helps with using DispGetIDsOfNames /DispCallFunc. Uou will
have to load the type library yourself in that case. (Loading the type
library thenusing those functions is how ATL deals with wiring the
implemtation of a dual interface to a request made through IDispatch).
And in case you haven't understood the term before, a dual interface
is one that dervives from IDispatch but can also be called directly.

On 7/16/15, Peter Torpey <ptorpey00@xxxxxxxxx> wrote:

Thanks for the info on dispatch objects and connecting a DLL to JAWS.

These Microsoft "help" pages are so full of links to links and connections
to sub topics and jargon that it is difficult to follow and get the high
level overview. Anyway, I think I understand basically what has to be
done.

I was hoping not to have to code up all of the interface requirements and
that there would be a simple way or wizard to generate an ATL project and
make use of COM. I did find some tutorials (not Microsoft sites!) that
describe how to do this with older versions of Visual Studio, but I have VS
2013 and I didn't see the same options / dialogs for creating such a
project. Maybe I need to hunt around more and experiment.

If you have any suggestions for making a test project using some kind of ATL
wizard in VS 2013 that might give me a jump start.

Thanks.

--Pete


-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel Haetir
Sent: Tuesday, July 14, 2015 3:18 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Creating a Com Object in JAWS scripts

It has everything to do with how the type is implemented in code. It
can also have a slight amount to do with how the project itself is
built if you use an IDL file to generate a type library (which I
recommend that you do) you will need to link that type library as a
resource when you build the project).

You can read about using ATL to ease several of the steps involved
with this process at
https://msdn.microsoft.com/en-us/library/ekfyh289.aspx

On 7/14/15, Peter Torpey <ptorpey00@xxxxxxxxx> wrote:
I don't know what a dispatched object is. How can I tell? Is that
something to do with the coding in C++ or how the project is compiled in
Visual Studio?

--Pete




-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel Haetir
Sent: Tuesday, July 14, 2015 2:15 PM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Creating a Com Object in JAWS scripts

Is the object dispatch based? (either dual or purely an IDispatch
implementation)..

Jaws is not capable of dealing with non-dispatch based objects.

On 7/14/15, Peter Torpey <ptorpey00@xxxxxxxxx> wrote:
I created a DLL using Visual Studio and would like to connect objects in
the
DLL in my JAWS scripts.


I am not seeing the object in JAWS and wonder if anyone has any
pointers.
Here is what I did:



1. Compiled test.DLL and made sure the manifest was embedded in
the
DLL (in the Visual Studio Properties dialog).

2. Registered the DLL in Windows using:
regsvr32 (full path to DLL)
The return said that the DLL was properly registerd.

3. In my JAWS scripts I have the lines:
var object o = CreateObjectEx( "ObjectName", false, "test.dll" )



Besides the fact that I am unable to access any of the methods of the
DLL
from within JAWS, I have a test like:



If !o then

SayString( "object was not created";

EndIf



That verifies that the object was not created.



What am I doing wrong here? Is there something I'm missing in the call
to
CreateObjectEx or how one should set the properties inside VS to get
this
to
work?



Thanks.



--Pete





__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts




--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________�

View the list's information and change your settings at
//www.freelists.org/list/jawsscripts

Other related posts: