473,394 Members | 1,867 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,394 software developers and data experts.

VC ++6 dll reference in vb.net Project

I have a dll of vc++6 . it have some mathod and function. so i want to use this dll in vb.net . when i reference this dll i have got an error .like dll is not valid assembly or COM component. plz help me it is urgent
Aug 7 '09 #1
4 2372
PLZ any body tell me how to reference vc++6 dll in vb.net .when i reference this dll i got an error like it is not vaild assembly or COM component.
plz Help me it is too urgent to me . thank u
Aug 8 '09 #2
Frinavale
9,735 Expert Mod 8TB
You have to register the DLL using the regsvr32 tool.

This registers the DLL (in the registry) so that other programs (your program is an "other program") can locate and use it.

Once you've done this you can add a reference to it in your project.

When you reference a COM Object, visual studio will automatically create an Interop DLL that will let your .NET code use the C++ code.

You should really research .NET interop and marshalling before you use a C++ class library (or any other unmanaged code) in your .NET code so that you understand the problems that you may run into.
Aug 14 '09 #3
Hi Frinavale
thank u for suggestion but when i register this dll . it need an entry point.
there is an error like " C:/pcscDll. was loaded,but the DllRegisterServer entry pont was not found.

def file is

LIBRARY pcscDll
EXPORTS
GenerateCryptogram;
ExecuteAPDU ;
GetReadersNames;
CardConnect ;
EstablishContext;
ReleaseContext;
CardDisConnect;
RemoveSpacesFromString;
GetATR;
iSCardIntheReader;

so plz help
Aug 17 '09 #4
Frinavale
9,735 Expert Mod 8TB
The DLL has to have an entry point in order to be registered.
This means that you have to have public code in the class library. There should be public classes/methods/structures etc

If there isn't then you'll see this error.

You'll also sometimes see this error if you are using the -i switch.
(eg you'll see the error if you type: "regsvr32 -i C:/pcscDll.dll")

If you remove this switch it may fix the problem
(just type: "regsvr32 C:/pcscDll.dll")
Aug 17 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: serge calderara | last post by:
Dear all, I have a really strange beaviour in my application. First of all I have a single plugin interface named IPlugIn which as been build in a separate project library named PLugin.dll...
0
by: public heath vb developer | last post by:
We have a solution with 29 projects including a main menu and 28 dlls. One of the projects (Project B) was created by copying an existing project (Project A), making changes including the assembly...
2
by: Steve Harclerode | last post by:
Hi all, I've been doing web service development for a year, with a break for the last few months. What I remember is how easy it is to reference a web service using Visual Studio. So today, I...
3
by: Hitesh Khatri | last post by:
Hi All, I have web application project, to which I have added project-reference to another class library. When I am using one of the property from that class. I am getting following error. ...
4
by: John Lafrowda | last post by:
Hi all, I'm trying to handle two projects in one solution (.net 2002, both projects are VB). The first project contains only some public constant definitions (for the moment) and compiles into...
5
by: Derek Martin | last post by:
I am creating a windows service and have added a reference to a DLL project that I have created. That DLL file is correctly referenced in both a windows app and a web app, all in the same...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
9
by: MSDNAndi | last post by:
Hi, I have the following problem with VS 2005 (Professional) and C# 2.0 I will use assembly and namespace synonymously here. I have a class in namespace InheritClass inherit from a baseclass...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
2
by: AMDRIT | last post by:
Hello Everyone, I am having an issue with my solution and hoping that you all can suggest a resolution. I have a common library that (A) that three other projects make reference of (B,C,D). ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...
0
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,...
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...

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.