473,409 Members | 2,006 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,409 software developers and data experts.

C# and VB COM object

Bob
I have a VB COM object with a method as follows:

Public Function GetTotalAmount(strUniqueIdentifier As Variant) As Variant

This method works fine in classic ASP. But in C#, when I call this method,
it complains because the parameter is a Variant. How do I get around this
problem without re-compiling the VB COM object?

Thank you.
Nov 17 '05 #1
4 1232
Hello,

[.NET Framework Tools - Type Library Importer]
http://msdn.microsoft.com/library/de...rtlbimpexe.asp

bye

On Fri, 22 Jul 2005 22:41:38 +0200, Bob <no*****@nospam.com> wrote:
I have a VB COM object with a method as follows:

Public Function GetTotalAmount(strUniqueIdentifier As Variant) As
Variant

This method works fine in classic ASP. But in C#, when I call this
method,
it complains because the parameter is a Variant. How do I get around
this
problem without re-compiling the VB COM object?

Thank you.

Nov 17 '05 #2
Hello,

[.NET Framework Tools - Type Library Importer]
http://msdn.microsoft.com/library/de...rtlbimpexe.asp

bye

On Fri, 22 Jul 2005 22:41:38 +0200, Bob <no*****@nospam.com> wrote:
I have a VB COM object with a method as follows:

Public Function GetTotalAmount(strUniqueIdentifier As Variant) As
Variant

This method works fine in classic ASP. But in C#, when I call this
method,
it complains because the parameter is a Variant. How do I get around
this
problem without re-compiling the VB COM object?

Thank you.

Nov 17 '05 #3
Complains like what?
Remember Variants are marshaled as Objects.
Mind to share some code, and/or the error message.

Willy.

"Bob" <no*****@nospam.com> wrote in message
news:eR**************@TK2MSFTNGP14.phx.gbl...
I have a VB COM object with a method as follows:

Public Function GetTotalAmount(strUniqueIdentifier As Variant) As
Variant

This method works fine in classic ASP. But in C#, when I call this
method, it complains because the parameter is a Variant. How do I get
around this problem without re-compiling the VB COM object?

Thank you.

Nov 17 '05 #4
Complains like what?
Remember Variants are marshaled as Objects.
Mind to share some code, and/or the error message.

Willy.

"Bob" <no*****@nospam.com> wrote in message
news:eR**************@TK2MSFTNGP14.phx.gbl...
I have a VB COM object with a method as follows:

Public Function GetTotalAmount(strUniqueIdentifier As Variant) As
Variant

This method works fine in classic ASP. But in C#, when I call this
method, it complains because the parameter is a Variant. How do I get
around this problem without re-compiling the VB COM object?

Thank you.

Nov 17 '05 #5

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

Similar topics

1
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object.cs in rotor. What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What I don't...
28
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
9
by: Keith Rowe | last post by:
Hello, I am trying to reference a Shockwave Flash Object on a vb code behind page in an ASP.NET project and I receive the following error: Guid should contain 32 digits with 4 dashes...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
44
by: Steven T. Hatton | last post by:
This may seem like such a simple question, I should be embarrassed to ask it. The FAQ says an object is "A region of storage with associated semantics." OK, what exactly is meant by "associated...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
0
by: Bijay Kumar | last post by:
Hi Guys, I was going through the source code of Object class (Object.cs in rotor). What I found is Equals() implemented as follows: public extern virtual bool Equals(Object obj); What...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
2
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...
0
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...

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.