Re: Stumped: Now stuck with RegAsm...

  • From: "Bryan Garaventa" <bryan@xxxxxxxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 26 Sep 2007 17:06:21 -0700

OK, I managed to find the RegAsm.exe v2 which will add my dll successfully to the registry.


My dll is within it's own folder on the hd, including the correct RegAsm executable.
When I run RegAsm using the following syntax from the command line...
C:\UltraModuleMaker\RegAsm.exe DementedGofer.dll /tlb:DementedGofer.tlb
All works fine, the DementedGofer.tlb is created, and the registry entries are added successfully.

Now, when I go to a new VB.net project, click Add Reference from the Project menu, and click the Com tab, the dll is listed there as I assume it should be... The name and version number are within the list.

So, now, when I click my DementedGofer, I get the following error

Microsoft Visual Studio
A reference to 'DementedGofer' could not be added. graphic 15 The ActiveX type library 'c:\ultramodulemaker\DementedGofer.tlb' was exported from a .NET
assembly and cannot be added as a reference.
Add a reference to the .NET assembly instead.
OK

I feel like throwing my DementedGofer out the window.



----- Original Message ----- From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, September 26, 2007 11:00 AM
Subject: Re: Stumped: JAWS GetObject function for current browser window?


I'm not sure whether regasm.exe is part of the .NET Framework, itself,
or part of the SDK.  If you have not installed the .NET 2.0 SDK, perhaps
try searching for that file.  In thinking about this further though, it
is also possible that Visual Studio installs the file.    The license
may allow you to distribute the file with a .NET application -- not
sure, but it would make sense.

Another alternative would be to create a command-line utility that takes
two quoted parameters corresponding to the URL and file.  A script or
application can run the file synchronously (waiting for it to return).

Jamal
On
Wed, 26 Sep 2007, Bryan Garaventa wrote:

Date: Wed, 26 Sep 2007 08:42:16 -0700
From: Bryan Garaventa <bryan@xxxxxxxxxxxxxxxxxxx>
Reply-To: programmingblind@xxxxxxxxxxxxx
To: programmingblind@xxxxxxxxxxxxx
Subject: Re: Stumped: JAWS GetObject function for current browser window?

Thanks, I wasn't aware of that.

Is regasm.exe part of Windows, as regsvr32.exe is?

I would need to ensure that the dll can be easily installed on client
machines, with relatively little instruction. None would be best, since the
dll would be a hidden part of the application.

Thanks,

Bryan
----- Original Message -----
From: "Jamal Mazrui" <empower@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Wednesday, September 26, 2007 7:11 AM
Subject: Re: Stumped: JAWS GetObject function for current browser window?


>a .NET DLL can be converted to a COM library using the tlbexp.exe >utility
> of the .NET 2.0 SDK, and that library can be registered on a computer
> using the regasm.exe utility.
>
> Jamal
> On Tue, 25 Sep 2007, Bryan Garaventa wrote:
>
>> Date: Tue, 25 Sep 2007 14:05:41 -0700
>> From: Bryan Garaventa <bryan@xxxxxxxxxxxxxxxxxxx>
>> Reply-To: programmingblind@xxxxxxxxxxxxx
>> To: programmingblind@xxxxxxxxxxxxx
>> Subject: Re: Stumped: JAWS GetObject function for current browser >> window?
>>
>> Thanks for taking a look. I had a similar idea, so figured I'd try to
>> stick
>> with what I knew. Here is what I've done.
>>
>> I created a VB.net Class Lib project, and added a function for >> returning
>> an
>> object of shdocvw.WebBrowser.
>> It takes two parameters, one is the url of the document object to >> find,
>> and
>> the other is the WebBrowser object placeholder.
>> The function loops through all instances of shellWindows, finding each
>> instance of shdocvw.InternetExplorer.
>> Then it compares the vals of IEInstance.LocationURL to Url within the
>> first
>> parameter, and if a match is found, assigns the IEInstance to the >> second
>> object parameter of shdocvw.WebBrowser.
>> Lastly, it returns the value. Here is the class code if you would like >> to
>> see the exact method.
>>
>> Public Class BangBangDuck
>>
>> Dim Sws As New SHDocVw.ShellWindows
>>
>> Dim IE As SHDocVw.InternetExplorer
>>
>> Public Function ParseIEInstances(ByVal Url As String, ByVal >> BrowserObject
>> As
>> SHDocVw.WebBrowser) As SHDocVw.WebBrowser
>>
>> For Each IE In Sws
>>
>> If IE.LocationURL Is Url Then
>>
>> BrowserObject = IE
>>
>> End If
>>
>> Next
>>
>> Return BrowserObject
>>
>> End Function
>>
>> End Class
>>
>>
>> My idea was to include this as an ActiveX com component, which I could
>> then
>> instantiate and use within JAWS by passing the desired parameters.
>>
>> Ah but I didn't anticipate the brilliance of Microsoft! Who, in their
>> infinite wisdom, now makes it impossible to create an ActiveX dll >> using
>> their new and improved VB.net...
>>
>> This is so insanely frustrating. I'm 99% sure that this method will >> work >> (unless I'm totally off), as long as I can register the dll as an >> ActiveX
>> com component.
>>
>> Arg, guess I'll just have to find a copy of VB6 somewhere, create an
>> ActiveX
>> project, import my new shiny vb.net dll, and hopefully, God willing,
>> nothing
>> else will go wrong.
>>
>> (I'll probably feel better after lunch...)
>>
>> Thanks again for the input, it really does help.
>>
>> Best wishes,
>>
>> Bryan
>>
>> ----- Original Message -----
>> From: "Jamal Mazrui" <empower@xxxxxxxxx>
>> To: <programmingblind@xxxxxxxxxxxxx>
>> Sent: Tuesday, September 25, 2007 1:22 PM
>> Subject: Re: Stumped: JAWS GetObject function for current browser >> window?
>>
>>
>> > Thanks for that info about the IE object model. I tried the >> > Snapshot
>> > object, converting the sample.vbs example to JAWS script.  For some
>> > reason, the script does not create the image file on disk, even >> > though
>> > the object is instantiated.
>> >
>> > I think the following technique would work. Have the JAWS script >> > run a
>> > .vbs file with cscript.exe, passing it parameters for the URL to
>> > capture
>> > and the file to create, and waiting for it to complete. The URL of >> > the
>> > current page in IE can be obtained from a property of the document
>> > object.
>> >
>> > The Homer script library
>> > http://www.EmpowermentZone.com/kitsetup.exe
>> > includes convenience functions that could help with some of these
>> > steps,
>> > though they can also be coded from scratch.  Let me know if you have
>> > further questions.
>> >
>> > Jamal
>> > On Mon, 24 Sep 2007, Bryan Garaventa wrote:
>> >
>> >> Date: Mon, 24 Sep 2007 10:03:16 -0700
>> >> From: Bryan Garaventa <bryan@xxxxxxxxxxxxxxxxxxx>
>> >> Reply-To: programmingblind@xxxxxxxxxxxxx
>> >> To: programmingblind@xxxxxxxxxxxxx
>> >> Subject: Re: Stumped: JAWS GetObject function for current browser
>> >> window?
>> >>
>> >> I thought so at first as well, but it doesn't appear to work.
>> >>
>> >> What I need to do is create a JAWS script that can take screenshots >> >> of
>> >> a
>> >> webpage at runtime. Unfortunately the standard Print screen method
>> >> doesn't
>> >> work, because it only captures the visible area of the screen, and >> >> the >> >> entire web page has to be captured without reloading the page from >> >> the
>> >> current IE instance.
>> >>
>> >> I found an ActiveX component that claims to do this, called HTML
>> >> Snapshot
>> >> ( http://www.guangmingsoft.net/htmlsnapshot/help.htm ), which can
>> >> apparently
>> >> take the entire image of a web page at one time. Adding to the >> >> appeal
>> >> of
>> >> this method, is that the ActiveX is redistributable, which is
>> >> necessary
>> >> for
>> >> this project.
>> >>
>> >> Specifically, the ActiveX method I would need to use within the >> >> script
>> >> appears to be SnapWebBrowser(). However, this method requires a
>> >> browser
>> >> object of type IDispatch. I've tried passing the JAWS
>> >> IEGetCurrentDocument
>> >> return for this argument, but with no luck. It looks like the >> >> method >> >> requires the use of an IE instance that reveals it's ActiveX >> >> directly.
>> >>
>> >> I've been doing a lot of research in this area, and made some
>> >> discoveries
>> >> that may help solve the issue if possible.
>> >>
>> >> First has to do with the MSDN's reference regarding Internet >> >> Explorer
>> >> Architecture (
>> >> http://msdn2.microsoft.com/en-us/library/aa741312.aspx ),
>> >> which says...
>> >>
>> >> Internet Explorer Architecture
>> >>
>> >> A description of each of these six components follows:
>> >>
>> >> list of 6 items
>> >> . IExplore.exe is at the top level, and is the Internet Explorer
>> >> executable.
>> >> It is a small application that relies on the other main components >> >> of
>> >> Internet Explorer to do the work of rendering, navigation, protocol
>> >> implementation, and so on.
>> >> . Browsui.dll provides the user interface to Internet Explorer. >> >> Often >> >> referred to as the "chrome," this DLL includes the Internet >> >> Explorer
>> >> address
>> >> bar, status bar, menus, and so on.
>> >> . Shdocvw.dll provides functionality such as navigation and >> >> history,
>> >> and
>> >> is
>> >> commonly referred to as the WebBrowser control . This DLL exposes
>> >> ActiveX
>> >> Control interfaces, enabling you to easily host the DLL in a >> >> Microsoft >> >> Windows application using frameworks such as Microsoft Visual >> >> Basic, >> >> Microsoft Foundation Classes (MFC), Active Template Library (ATL), >> >> or
>> >> Microsoft .NET Windows Forms. When your application hosts the
>> >> WebBrowser
>> >> control, it obtains all the functionality of Internet Explorer >> >> except
>> >> for
>> >> the user interface provided by Browseui.dll. This means that you >> >> will
>> >> need
>> >> to provide your own implementations of toolbars and menus.
>> >> . Mshtml.dll is at the heart of Internet Explorer and takes care of
>> >> its
>> >> HTML
>> >> and Cascading Style Sheets (CSS) parsing and rendering >> >> functionality.
>> >> Mshtml.dll is sometimes referred to by its code name, "Trident".
>> >> Mshtml.dll
>> >> exposes interfaces that enable you to host it as an active document >> >> .
>> >> Other
>> >> applications such as Microsoft Word, Microsoft Excel, Microsoft >> >> Visio,
>> >> and
>> >> many non-Microsoft applications also expose active document >> >> interfaces
>> >> so
>> >> they can be hosted by shdocvw.dll. For example, when a user browses
>> >> from
>> >> an
>> >> HTML page to a Word document, mshtml.dll is swapped out for the DLL
>> >> provided
>> >> by Word, which then renders that document type. Mshtml.dll may be
>> >> called
>> >> upon to host other components depending on the HTML document's
>> >> content,
>> >> such
>> >> as scripting engines (for example, Microsoft JScript or Visual >> >> Basic >> >> Scripting Edition (VBScript)), ActiveX controls, XML data, and so >> >> on. >> >> . Urlmon.dll offers functionality for MIME handling and code >> >> download. >> >> . WinInet.dll is the Windows Internet Protocol handler. It >> >> implements
>> >> the
>> >> HTTP and File Transfer Protocol (FTP) protocols along with cache
>> >> management.
>> >> list end
>> >>
>> >> There's quite a bit more in depth info, but this shows the >> >> essentials.
>> >>
>> >> At first, I thought, by returning the top level object,
>> >> "IExplore.exe",
>> >> this
>> >> would solve the problem, but not so from a JAWS script.
>> >>
>> >> What I actually need to return is the current WebBrowser object, >> >> which
>> >> would
>> >> require the use of Shdocvw. I believe this would do the trick.
>> >>
>> >> The directions for accomplishing this, has been a bit harder to >> >> track
>> >> down.
>> >> Finally though, I think I've found something that might help with >> >> this
>> >> as
>> >> well, though I haven't been able to apply it directly using a JAWS
>> >> script.
>> >>
>> >> It is a forum entry named "FOUND! how to attach to running >> >> instances
>> >> of
>> >> Internet Explorer" from dBforums. (
>> >> http://www.dbforums.com/showthread.php?threadid=867088 )
>> >>
>> >> Specifically it refers to Python, but I think it may be possible to
>> >> convert
>> >> the principles to a JAWS script... I hope anyway.
>> >>
>> >> Please let me know if you have any insights, I'd welcome them.
>> >>
>> >> Best wishes,
>> >>
>> >> Bryan
>> >>
>> >> ----- Original Message -----
>> >> From: "Jamal Mazrui" <empower@xxxxxxxxx>
>> >> To: <programmingblind@xxxxxxxxxxxxx>
>> >> Sent: Monday, September 24, 2007 9:05 AM
>> >> Subject: Re: Stumped: JAWS GetObject function for current browser
>> >> window?
>> >>
>> >>
>> >> >I must be missing something here.  Doesn't IEGetCurrentDocument
>> >> >return a
>> >> > COM object for the current web page in IE? How does this not >> >> > meet
>> >> > the
>> >> > need?
>> >> >
>> >> >
>> >> > Jamal
>> >> >
>> >> > __________
>> >> > View the list's information and change your settings at
>> >> > //www.freelists.org/list/programmingblind
>> >> >
>> >> >
>> >>
>> >> __________
>> >> View the list's information and change your settings at
>> >> //www.freelists.org/list/programmingblind
>> >>
>> > __________
>> > View the list's information and change your settings at
>> > //www.freelists.org/list/programmingblind
>> >
>> >
>>
>> __________
>> View the list's information and change your settings at
>> //www.freelists.org/list/programmingblind
>>
> __________
> View the list's information and change your settings at
> //www.freelists.org/list/programmingblind
>
>

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

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



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

Other related posts: