Accessing COM Objects on .NET

using EAS Server 4.2.2 for our web applications.

I would like to access a COM object lying on a different webserver running
..Net on IIS.

I have tried this before. I would appreciate if anyone could briefly outline
the steps
required to access the same

Thanks



0
Suresh
9/23/2003 4:54:19 PM
sybase.easerver.general 7903 articles. 0 followers. Follow

8 Replies
766 Views

Similar Articles

[PageSpeed] 13

You need to use the tlbexp utility to generate a COM typelib from the .NET
assembly you're trying to access. You then use the TLB to register a COM
proxy you can invoke from EAS.

-- 
<hopethishelps/>
Roy Kiesler [TeamSybase]
SDN CodeXchange -- http://codexchange.sybase.com


"Suresh" <ssubramaniam@psc.gov> wrote in message
news:3f707b4d@forums-2-dub...
> using EAS Server 4.2.2 for our web applications.
>
> I would like to access a COM object lying on a different webserver running
> .Net on IIS.
>
> I have tried this before. I would appreciate if anyone could briefly
outline
> the steps
> required to access the same
>
> Thanks
>
>
>


0
Roy
9/23/2003 5:21:05 PM
Or use web services.


C

_____________________________________
Carson Hager
Cynergy Systems, Inc.
carson.hager@cynergysystems.com
866-CYNERGY x89
http://www.cynergysystems.com


"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:3f708101$1@forums-1-dub...
> You need to use the tlbexp utility to generate a COM typelib from the .NET
> assembly you're trying to access. You then use the TLB to register a COM
> proxy you can invoke from EAS.
>
> -- 
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> SDN CodeXchange -- http://codexchange.sybase.com
>
>
> "Suresh" <ssubramaniam@psc.gov> wrote in message
> news:3f707b4d@forums-2-dub...
> > using EAS Server 4.2.2 for our web applications.
> >
> > I would like to access a COM object lying on a different webserver
running
> > .Net on IIS.
> >
> > I have tried this before. I would appreciate if anyone could briefly
> outline
> > the steps
> > required to access the same
> >
> > Thanks
> >
> >
> >
>
>


0
T
9/23/2003 10:51:10 PM
Thanks. Under window 2000 I registered the component using windows component
services
Then I did the following:

1. Under the server I created & installed a new package. (pointing the com
dll)
2. Generated & compiled Java stub & skeletons (No errors.) Java & class
files
    were created under easerver\classes directory.
3. Then I tried to generate TLG/REG files.
    o Output directory easerver\html\class\xxx
    o proxy server location:%easerver\client\dll\
    o Checked register & midl files
    Gave the following error on generation
    " java.lang.exception midl -l ...-nocppp.,....
4. I tried to locate midl.exe and couldn't find it on the server machines.
5. Where can I get/download the files

So I am doing the right thing so far. If above errors are taken care, what
else is remaning .

Thanks

"T. Carson Hager [Team Sybase]" <carson.hager@cynergysystems.com> wrote in
message news:3f70cef2$1@forums-2-dub...
> Or use web services.
>
>
> C
>
> _____________________________________
> Carson Hager
> Cynergy Systems, Inc.
> carson.hager@cynergysystems.com
> 866-CYNERGY x89
> http://www.cynergysystems.com
>
>
> "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
> message news:3f708101$1@forums-1-dub...
> > You need to use the tlbexp utility to generate a COM typelib from the
..NET
> > assembly you're trying to access. You then use the TLB to register a COM
> > proxy you can invoke from EAS.
> >
> > --
> > <hopethishelps/>
> > Roy Kiesler [TeamSybase]
> > SDN CodeXchange -- http://codexchange.sybase.com
> >
> >
> > "Suresh" <ssubramaniam@psc.gov> wrote in message
> > news:3f707b4d@forums-2-dub...
> > > using EAS Server 4.2.2 for our web applications.
> > >
> > > I would like to access a COM object lying on a different webserver
> running
> > > .Net on IIS.
> > >
> > > I have tried this before. I would appreciate if anyone could briefly
> > outline
> > > the steps
> > > required to access the same
> > >
> > > Thanks
> > >
> > >
> > >
> >
> >
>
>


0
Suresh
9/24/2003 1:44:46 PM
midl.exe is a Microsoft utility for generating IDL files for COM components.
It ships with Visual Studio.

-- 
<hopethishelps/>
Roy Kiesler [TeamSybase]
SDN CodeXchange -- http://codexchange.sybase.com

"Suresh" <ssubramaniam@psc.gov> wrote in message
news:3f719fce$1@forums-1-dub...
> Thanks. Under window 2000 I registered the component using windows
component
> services
> Then I did the following:
>
> 1. Under the server I created & installed a new package. (pointing the com
> dll)
> 2. Generated & compiled Java stub & skeletons (No errors.) Java & class
> files
>     were created under easerver\classes directory.
> 3. Then I tried to generate TLG/REG files.
>     o Output directory easerver\html\class\xxx
>     o proxy server location:%easerver\client\dll\
>     o Checked register & midl files
>     Gave the following error on generation
>     " java.lang.exception midl -l ...-nocppp.,....
> 4. I tried to locate midl.exe and couldn't find it on the server machines.
> 5. Where can I get/download the files
>
> So I am doing the right thing so far. If above errors are taken care, what
> else is remaning .
>
> Thanks
>
> "T. Carson Hager [Team Sybase]" <carson.hager@cynergysystems.com> wrote in
> message news:3f70cef2$1@forums-2-dub...
> > Or use web services.
> >
> >
> > C
> >
> > _____________________________________
> > Carson Hager
> > Cynergy Systems, Inc.
> > carson.hager@cynergysystems.com
> > 866-CYNERGY x89
> > http://www.cynergysystems.com
> >
> >
> > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote
in
> > message news:3f708101$1@forums-1-dub...
> > > You need to use the tlbexp utility to generate a COM typelib from the
> .NET
> > > assembly you're trying to access. You then use the TLB to register a
COM
> > > proxy you can invoke from EAS.
> > >
> > > --
> > > <hopethishelps/>
> > > Roy Kiesler [TeamSybase]
> > > SDN CodeXchange -- http://codexchange.sybase.com
> > >
> > >
> > > "Suresh" <ssubramaniam@psc.gov> wrote in message
> > > news:3f707b4d@forums-2-dub...
> > > > using EAS Server 4.2.2 for our web applications.
> > > >
> > > > I would like to access a COM object lying on a different webserver
> > running
> > > > .Net on IIS.
> > > >
> > > > I have tried this before. I would appreciate if anyone could briefly
> > > outline
> > > > the steps
> > > > required to access the same
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Roy
9/24/2003 3:39:49 PM
Thanks Roy.
I downloaded and installed Window sdk from Microsoft and I did find the file
midl.exe
o included the location in system path .
Tried to create tlb/REG and it gave the following error.
---------------
java.lang.Exception: midl -l "c:\Program
Files\Sybase\Easerver\include" -nocpp
-mktyplib203 -tlb "c:\program
files\sybase\easerver\html\classes\webfarmtest.tlb"
"c:\program files\sybase\easerver\html\classes\webfarmtest\webfarmtext.idl"
failed:
java.io.IOException: Create Process: midl -l "c:\Program
Files\Sybase\Easerver\include"
 -nocpp ... error=2
-----------------
A webfarmtest.idl was created in the html\classes directory
I have all the files (uuiden.exe,midl.exe jagproxy.dll etc.

Any idea what else is missing.

Thanks

"Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com> wrote in
message news:3f71bb5c@forums-2-dub...
> midl.exe is a Microsoft utility for generating IDL files for COM
components.
> It ships with Visual Studio.
>
> --
> <hopethishelps/>
> Roy Kiesler [TeamSybase]
> SDN CodeXchange -- http://codexchange.sybase.com
>
> "Suresh" <ssubramaniam@psc.gov> wrote in message
> news:3f719fce$1@forums-1-dub...
> > Thanks. Under window 2000 I registered the component using windows
> component
> > services
> > Then I did the following:
> >
> > 1. Under the server I created & installed a new package. (pointing the
com
> > dll)
> > 2. Generated & compiled Java stub & skeletons (No errors.) Java & class
> > files
> >     were created under easerver\classes directory.
> > 3. Then I tried to generate TLG/REG files.
> >     o Output directory easerver\html\class\xxx
> >     o proxy server location:%easerver\client\dll\
> >     o Checked register & midl files
> >     Gave the following error on generation
> >     " java.lang.exception midl -l ...-nocppp.,....
> > 4. I tried to locate midl.exe and couldn't find it on the server
machines.
> > 5. Where can I get/download the files
> >
> > So I am doing the right thing so far. If above errors are taken care,
what
> > else is remaning .
> >
> > Thanks
> >
> > "T. Carson Hager [Team Sybase]" <carson.hager@cynergysystems.com> wrote
in
> > message news:3f70cef2$1@forums-2-dub...
> > > Or use web services.
> > >
> > >
> > > C
> > >
> > > _____________________________________
> > > Carson Hager
> > > Cynergy Systems, Inc.
> > > carson.hager@cynergysystems.com
> > > 866-CYNERGY x89
> > > http://www.cynergysystems.com
> > >
> > >
> > > "Roy Kiesler [TeamSybase]" <SPAM_FREE_roy.kiesler@teamsybase.com>
wrote
> in
> > > message news:3f708101$1@forums-1-dub...
> > > > You need to use the tlbexp utility to generate a COM typelib from
the
> > .NET
> > > > assembly you're trying to access. You then use the TLB to register a
> COM
> > > > proxy you can invoke from EAS.
> > > >
> > > > --
> > > > <hopethishelps/>
> > > > Roy Kiesler [TeamSybase]
> > > > SDN CodeXchange -- http://codexchange.sybase.com
> > > >
> > > >
> > > > "Suresh" <ssubramaniam@psc.gov> wrote in message
> > > > news:3f707b4d@forums-2-dub...
> > > > > using EAS Server 4.2.2 for our web applications.
> > > > >
> > > > > I would like to access a COM object lying on a different webserver
> > > running
> > > > > .Net on IIS.
> > > > >
> > > > > I have tried this before. I would appreciate if anyone could
briefly
> > > > outline
> > > > > the steps
> > > > > required to access the same
> > > > >
> > > > > Thanks
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>


0
Suresh
9/25/2003 12:15:24 PM
> I downloaded and installed Window sdk from Microsoft and I did find the
> file midl.exe
> o included the location in system path .
> Tried to create tlb/REG and it gave the following error.
> ---------------
> java.lang.Exception: midl -l "c:\Program
> Files\Sybase\Easerver\include" -nocpp
> -mktyplib203 -tlb "c:\program
> files\sybase\easerver\html\classes\webfarmtest.tlb"
> "c:\program
> files\sybase\easerver\html\classes\webfarmtest\webfarmtext.idl" failed:
> java.io.IOException: Create Process: midl -l "c:\Program
> Files\Sybase\Easerver\include"
>  -nocpp ... error=2

I believe to error=2 means that midl.exe was not found. 
Try to put it into %JAGUAR%\bin .

Bye.
-- 
* Real Gagnon  from  Quebec, Canada
* Looking For Java Or PowerBuilder Snippets? Visit Real's How-to
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html

0
Real
9/25/2003 1:01:34 PM
THanks. I did as you suggested. Looks like it was able to locate midl.exe.
Now I get the following error:

----------

java.lang.Exception: midl -l "c:\Program
Files\Sybase\Easerver\include" -nocpp
-mktyplib203 -tlb "c:\program
files\sybase\easerver\html\classes\webfarmtest.tlb"
"c:\program files\sybase\easerver\html\classes\webfarmtest\webfarmtext.idl"
failed:
java.io.IOException: status=2398:midl:error MIDL2398: cannot execute MIDL
engine
----------
Thanks


"Real Gagnon" <real@rgagnon.no.spam.com> wrote in message
news:Xns94015B19245E2realrgagnon@192.138.151.106...
> > I downloaded and installed Window sdk from Microsoft and I did find the
> > file midl.exe
> > o included the location in system path .
> > Tried to create tlb/REG and it gave the following error.
> > ---------------
> > java.lang.Exception: midl -l "c:\Program
> > Files\Sybase\Easerver\include" -nocpp
> > -mktyplib203 -tlb "c:\program
> > files\sybase\easerver\html\classes\webfarmtest.tlb"
> > "c:\program
> > files\sybase\easerver\html\classes\webfarmtest\webfarmtext.idl" failed:
> > java.io.IOException: Create Process: midl -l "c:\Program
> > Files\Sybase\Easerver\include"
> >  -nocpp ... error=2
>
> I believe to error=2 means that midl.exe was not found.
> Try to put it into %JAGUAR%\bin .
>
> Bye.
> --
> * Real Gagnon  from  Quebec, Canada
> * Looking For Java Or PowerBuilder Snippets? Visit Real's How-to
> * http://www.rgagnon.com/howto.html
> * http://www.rgagnon.com/bigindex.html
>


0
Suresh
9/25/2003 1:30:47 PM
THanks. Now I am able to generate tlb/reg succesfully. I got the details of
the error from microsoft.

MIDL2398: cannot execute MIDL engine
As of the Windows 2000 release (MIDL version 5.03.279), the MIDL compiler is
implemented using two executable files: Midl.exe (the driver), and Midlc.exe
(the compiler engine). This error indicates the Midl.exe is unable to launch
Midlc.exe. Make sure that Midlc.exe is in the same directory as Midl.exe,
and that they are the same version.
The error may have been caused by copying Midl.exe but not Midlx.exe from
the latest distribution. Run midl and/or midlc at the command line without
any parameters to see the version number of the executable.


Now I need work on the rest.

Thanks

"Real Gagnon" <real@rgagnon.no.spam.com> wrote in message
news:Xns94015B19245E2realrgagnon@192.138.151.106...
> > I downloaded and installed Window sdk from Microsoft and I did find the
> > file midl.exe
> > o included the location in system path .
> > Tried to create tlb/REG and it gave the following error.
> > ---------------
> > java.lang.Exception: midl -l "c:\Program
> > Files\Sybase\Easerver\include" -nocpp
> > -mktyplib203 -tlb "c:\program
> > files\sybase\easerver\html\classes\webfarmtest.tlb"
> > "c:\program
> > files\sybase\easerver\html\classes\webfarmtest\webfarmtext.idl" failed:
> > java.io.IOException: Create Process: midl -l "c:\Program
> > Files\Sybase\Easerver\include"
> >  -nocpp ... error=2
>
> I believe to error=2 means that midl.exe was not found.
> Try to put it into %JAGUAR%\bin .
>
> Bye.
> --
> * Real Gagnon  from  Quebec, Canada
> * Looking For Java Or PowerBuilder Snippets? Visit Real's How-to
> * http://www.rgagnon.com/howto.html
> * http://www.rgagnon.com/bigindex.html
>


0
Suresh
9/25/2003 1:39:25 PM
Reply:

Similar Artilces:

Loading COM Component into Registery/Accessing COM objects in .net
Hi All, Need your help to resolve my problem, I have a dll for a ChangeMangement tool (I guess this was developed using VB), when I try to register this dll, I am getting "Dll loaded, but DllRegistry entry point was not found" I am sure this dll is not corrupted one, bcz same dll I am able to refere in my server (where corresponding Tool is installed). Any one can help how to register this dll ? or how to find the dependent dlls for this? I am trying use the classes in this COM object, but when I refere in .Net and when I run the appl, I am getting CLSI was not loaded. ...

Accessing a COM object from ASP.NET
I have created a COM object to access some data from our proprietory database.  When I run the ASP.NET page in the Visual Studio 2005 debugger or through IIS on the developement machine I have no problems. When I installed the ASP.NET page on our 2000 Server and I try to access the methods of the COM object seems to work with the exception that whenever I make a call that should return a string the string I pass in comes back unmodified.  I have installed a C# Windows Application on the server to test out the object it works fine in that enviorment.  Any Ideas?Thanks,Jaso...

Accessing objects returned by COM object
Hello there, I'm new to ASP.NET (migrating from PHP and Java), and have what is probably an entirely stupid problem: The data layer of the site I am updating is composed of a number of compiled COM objects, the source of which I don't have access to. I have created Interop wrappers for the objects, but I'm not quite sure how to handle the VB objects that they return (I am working in C#). I'm not very familiar with VB, but the VB objects are definitely a list of some kind, so I was vaguely hoping to be able to cast to an ArrayList. Unfortunately, this is raising an IllegalCastExce...

Accessing a COM .NET Assemby (with Sharepoint Client Objects) from Delphi w
Hi, Really nice if someone could help use with this .NET assembly access problem! We have a problem of accessing Sharepoint Client objects from our win32 Delphi application (Document management), developed in Delphi XE. We have built a .NET COM assembly that encapsulates the Sharepoint Client objects and we generate a pascal TLB from this, our .NET assembly. Calls that are not routed to the Sharepoint Client objects work, but immediatelly when trying to get access to Sharepoint Client Objects, through our .NET COM assembly there seems to be a exception loop started within the Sharepoi ...

Accessing a Com object using Get Object
* Wasn't sure which section to put this in, but found similiar topics in here. We have a slight problem trying to access a COM Object. Reading some of the threads in this forum, people have mentioned trying to connect to a COM Object, but everyone has suggested using CreateObj. We cannot do this as the object is already created, we need to Get this object. Obviously you can use the GetObj command in VB6, but we cannot find away of Getting this object either through a webservice. Feel free to move this to the correct forum. Any help will be greatly recieved. Regards C ...

Access COM object from WebService: Access denied
 I'm trying to access Indexing Service (ciodm.dll) from WebService. Everything is fine in simple application, but in service I get "Exception from HRESULT: 0x80041820" .Somehow, I configured my WinXP, and it works on my computer, but I can't repeat this.I allready gave all rights for IIS user, and set all rights for everyone for COM+, but for nothing.Did somebody met such problem?  Have you given the complete message?There should be a class id which you need to locate in the COM+ explorer and set permissions on it.Don't forget to click "Mark as Answer&q...

How to reference a COM object from asp.net with vb.net?
Hi, Does anyone know how to do this without using a code-behind page and without visual studio.net? I am trying to reference an aspemail component so I can send email. They have provided an example with c# but this does not run on my machine. Any help is appreciated.. thanx OpH Did you find a solution to this? I am also trying to use the persists aspemail on an ASP.NET VB page. DH12...

Innovation to ADO.NET
Matisse Software Inc. provides its native ADO.NET Data provider for Matisse 6.0, the Database for .NET. Matisse Software has pushed the envelope of Microsoft ADO.NET architecture and extended it into a powerful Object Access Services component for .NET. Matisse’s extension of ADO.NET demonstrates that ADO.NET can evolve beyond the Microsoft architecture to benefit .NET developers. Unlike the standard ADO.NET data provider, which returns data in a table format to integrate seamlessly with relational products, Matisse has extended the ADO.NET architecture to return data in an object format....

Using COM objects from within an ASP.Net server object
I am trying to instantiate a COM object from within an ASP.Net server object. The code is all in C#, and am having trouble beacause I do not have access to the Server.CreateObject functionality (because I am not on a page). Any ideas? I've tried using the tlbimp.exe utility as well, and although a wrapper DLL is created, I can't seem to import the dll using a: using mynewnamespace; With ASP.NET you can make a reference to any TLB registered on the machine, and use early-binding to create REAL objects instead of generic OLE stuff created using CreateObject .... are you using ...

accessing COM Objects
Hi, please see the code snippet below that demonstrates using a com server from WIndows NT Scripting host. I'd like to implement this functionality in my PB application. This works until I try to set a value for the Address.Locality property. I don't know how to do initialization of this property in PB. Is it possible? Thanks in advance Thorsten ------------------------------- Option Explicit ' Parameter deklarieren const addLCE_LOC = 1 ' Ort: Vollst�ndiger Ort Const addSNE_STR = 1 &#...

COM object access
I have to use an application that has a COM layer to implement workflow. Now I can have access to the first object in the chain but, because this COM layer is complex, it has several descendant objects that I need to access some specific functionality. I need local objects defined the same type as these inner ones. Using VisualBasic this task is very easily implemented because I can define variables the same type as these COM objects and I can access their properties from the development environment. Is there a way to make this work using PB? Thanks, Juan Fernando Saa jsaa...

Accessing COM Object
I have created a simple non visual object that has two public functions uf_GetToday() and uf_GetNow() that return strings. I have deployed this localy and am getting an error on access of uf_GetToday() or uf_GetNow(). The result from connecttonewobject is 0. I get a runtime error when either of the functions is accessed of error calling external object function. I am using powerbuilder 10.2.1 build 9004 on xp with service pack 2. Sample code oleObject oleTest Long lResult String sToday, sNow oleTest = Create oleObject lResult = oleTest.ConnectToNewObject( 'PB100.nv_simpleco...

COM Object + .NET
Hello, Here is my situation.  I have an application that I developed in .NET which uses a COM object from a 3rd Party document management system (Interwoven).  In my development environment the code works fine.  However when I push the code to the test server (package msi or manual move over) when I try to login to the application I get an error stating "Cannot request exclusive semaphores at interrupt time. ".  One thing I have noticed is that when I recompile the application in dev an Interop dll for the COM object is created.  If I remove the Interop dll then I g...

post (send ) a widget (flash object) to friendster.com and wordpress.com from a asp.net site
  Hi,  I want to post(send)  a flash object or we can say (Widget or Gadget) to friendster.com profile page and to wordpress.com blog on the button click of   my asp.net site .please help me..My Flash object (widget) which is to be sent to friendster and wordpress is below-<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"width="300"  height= "300"  id...

Web resources about - Accessing COM Objects on .NET - sybase.easerver.general

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Accessing the Future Fund a sensible proposal, says super expert Daryl Dixon
As portfolios go, the Future Fund's asset allocation is concentrated in higher-risk investment, including equities and alternative assets.

Accessing my Super
I'm 57 - can I access my super?

Australia, US accessing Indonesian telephone data, leaked documents show
Newly disclosed documents from former US intelligence contractor Edward Snowden have revealed that Australian intelligence efforts against Indonesia ...

Euthanasia advocate Philip Nitschke detained at Melbourne Airport, accuses Customs officials of accessing ...
Euthanasia advocate Philip Nitschke has accused Customs officials of accessing hundreds of patients' sensitive records on his laptop after detaining ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 12/2/2015 1:27:50 AM