473,385 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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.ClassName
_BOMsg = (SBO_BO_1_1.BO_MessageClass)Activator.CreateComIns tanceFrom
("E:\\SharpDevelop
Projects\\Woff\\bin\\Debug\\Interop.Projekt.dll"," Projekt.ClassName").Unwrap();

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

Woff.RsMarshallTest.CreateSBOMsg failed:

System.MissingMethodException : Constructor on type Projekt.ClassName
not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args, CultureInfo culture,
Object[] activationAttributes)
at System.Activator.CreateComInstanceFrom(String assemblyName,
String typeName, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm)
at System.Activator.CreateComInstanceFrom(String assemblyName,
String typeName)
at Handelsbanken.SPP.Woff.RsMarshall.TestSBOMsg() in
e:\SharpDevelop Projects\Woff\RsMarshall.cs:line 43
at Woff.RsMarshallTest.CreateSBOMsg() in e:\SharpDevelop
Projects\Woff\RsMarshallTest.cs: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 2632
Curt,

It looks like you are trying to call CreateComInstanceFrom 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.com

"Curt" <go****@elgrego.org> wrote in message
news:a1**************************@posting.google.c om...
Hi,

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

This is the code that fails.

Projekt.ClassName
_BOMsg = (SBO_BO_1_1.BO_MessageClass)Activator.CreateComIns tanceFrom
("E:\\SharpDevelop
Projects\\Woff\\bin\\Debug\\Interop.Projekt.dll"," Projekt.ClassName").Unwrap();

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

Woff.RsMarshallTest.CreateSBOMsg failed:

System.MissingMethodException : Constructor on type Projekt.ClassName
not found.
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr,
Binder binder, Object[] args, CultureInfo culture, Object[]
activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags
bindingAttr, Binder binder, Object[] args, CultureInfo culture,
Object[] activationAttributes)
at System.Activator.CreateComInstanceFrom(String assemblyName,
String typeName, Byte[] hashValue, AssemblyHashAlgorithm
hashAlgorithm)
at System.Activator.CreateComInstanceFrom(String assemblyName,
String typeName)
at Handelsbanken.SPP.Woff.RsMarshall.TestSBOMsg() in
e:\SharpDevelop Projects\Woff\RsMarshall.cs:line 43
at Woff.RsMarshallTest.CreateSBOMsg() in e:\SharpDevelop
Projects\Woff\RsMarshallTest.cs: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
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...
3
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...
3
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...
15
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...
7
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...
4
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...
1
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...
2
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)...
0
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...
15
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.