473,657 Members | 2,627 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling remote VB6 Com components in c#

Hi,

I have, in vain, tried to create a com object from a remote server.
Setup;

This is the code that fails.

Projekt.ClassNa me
_BOMsg = (SBO_BO_1_1.BO_ MessageClass)Ac tivator.CreateC omInstanceFrom
("E:\\SharpDeve lop
Projects\\Woff\ \bin\\Debug\\In terop.Projekt.d ll","Projekt.Cl assName").Unwra p();

It compiles but then fails misserably when I try to run it, and this
is the error:

Woff.RsMarshall Test.CreateSBOM sg failed:

System.MissingM ethodException : Constructor on type Projekt.ClassNa me
not found.
at System.RuntimeT ype.CreateInsta nceImpl(Binding Flags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttri butes)
at System.Activato r.CreateInstanc e(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args, CultureInfo culture,
Object[] activationAttri butes)
at System.Activato r.CreateComInst anceFrom(String assemblyName,
String typeName, Byte[] hashValue, AssemblyHashAlg orithm
hashAlgorithm)
at System.Activato r.CreateComInst anceFrom(String assemblyName,
String typeName)
at Handelsbanken.S PP.Woff.RsMarsh all.TestSBOMsg( ) in
e:\SharpDevelop Projects\Woff\R sMarshall.cs:li ne 43
at Woff.RsMarshall Test.CreateSBOM sg() in e:\SharpDevelop
Projects\Woff\R sMarshallTest.c s:line 29
I have no constructor since it is a vb6 som component so what else?

Any help is appreciated.

Thanxs Greger
Nov 16 '05 #1
1 2643
Curt,

It looks like you are trying to call CreateComInstan ceFrom on the
interop wrapper that is already created. You don't need to do this. If you
have an interop wrapper already created, you can just load that assembly,
and dynamically create the class from that (through a call to
CreateInstance) .

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Curt" <go****@elgrego .org> wrote in message
news:a1******** *************** ***@posting.goo gle.com...
Hi,

I have, in vain, tried to create a com object from a remote server.
Setup;

This is the code that fails.

Projekt.ClassNa me
_BOMsg = (SBO_BO_1_1.BO_ MessageClass)Ac tivator.CreateC omInstanceFrom
("E:\\SharpDeve lop
Projects\\Woff\ \bin\\Debug\\In terop.Projekt.d ll","Projekt.Cl assName").Unwra p();

It compiles but then fails misserably when I try to run it, and this
is the error:

Woff.RsMarshall Test.CreateSBOM sg failed:

System.MissingM ethodException : Constructor on type Projekt.ClassNa me
not found.
at System.RuntimeT ype.CreateInsta nceImpl(Binding Flags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttri butes)
at System.Activato r.CreateInstanc e(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args, CultureInfo culture,
Object[] activationAttri butes)
at System.Activato r.CreateComInst anceFrom(String assemblyName,
String typeName, Byte[] hashValue, AssemblyHashAlg orithm
hashAlgorithm)
at System.Activato r.CreateComInst anceFrom(String assemblyName,
String typeName)
at Handelsbanken.S PP.Woff.RsMarsh all.TestSBOMsg( ) in
e:\SharpDevelop Projects\Woff\R sMarshall.cs:li ne 43
at Woff.RsMarshall Test.CreateSBOM sg() in e:\SharpDevelop
Projects\Woff\R sMarshallTest.c s:line 29
I have no constructor since it is a vb6 som component so what else?

Any help is appreciated.

Thanxs Greger

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
285
by: Céline | last post by:
HI everybody, I am trying to get somewhere with VisualStudio.net. The problem is that my web server is not on my PC (for company security reason) on is remote. Everytime I try to create a project I have some errors. Is there some options that I need to change?
3
3509
by: Stan | last post by:
My webserver calls a component on another server through DCOM, the component goes to SQL, SQL raises the exception and here is what the client gets: "Cannot find member name System.Data.SqlClient.SqlError" I believe the issue is related to the fact that webserver runs the framework 1.1 and the component server has the framework 1.0 There are a number of posting in the different ng on this topic, but I cannot find a resolution.
3
3170
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor objects. The UserControl client creates and passes these sponsor objects to the remote objects. I am able to launch .Net UserControls and their dependent .Net components in HTML pages using the Object tag. I had to do the following to get it to...
15
11760
by: Bryan | last post by:
I have a multi-threaded C# console application that uses WMI (System.Management namespace) to make RPC calls to several servers (600+ ) and returns ScheduledJobs. The section of my code that performs the query is contained in a delegate function that I execute via a second thread. On 1 or 2 of the 600+ servers the query hangs. I've tried to use Thread.Join() coupled with a Thread.Abort() but this does not kill the thread. Based on...
7
2953
by: Ollie | last post by:
okay sorry for cross posting but want to see if any one can explain the solution to this problem for me: I have a .Net ASP.Net app written in C# that use COM+ components to do some business processing...... When I have the ASP.Net website and the COM+ components installed on the same machine (i.e everything local) it all works fine, and it can write to the event log....
4
5739
by: Jasleen | last post by:
I have written one Widows Service in ATL, having a ATL component running. Now it is very easy to create the VC client by calling CoCreateINstanceEx to create the component running in the service and giving the appropriate machine where the service runs.. How shud I got about doing the same thing if the client is written in C#.. I tried using Remoting and ServiceController, but all in vein... Firstly I wud like to know if it is possible to...
1
2572
by: Zanna | last post by:
Hi all! I hope someone can help me. I have in my lan a PC with IIS installed and this works as web server. On another PC I have VS.net 2003 installed. I'd like to debug asp/aspx pages on the remote PC (with IIS). Is it possible?
2
2325
by: Julia | last post by:
Hi, Can a Remote object be a WebService as well? i want to able to connect to a remote object either using .NET remoting and HTTP\SOAP so I wonder if I can create a singleton(statefull) object hosted in IIS which can be xml web service ,NET remoted object,singleton and support COM+ transaction management all in the same time
0
852
by: Jonathan Wareham | last post by:
Hi, I am new to .NET but did a lot with VB6/ActiveX. One thing I did with VB6 was to have some components (ActiveX EXEs) installed on a remote computer and the main application would sit on another computer and instantiate objects from the remote component using DCOM. I now need to do this in .NET but am unsure where to start - are there such things as remote components in .NET?
15
7067
by: =?Utf-8?B?TVNU?= | last post by:
To demonstrate my problem, I have a very simple VB Windows application. It has a text box that is used to display a counter, a button to reset the counter, and a timer that increments the counter every second. I remote desktop to the computer hosting this application and run the application. It starts up and displays the counter incrementing every second. If I disconnect the network cable between the two computers for 10 seconds and...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.