473,805 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Variant Return from COM INteroperabilit y in C#

I am trying to get a variant return in C# from a VB 6.0 .dll.

The VB 6.0 .dll has a method signiture of:

Public Function GetStateCodes() As Variant

This is located in ElecPub.dll Data. I am just trying to get a string return of "Error".

I created the Runtime Callable Wrapper and referenced in my .NET project.
I also registered the VB 6.0 .DLL

My test code is:

// Create an instance of the RCW Class
ElecPubRCW.Data Class RCW = new ElecPubRCW.Data Class();

object StateCodes = RCW.GetStateCod es();

My return is: Error in COM Interoperabilit y - Error message : ClassFactory cannot supply requested class

Thanks,

kurt...
Nov 15 '05 #1
0 1042

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

Similar topics

0
1089
by: Manny Bonet | last post by:
I downloaded some code from MSDN to allow the upload of a file from an ASP page. I know that .NET can do this in an easire fashion but converting all the code would just be too much of a pain in the butt. The code works fine and I can upload a file however when it processes the form it does not expose the names (which it stores as a key in a stl::map and also in a stl::set) of the input items it loads into the CDictionary class. When I...
19
2096
by: Jon Davis | last post by:
Hi guys! Just wanted to let you all know that I created a Variant structure, inspired by the old VB6 days. This is written in C#, but you can build a CLR/.NET class library assembly and reference it to your liking. ' Here is an example of use: ' start with a string of "1" Dim da As Variant = new Variant("1") ' add an integer of 2, becomes 3
3
2259
by: Vigj | last post by:
Hi all, I'm working on an interoperability project I have a huge c++ MFC application that supports a plug-in interface I'm developing a plug in in C# sometimes the c++ pass invalid variants to the plug-in interface. between the c++ and c# i have a dll (in c++ ) that instances the objects in C# code and does some pre-processing actions on the parameters. I would like in this dll to check the variant parameters that will be passed to C#...
0
1501
by: .::alex::. | last post by:
Hello, Maybe you already guess the problem. I have a COM with a method in a Interface like that: HRESULT GetArray(VARIANT *pVal); so this method will return a VARIANT. This VARIANT contains a SafeArray - 1 dimension.
2
4194
by: Heike | last post by:
Hello everybody, I have a Problem with C Sharp. I have to use external functions in DLLs. This Functions are written in Visual C++ 6 like this: int (__stdcall *GetGlobalValue) (VARIANT Appl, VARIANT &vRetVal); Now for the first time I want to use C Sharp and I find some examples to use Functions in extarnal DLLs, but I don't know how to cast the Variant-Paramters in C Sharp.
11
1963
by: MLH | last post by:
The following procedures found at http://ffdba.com/downloads/Send_Mail_With_Outlook_Express.htm are meant to work together in harmony to effect eMail sends via OE. The last procedure (FN SplitB) fails on its last line which is meant to assign the value of SplitB (a variant) the value of aSplit (an array dim'd as variant). That fails due to Type Mismatch. Anyone know how to get around this? Private Type MapiRecip Reserved As Long
1
4581
by: morten | last post by:
When i compile this code in VC71 or VC80 i get the following errors: The code is copy/paste from the boost.org tutorial. Please help! error C2039: 'begin' : is not a member of 'boost::variant<T0_,T1>' with Test2.cpp(47): error C2039: 'end' : is not a member of 'boost::variant<T0_,T1>' with
1
3243
by: captainc | last post by:
I have C++ code to import a .tlb and use a .dll that has functions that return VARIANT types and accepts BSTRs (bstrings). I have seen that python has modules that can manipulate VARIANTs and BSTRs in the win32com or comtypes.automation packages. I began to use Boost.Python to script some of my code. I tried to send the VARIANT back to python by having the extension module's functions return a VARIANT or VARIANT*; I even tried _variant_t. In...
4
12154
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I define type variant in c#?
0
10607
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
10359
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
10364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10104
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7645
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
6875
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
5541
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
4317
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
3
3007
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.