Compiling IDL files using Midl.exe?

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

Compiling IDL files using Midl.exe?

Bryan Garaventa-2
Hello, I'm trying to compile the IDL files into Win32 TLB type libs by using the following commandline

midl /nocpp /tlb C:\idl\ISimpleDOMNode.tlb C:\idl\ISimpleDOMNode.idl

However, I always get the error: midl : command line error MIDL1001 : cannot open input file objidl.idl

I had to add the flag /nocpp, since without, I consistently get the error: midl : command line error MIDL1005 : cannot find C preprocessor cl.exe

Does anyone know how to generate usable TLBs from these IDL files using Midl.exe?

Thanks,

Bryan


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Compiling IDL files using Midl.exe?

Bryan Garaventa-2
Was this issue ever resolved? I found this on the page at
http://www.freelists.org/archives/nvda/12-2006/msg00006.html , dating back
to 2006? I hope someone has figured this out by now...

[Excerpt]

*Need to generate a typelib for ISimpleDomNode in mozilla so NVDA can work
out an IAccessible's mozilla MSAA child ID. Once this is done then work on
the
mozilla virtualBuffer can continue.

This problem is getting very old and anoying, but because comtypes in python
depends on having a compiled type library for the com interface it is
dealing
with (excluding when it can use IDispatch of course) it makes things a lot
more complex than if NVDA was written in C or C++. Don't get me wrong
though,
I think in some ways writing it in python has managed to get NVDA to the
state it is in a way way shorter time that it would have to write it in C.
But
the truth is, for Mozilla support to get off the ground, we need to be able
to compile a tlb out of ISimpleDomNode.idl (which can be found at

http://www.mozilla.org/access/windows/at-apis).

But up until now, I have not had any success with this.

[End Excerpt]


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand

----- Original Message -----
From: "Bryan Garaventa" <[hidden email]>
To: "dev-accessibility Firefox" <[hidden email]>
Sent: Monday, July 14, 2008 9:39 AM
Subject: Compiling IDL files using Midl.exe?


> Hello, I'm trying to compile the IDL files into Win32 TLB type libs by
> using the following commandline
>
> midl /nocpp /tlb C:\idl\ISimpleDOMNode.tlb C:\idl\ISimpleDOMNode.idl
>
> However, I always get the error: midl : command line error MIDL1001 :
> cannot open input file objidl.idl
>
> I had to add the flag /nocpp, since without, I consistently get the error:
> midl : command line error MIDL1005 : cannot find C preprocessor cl.exe
>
> Does anyone know how to generate usable TLBs from these IDL files using
> Midl.exe?
>
> Thanks,
>
> Bryan
>
>
> --------------------------------------------------------------------------------
> Bryan Garaventa
> Senior Accessibility Engineer
> SSB + BART Group
> [hidden email]
> www.SSBBartGroup.com
> Accessibility-On-Demand
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Compiling IDL files using Midl.exe?

Aaron Leventhal-3
In reply to this post by Bryan Garaventa-2
Hi Bryan. Here's the bug:

https://bugzilla.mozilla.org/show_bug.cgi?id=363230
You can make a tlb for IAccessible2 but not ISimpleDOMNode.

We'll put it back on our radar. Sorry about the problem.
We thought when we went to IAccessible2 that there would be little
interest in our ISimpleDOM* interfaces since we made sure that
IAccessible2 and friends could cover the same needs.

Are you sure you don't want to look into using that? I believe the NVDA
folks found a 2x speed up when you're out of process just by using
IAccessible2 -- there are fewer nodes in the tree to visit.

- Aaron



Bryan Garaventa wrote:

> Was this issue ever resolved? I found this on the page at
> http://www.freelists.org/archives/nvda/12-2006/msg00006.html , dating
> back to 2006? I hope someone has figured this out by now...
>
> [Excerpt]
>
> *Need to generate a typelib for ISimpleDomNode in mozilla so NVDA can
> work out an IAccessible's mozilla MSAA child ID. Once this is done then
> work on the
> mozilla virtualBuffer can continue.
>
> This problem is getting very old and anoying, but because comtypes in
> python depends on having a compiled type library for the com interface
> it is dealing
> with (excluding when it can use IDispatch of course) it makes things a
> lot more complex than if NVDA was written in C or C++. Don't get me
> wrong though,
> I think in some ways writing it in python has managed to get NVDA to the
> state it is in a way way shorter time that it would have to write it in
> C. But
> the truth is, for Mozilla support to get off the ground, we need to be
> able to compile a tlb out of ISimpleDomNode.idl (which can be found at
>
> http://www.mozilla.org/access/windows/at-apis).
>
> But up until now, I have not had any success with this.
>
> [End Excerpt]
>
>
> --------------------------------------------------------------------------------
>
> Bryan Garaventa
> Senior Accessibility Engineer
> SSB + BART Group
> [hidden email]
> www.SSBBartGroup.com
> Accessibility-On-Demand
>
> ----- Original Message ----- From: "Bryan Garaventa"
> <[hidden email]>
> To: "dev-accessibility Firefox" <[hidden email]>
> Sent: Monday, July 14, 2008 9:39 AM
> Subject: Compiling IDL files using Midl.exe?
>
>
>> Hello, I'm trying to compile the IDL files into Win32 TLB type libs by
>> using the following commandline
>>
>> midl /nocpp /tlb C:\idl\ISimpleDOMNode.tlb C:\idl\ISimpleDOMNode.idl
>>
>> However, I always get the error: midl : command line error MIDL1001 :
>> cannot open input file objidl.idl
>>
>> I had to add the flag /nocpp, since without, I consistently get the
>> error: midl : command line error MIDL1005 : cannot find C preprocessor
>> cl.exe
>>
>> Does anyone know how to generate usable TLBs from these IDL files
>> using Midl.exe?
>>
>> Thanks,
>>
>> Bryan
>>
>>
>> --------------------------------------------------------------------------------
>>
>> Bryan Garaventa
>> Senior Accessibility Engineer
>> SSB + BART Group
>> [hidden email]
>> www.SSBBartGroup.com
>> Accessibility-On-Demand
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Compiling IDL files using Midl.exe?

Bryan Garaventa-2
    Thanks for the bug info, I'm not familiar with IAccessible2, does this
interface roughly cover the same functionality as ISimpleDOMDocument.idl,
ISimpleDOMNode.idl, and ISimpleDOMText.idl?

I'm creating an ActiveX control that inherits IDispatch. One of the public
functions, SetAccessibleObjectFromEvent, accepts all of the standard
arguments for AccessibleObjectFromEvent, omitting the object of type Variant
which is created automatically within the ActiveX.

When called from the JAWS scripting language, and the handle for the content
window of Firefox is passed to the SetAccessibleObjectFromEvent function,
the MSAA object will be saved to a public property within the ActiveX for
retrieval.

Theoretically as yet, since I still need to finish the interface support,
which is where the ISimpleDOMNode tlb comes into play.

I would like to convert the MSAA obj into a standard DOM using this
functionality within the ActiveX, which will then be saved to another public
property for retrieval. This should make it readable within the JAWS
scripting language by the nature of the object type.

To accomplish this though, I need to enable the equivalent of the
ISimpleDOMNode interface within the VB project.

If I were able to create an IAccessible2 tlb, would this type conversion be
possible?

Thanks,

Bryan



--
--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand


----- Original Message -----
From: "Aaron Leventhal" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Tuesday, July 15, 2008 12:57 AM
Subject: Re: Compiling IDL files using Midl.exe?


> Hi Bryan. Here's the bug:
>
> https://bugzilla.mozilla.org/show_bug.cgi?id=363230
> You can make a tlb for IAccessible2 but not ISimpleDOMNode.
>
> We'll put it back on our radar. Sorry about the problem.
> We thought when we went to IAccessible2 that there would be little
> interest in our ISimpleDOM* interfaces since we made sure that
> IAccessible2 and friends could cover the same needs.
>
> Are you sure you don't want to look into using that? I believe the NVDA
> folks found a 2x speed up when you're out of process just by using
> IAccessible2 -- there are fewer nodes in the tree to visit.
>
> - Aaron
>
>
>
> Bryan Garaventa wrote:
>> Was this issue ever resolved? I found this on the page at
>> http://www.freelists.org/archives/nvda/12-2006/msg00006.html , dating
>> back to 2006? I hope someone has figured this out by now...
>>
>> [Excerpt]
>>
>> *Need to generate a typelib for ISimpleDomNode in mozilla so NVDA can
>> work out an IAccessible's mozilla MSAA child ID. Once this is done then
>> work on the
>> mozilla virtualBuffer can continue.
>>
>> This problem is getting very old and anoying, but because comtypes in
>> python depends on having a compiled type library for the com interface
>> it is dealing
>> with (excluding when it can use IDispatch of course) it makes things a
>> lot more complex than if NVDA was written in C or C++. Don't get me
>> wrong though,
>> I think in some ways writing it in python has managed to get NVDA to the
>> state it is in a way way shorter time that it would have to write it in
>> C. But
>> the truth is, for Mozilla support to get off the ground, we need to be
>> able to compile a tlb out of ISimpleDomNode.idl (which can be found at
>>
>> http://www.mozilla.org/access/windows/at-apis).
>>
>> But up until now, I have not had any success with this.
>>
>> [End Excerpt]
>>
>>
>> --------------------------------------------------------------------------------
>>
>> Bryan Garaventa
>> Senior Accessibility Engineer
>> SSB + BART Group
>> [hidden email]
>> www.SSBBartGroup.com
>> Accessibility-On-Demand
>>
>> ----- Original Message ----- From: "Bryan Garaventa"
>> <[hidden email]>
>> To: "dev-accessibility Firefox" <[hidden email]>
>> Sent: Monday, July 14, 2008 9:39 AM
>> Subject: Compiling IDL files using Midl.exe?
>>
>>
>>> Hello, I'm trying to compile the IDL files into Win32 TLB type libs by
>>> using the following commandline
>>>
>>> midl /nocpp /tlb C:\idl\ISimpleDOMNode.tlb C:\idl\ISimpleDOMNode.idl
>>>
>>> However, I always get the error: midl : command line error MIDL1001 :
>>> cannot open input file objidl.idl
>>>
>>> I had to add the flag /nocpp, since without, I consistently get the
>>> error: midl : command line error MIDL1005 : cannot find C preprocessor
>>> cl.exe
>>>
>>> Does anyone know how to generate usable TLBs from these IDL files
>>> using Midl.exe?
>>>
>>> Thanks,
>>>
>>> Bryan
>>>
>>>
>>> --------------------------------------------------------------------------------
>>>
>>> Bryan Garaventa
>>> Senior Accessibility Engineer
>>> SSB + BART Group
>>> [hidden email]
>>> www.SSBBartGroup.com
>>> Accessibility-On-Demand
>>> _______________________________________________
>>> dev-accessibility mailing list
>>> [hidden email]
>>> https://lists.mozilla.org/listinfo/dev-accessibility
>>
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Compiling IDL files using Midl.exe?

James Teh-2
In reply to this post by Aaron Leventhal-3
Bryan Garaventa wrote:
>   Thanks for the bug info, I'm not familiar with IAccessible2, does this
> interface roughly cover the same functionality as
> ISimpleDOMDocument.idl, ISimpleDOMNode.idl, and ISimpleDOMText.idl?
IAccessible2 is an extension to IAccessible (MSAA) which provides the
rich accessibility coverage that MSAA lacks. For example, it handles
editable text, images, attributes on objects and text, tables, etc.
Conceptually, when using IAccessible2 with Firefox, you are viewing an
accessibility hierarchy. It is not an exact replica of the DOM, although
it does follow the DOM in some respects. Most DOM nodes are represented
in some way, but you might obtain information differently. For example,
if you have a hyperlink object, you wouldn't look at its href attribute
to get the URL, but you would instead use its accessible value or query
to the IAccessibleHyperlink interface. To provide another example, if
you are looking at a clickable piece of span, you wouldn't look for an
onClick attribute, but rather, you would examine its accessible action
to determine whether it is "click".

You can find more info on IAccessible2 here:
http://www.linuxfoundation.org/en/Accessibility/IAccessible2

Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Could the ISimpleDOMNode.idl TLB bug be elevated to high priority?

Bryan Garaventa-2
Thanks for the IAccessible2 info, that makes sense. There doesn't look to be
a way to convert an IAccessible2 object to a DOM object though, which is
where the crux of the problem appears to be regarding screen reader
scripting support.

Would it be possible to elevate the ISimpleDOMNode.idl TLB bug to a
significant priority? At least regarding accessibility.

Ensuring ISimpleDOMNode.idl TLB support would ensure the following...

1) That all Windows AT applications, including JAWS and Window Eyes, would
be able to create an internal COM object, and use this within their own
application regardless of their dev environment. This COM object could then
be used within the AT to return the W3C standard DOM for the Firefox
IAccessible MSAA object returned by AccessibleObjectFromEvent. This DOM
object could then be used as a return value for a relevant function call
within the AT scripting language.

2) Since the standard W3C DOM is returned within JAWS when using a JAWS
scripting function such as IEGetCurrentDocument(), having the ability within
the AT to use the ISimpleDOMNode.TLB type class to convert the IAccessible
MSAA object to a standard W3C DOM would automatically ensure that all
current IE JAWS scripts would seamlessly work as designed by the scriptor
within Firefox. It would be a simple matter for the AT to determine which
browser is being used, and reference the correct DOM object accordingly.
Since Window Eyes now has extensive COM scripting support, accessibility
within Window Eyes would equally be assured using this type class.

3) All that would be needed by the Firefox dev team would be to ensure that
the ISimpleDOMNode.idl interface can be successfully converted to a COM
accessible TLB type class. There would be no need to implement COM or
IDispatch support within Firefox to ensure AT accessibility.

This bug fix would essentially hit quite a few birds with the same stone.

Best wishes,

Bryan


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand


----- Original Message -----
From: "James Teh" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Tuesday, July 15, 2008 9:49 PM
Subject: Re: Compiling IDL files using Midl.exe?


> Bryan Garaventa wrote:
>>   Thanks for the bug info, I'm not familiar with IAccessible2, does this
>> interface roughly cover the same functionality as
>> ISimpleDOMDocument.idl, ISimpleDOMNode.idl, and ISimpleDOMText.idl?
> IAccessible2 is an extension to IAccessible (MSAA) which provides the
> rich accessibility coverage that MSAA lacks. For example, it handles
> editable text, images, attributes on objects and text, tables, etc.
> Conceptually, when using IAccessible2 with Firefox, you are viewing an
> accessibility hierarchy. It is not an exact replica of the DOM, although
> it does follow the DOM in some respects. Most DOM nodes are represented
> in some way, but you might obtain information differently. For example,
> if you have a hyperlink object, you wouldn't look at its href attribute
> to get the URL, but you would instead use its accessible value or query
> to the IAccessibleHyperlink interface. To provide another example, if
> you are looking at a clickable piece of span, you wouldn't look for an
> onClick attribute, but rather, you would examine its accessible action
> to determine whether it is "click".
>
> You can find more info on IAccessible2 here:
> http://www.linuxfoundation.org/en/Accessibility/IAccessible2
>
> Jamie
>
> --
> James Teh
> Email: [hidden email]
> WWW: http://www.jantrid.net/
> MSN Messenger: [hidden email]
> Jabber: [hidden email]
> Yahoo: jcs_teh
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high priority?

Aaron Leventhal-3
In reply to this post by James Teh-2
Hi Bryan, it's on pretty high priority, because we like to try and help
developers. That said, we're trying to make text attributes and spell
checking accessible, and have had a couple of crashers to fix as well.
Be patient, it's actually being looked at.

- Aaron

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high priority?

Bryan Garaventa-2
Thanks, that's no problem, I understand fully.
Best wishes,
Bryan


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand


----- Original Message -----
From: "Aaron Leventhal" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Wednesday, July 16, 2008 11:55 AM
Subject: Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high
priority?


> Hi Bryan, it's on pretty high priority, because we like to try and help
> developers. That said, we're trying to make text attributes and spell
> checking accessible, and have had a couple of crashers to fix as well.
> Be patient, it's actually being looked at.
>
> - Aaron
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high priority?

James Teh-2
In reply to this post by James Teh-2
        Bryan Garaventa wrote:
> 3) All that would be needed by the Firefox dev team would be to ensure
> that the ISimpleDOMNode.idl interface can be successfully converted to a
> COM accessible TLB type class. There would be no need to implement COM
> or IDispatch support within Firefox to ensure AT accessibility.
JAWS still can't use an object unless it supports IDispatch. As I
understand it (corrections always welcome), even if you can return the
object from another object which *does* support IDispatch (i.e. your own
COM server), the object you want to work with (the ISimpleDOM node)
would not support IDispatch, so JAWS still won't be able to use it. JAWS
uses IDispatch even for IAccessible, which is why you can't get a useful
object from JAWS's GetObject() in Firefox.

Jamie

--
James Teh
Email: [hidden email]
WWW: http://www.jantrid.net/
MSN Messenger: [hidden email]
Jabber: [hidden email]
Yahoo: jcs_teh
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Managed to build .tlb for SimpleDOMNode.idl

Aaron Leventhal-3
I did some investigation, and, midl is actually crashing. That's the
80070057 error it's reporting.

However, when I get rid of all the id(foo) commands in the .idl file,
midl happily compiles the *.tlb.

Those are in there for eventual IDispatch support. Does anyone know if
we need them?

In any case, this should help you compile a .tlb for now.

- Aaron
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Managed to build .tlb for SimpleDOMNode.idl

Aaron Leventhal-3
Aha, it's because I used negative ID's which are reserved. When I make
them non-negative it just works.

MSDN says:
"Use the [id] attribute when you want to assign a standard DISPID (like
DISPID_VALUE, DISPID_NEWENUM etc.) to a method or property, or when you
implement your own IDispatch::Invoke instead of delegating to
DispInvoke/ITypeInfo::Invoke."
I'm not sure what this means yet.

And it says:
"If you do not use the [id] attribute on an interface, the MIDL compiler
will assign a DISPID for you. However, when you specify a dispinterface
by using properties and methods, you must specify a DISPID for every
property and method."
So do we need to assign them ourselves or not?

And finally:
"The id-num is a 32-bit positive integral value. Negative IDs are
reserved for use by Automation."



Aaron Leventhal wrote:

> I did some investigation, and, midl is actually crashing. That's the
> 80070057 error it's reporting.
>
> However, when I get rid of all the id(foo) commands in the .idl file,
> midl happily compiles the *.tlb.
>
> Those are in there for eventual IDispatch support. Does anyone know if
> we need them?
>
> In any case, this should help you compile a .tlb for now.
>
> - Aaron

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high priority?

Bryan Garaventa-2
In reply to this post by James Teh-2
This is true if you return an object that is not recognized or supported by
JAWS, however the benefit of using an ActiveX control to do the processing
is that you can convert the type into a similar type such as a standard W3C
DOM object. Since the ISimpleDOMNode object should be identical at this
point to the standard W3C DOM, the conversion should only be of the type and
not effect the content.

I'll be happy to prove it one way or the other though. So more news to
come...



--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand

----- Original Message -----
From: "James Teh" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Thursday, July 17, 2008 5:07 AM
Subject: Re: Could the ISimpleDOMNode.idl TLB bug be elevated to high
priority?


> Bryan Garaventa wrote:
>> 3) All that would be needed by the Firefox dev team would be to ensure
>> that the ISimpleDOMNode.idl interface can be successfully converted to a
>> COM accessible TLB type class. There would be no need to implement COM
>> or IDispatch support within Firefox to ensure AT accessibility.
> JAWS still can't use an object unless it supports IDispatch. As I
> understand it (corrections always welcome), even if you can return the
> object from another object which *does* support IDispatch (i.e. your own
> COM server), the object you want to work with (the ISimpleDOM node)
> would not support IDispatch, so JAWS still won't be able to use it. JAWS
> uses IDispatch even for IAccessible, which is why you can't get a useful
> object from JAWS's GetObject() in Firefox.
>
> Jamie
>
> --
> James Teh
> Email: [hidden email]
> WWW: http://www.jantrid.net/
> MSN Messenger: [hidden email]
> Jabber: [hidden email]
> Yahoo: jcs_teh
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Managed to build .tlb for SimpleDOMNode.idl

Bryan Garaventa-2
In reply to this post by Aaron Leventhal-3
Awesome! I'll play around with this tonight and see if I can import the tlb
into the project.

I'm not sure about the rest though, I haven't had much experience withMIDL
or it's requirements before.

About the ID attribute, it says "by using properties and methods", which
implies that if the interface is not being created by these properties and
methods, the ID attribute is not required for any? I'm not sure what is
meant by this either.

Anyone else know about MIDL that could lend some insight?


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand

----- Original Message -----
From: "Aaron Leventhal" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Thursday, July 17, 2008 6:28 AM
Subject: Re: Managed to build .tlb for SimpleDOMNode.idl


> Aha, it's because I used negative ID's which are reserved. When I make
> them non-negative it just works.
>
> MSDN says:
> "Use the [id] attribute when you want to assign a standard DISPID (like
> DISPID_VALUE, DISPID_NEWENUM etc.) to a method or property, or when you
> implement your own IDispatch::Invoke instead of delegating to
> DispInvoke/ITypeInfo::Invoke."
> I'm not sure what this means yet.
>
> And it says:
> "If you do not use the [id] attribute on an interface, the MIDL compiler
> will assign a DISPID for you. However, when you specify a dispinterface
> by using properties and methods, you must specify a DISPID for every
> property and method."
> So do we need to assign them ourselves or not?
>
> And finally:
> "The id-num is a 32-bit positive integral value. Negative IDs are
> reserved for use by Automation."
>
>
>
> Aaron Leventhal wrote:
>> I did some investigation, and, midl is actually crashing. That's the
>> 80070057 error it's reporting.
>>
>> However, when I get rid of all the id(foo) commands in the .idl file,
>> midl happily compiles the *.tlb.
>>
>> Those are in there for eventual IDispatch support. Does anyone know if
>> we need them?
>>
>> In any case, this should help you compile a .tlb for now.
>>
>> - Aaron
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Managed to build .tlb for SimpleDOMNode.idl

Bryan Garaventa-2
In reply to this post by Aaron Leventhal-3
Which dev environment are you using to compile when using MIDL.exe?

I'm using Visual Studio 2005, and the MIDL.exe requires a couple of imports,
such as objidl.idl, and another within the ISimpleDOMNode.idl. I was able to
locate an objidl.idl file within the folder at
Program Files\Microsoft Visual Studio 8\VC\Platform SDK\include
So I copied this to the MIDL location at
Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
However, I get a bunch of syntax errors referring to missing interface and
property declarations when I attempt to compile the ISimpleDOMNode.idl.

Does the import references within the ISimpleDOMNode.idl need to be from a
particular dev environment? I'm not too familiar with MIDL, but when
searching about MIDL on the web, many of the answers lead to pages that no
longer exist or to SDKs that no longer apply. It's weird. I'm likely missing
something fairly obvious, but I'm a bit stumped.

Do you think you could send me your compiled TLB file as an attachment if
you still have it around? I'd be perfectly happy not to have to trace the
bugs in MSVS if I can help it. It would be a relief...

Thanks,

Bryan


--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand

----- Original Message -----
From: "Aaron Leventhal" <[hidden email]>
Newsgroups: mozilla.dev.accessibility
To: <[hidden email]>
Sent: Thursday, July 17, 2008 6:28 AM
Subject: Re: Managed to build .tlb for SimpleDOMNode.idl


> Aha, it's because I used negative ID's which are reserved. When I make
> them non-negative it just works.
>
> MSDN says:
> "Use the [id] attribute when you want to assign a standard DISPID (like
> DISPID_VALUE, DISPID_NEWENUM etc.) to a method or property, or when you
> implement your own IDispatch::Invoke instead of delegating to
> DispInvoke/ITypeInfo::Invoke."
> I'm not sure what this means yet.
>
> And it says:
> "If you do not use the [id] attribute on an interface, the MIDL compiler
> will assign a DISPID for you. However, when you specify a dispinterface
> by using properties and methods, you must specify a DISPID for every
> property and method."
> So do we need to assign them ourselves or not?
>
> And finally:
> "The id-num is a 32-bit positive integral value. Negative IDs are
> reserved for use by Automation."
>
>
>
> Aaron Leventhal wrote:
>> I did some investigation, and, midl is actually crashing. That's the
>> 80070057 error it's reporting.
>>
>> However, when I get rid of all the id(foo) commands in the .idl file,
>> midl happily compiles the *.tlb.
>>
>> Those are in there for eventual IDispatch support. Does anyone know if
>> we need them?
>>
>> In any case, this should help you compile a .tlb for now.
>>
>> - Aaron
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Managed to build .tlb for SimpleDOMNode.idl

Bryan Garaventa-2
Hmm, looks like I was using version 6 of midl.exe. I'll install the Vista
SDK tonight, and see if this makes a difference in the morning.

--------------------------------------------------------------------------------
Bryan Garaventa
Senior Accessibility Engineer
SSB + BART Group
[hidden email]
www.SSBBartGroup.com
Accessibility-On-Demand

----- Original Message -----
From: "Bryan Garaventa" <[hidden email]>
To: "dev-accessibility Firefox" <[hidden email]>
Sent: Thursday, July 17, 2008 2:54 PM
Subject: Re: Managed to build .tlb for SimpleDOMNode.idl


> Which dev environment are you using to compile when using MIDL.exe?
>
> I'm using Visual Studio 2005, and the MIDL.exe requires a couple of
> imports,
> such as objidl.idl, and another within the ISimpleDOMNode.idl. I was able
> to
> locate an objidl.idl file within the folder at
> Program Files\Microsoft Visual Studio 8\VC\Platform SDK\include
> So I copied this to the MIDL location at
> Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
> However, I get a bunch of syntax errors referring to missing interface and
> property declarations when I attempt to compile the ISimpleDOMNode.idl.
>
> Does the import references within the ISimpleDOMNode.idl need to be from a
> particular dev environment? I'm not too familiar with MIDL, but when
> searching about MIDL on the web, many of the answers lead to pages that no
> longer exist or to SDKs that no longer apply. It's weird. I'm likely
> missing
> something fairly obvious, but I'm a bit stumped.
>
> Do you think you could send me your compiled TLB file as an attachment if
> you still have it around? I'd be perfectly happy not to have to trace the
> bugs in MSVS if I can help it. It would be a relief...
>
> Thanks,
>
> Bryan
>
>
> --------------------------------------------------------------------------------
> Bryan Garaventa
> Senior Accessibility Engineer
> SSB + BART Group
> [hidden email]
> www.SSBBartGroup.com
> Accessibility-On-Demand
>
> ----- Original Message -----
> From: "Aaron Leventhal" <[hidden email]>
> Newsgroups: mozilla.dev.accessibility
> To: <[hidden email]>
> Sent: Thursday, July 17, 2008 6:28 AM
> Subject: Re: Managed to build .tlb for SimpleDOMNode.idl
>
>
>> Aha, it's because I used negative ID's which are reserved. When I make
>> them non-negative it just works.
>>
>> MSDN says:
>> "Use the [id] attribute when you want to assign a standard DISPID (like
>> DISPID_VALUE, DISPID_NEWENUM etc.) to a method or property, or when you
>> implement your own IDispatch::Invoke instead of delegating to
>> DispInvoke/ITypeInfo::Invoke."
>> I'm not sure what this means yet.
>>
>> And it says:
>> "If you do not use the [id] attribute on an interface, the MIDL compiler
>> will assign a DISPID for you. However, when you specify a dispinterface
>> by using properties and methods, you must specify a DISPID for every
>> property and method."
>> So do we need to assign them ourselves or not?
>>
>> And finally:
>> "The id-num is a 32-bit positive integral value. Negative IDs are
>> reserved for use by Automation."
>>
>>
>>
>> Aaron Leventhal wrote:
>>> I did some investigation, and, midl is actually crashing. That's the
>>> 80070057 error it's reporting.
>>>
>>> However, when I get rid of all the id(foo) commands in the .idl file,
>>> midl happily compiles the *.tlb.
>>>
>>> Those are in there for eventual IDispatch support. Does anyone know if
>>> we need them?
>>>
>>> In any case, this should help you compile a .tlb for now.
>>>
>>> - Aaron
>>
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility 

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility