473,466 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

URGENT: Need to call VB6 DLL from C# .net application without referencing VB6 DLL

Guys,
I am using c# to call some DLL. Here is my situation, I tried to create
reference to this dll in my project and I am able to call this dll
successfully, but when actual dll is upgraded to new version it is
giving COM exception like CLSID is not registered. Because of this I am
having some admin problems. I want a solution without referencing the
dll I need to call the original DLL OR how to overcome this situation
if I reference the DLL in the project.

Could someone help me out what I can do to solve this issue?
Any help would be greatly appreciated

Tx,
csharpguy

May 21 '06 #1
4 6255
I would have a word with whomever creates the VB6 DLL and get them to set
"binary compatibility". There is no reason for a VB6 DLL to change it's
class Id between compiles. If it is being compiled with binary compatibility
then they class id remains the same, unless they "break" the interface by
changing the signatures of the public interface.

HTH
Steve

"csharpguy" <ch********@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
Guys,
I am using c# to call some DLL. Here is my situation, I tried to create
reference to this dll in my project and I am able to call this dll
successfully, but when actual dll is upgraded to new version it is
giving COM exception like CLSID is not registered. Because of this I am
having some admin problems. I want a solution without referencing the
dll I need to call the original DLL OR how to overcome this situation
if I reference the DLL in the project.

Could someone help me out what I can do to solve this issue?
Any help would be greatly appreciated

Tx,
csharpguy

May 21 '06 #2
Steve,
Thanks for the reply. But VB6 DLL is a third party DLL, We cannot make
it binary.

Is there any other solution?. Can we use PInvoke, if so how do we get
class variables?

I appreciate your help.

Thanks

May 22 '06 #3
In the VB world, I'd be using late binding and invoking the DLL after
creating a reference via a call to CreateObject(). I'm not sufficiently
proficient in .Net to advise you on what the equivalent call is. Sorry.

Steve
"csharpguy" <ch********@gmail.com> wrote in message
news:11*********************@j55g2000cwa.googlegro ups.com...
Steve,
Thanks for the reply. But VB6 DLL is a third party DLL, We cannot make
it binary.

Is there any other solution?. Can we use PInvoke, if so how do we get
class variables?

I appreciate your help.

Thanks

May 22 '06 #4
alternative of CreateObject in C# world is

Type type1;

type1 = Type.GetTypeFromProgID(ProgId);

obj1 = Activator.CreateInstance(type1);

I hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 22 '06 #5

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

Similar topics

2
by: Mustafa Rabie | last post by:
Dear All, i have a web application that registers my users to my site, i have a SQL backend and a webservice to interact with SQL. I need to write a WINDOWS FORMS APPLICATION using C# to...
6
by: [Yosi] | last post by:
How can I make sure that a spicific function location in memory will not moved , by OS/Garbage collection ????? The problem is : I'm using a DLL this dll have an call backerror function, in my...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
16
by: | last post by:
Hi all, I have a website running on beta 2.0 on server 2003 web sp1 and I keep getting the following error:- Error In:...
11
by: scorpion53061 | last post by:
in my head...... I need my application to work with Office 97, 2000, XP and 2003 versions of MS Word and MS Excel. IN order to acomplish this I have to install in different folders: 1....
13
by: Niyazi | last post by:
Hi I have a report that I have to run it monthly in my machine. My code in VB.NET and I access AS400 to get data, anaysie it and send into pre formated Excel sheet. The data consist of 9000...
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
11
by: Matthew | last post by:
Ok let me try to explain this as good as I can. I am creating this application where it contains a userlogin class. The user logs in before entering the main apploication. I want to do audit trails...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
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...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...
0
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...
0
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 ...

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.