Exposing DotNet assemblies to COM

  • From: "Macarty, Jay {PBSG}" <Jay.Macarty@xxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Fri, 1 Feb 2008 10:12:08 -0600

All,
The good news is that I have a DotNet assembly to access the SSIP voice
server now; so, you can include it and use the methods like SayImportant
or SayText (there is a Say method for each of the 5 SSIP voice priority
levels). Also, you can use the properties like API or Voice to control
the output. A typical use of the SSIPClient at the beginning of a
program might look something like this:

using SSIPClient; 
....
  public SSIPDemo() 
  {
    SSIPClient voice = SSIPClient.GetInstance(); // default to localhost
port 3891 
    voice.API = "AUTO"; // look for active screen reader or SAPI 
    voice.SayImportant("Demo program now running"); 
  }

Since the "AUTO" setting is actually the default for the API property,
that line wasn't truly necessary. It just showed how to set the value.
Other values for this property include JAWS, WINEYES, SA, and SAPI if
you know which interface you wish to use.

My problem is this. I am trying to expose the methods and properties of
the SSIPClient to COM so the client can be used by any language
supporting COM objects. This is supposed to be a relatively simple task
I have included the [ComVisible(true)] directive and the other COM
directives suggested in the book I have. It compiles and I can run the
regasm utility and it says that the library was registered successfully.
However, I get an error in my script when I try to create the COM
object. 

Does anyone have some pointers on exposing DotNet classes to COM or
where I can find some good documentation on this topic?
      


------------------------------------------------------------
Jay Macarty - Masterfiles Technical Lead - PBSG 
Phone: 972-963-1387 
 Cell: 214-549-3421 
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: