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

dll registration issue

So far I have tested building a .dll file with an interface. Then by
generating another VB.Net project that has a reference to the .dll I can
happily see the interface of the .dll. All of this is in VB.Net. This seems
pretty neat, and will allow for variables to be passed from one app to the
other happily. At the moment all the .dll does is open a form.

However, if I create a project in VB 6, it throws an error when I try and
set a reference to my .Net .dll file ("Can't add a reference to the given
file")
If I try and register the .dll through VBA in Access (Shell "regsvr32.exe
C:\Data\TEST\Test_OCX\bin\Test_OCX.dll"), I get an error to the effect of an
invalid entry point in the .dll.

All that the .dll file contains is a class with a public sub that opens the
form. (vb.net 2003)

Any thoughts?

Am I trying to register the .dll in VB 6 the wrong way or is there something
that I am missing with building the .dll?

If I build pretty much a similar .dll or .ocx in VB 6 then it appears as
though both VB 6 and .Net can interact with the control.

Any thoughts?

Thanks in advance,

Mike
OnSite Applications

Nov 20 '05 #1
2 2171
* "Mike Whitaker" <mw@onsiteapplications_notreal.com.au> scripsit:
So far I have tested building a .dll file with an interface. Then by
generating another VB.Net project that has a reference to the .dll I can
happily see the interface of the .dll. All of this is in VB.Net. This seems
pretty neat, and will allow for variables to be passed from one app to the
other happily. At the moment all the .dll does is open a form.

However, if I create a project in VB 6, it throws an error when I try and
set a reference to my .Net .dll file ("Can't add a reference to the given
file")
If I try and register the .dll through VBA in Access (Shell "regsvr32.exe
C:\Data\TEST\Test_OCX\bin\Test_OCX.dll"), I get an error to the effect of an
invalid entry point in the .dll.

All that the .dll file contains is a class with a public sub that opens the
form. (vb.net 2003)

Any thoughts?

Am I trying to register the .dll in VB 6 the wrong way or is there something
that I am missing with building the .dll?

If I build pretty much a similar .dll or .ocx in VB 6 then it appears as
though both VB 6 and .Net can interact with the control.


..NET DLLs cannot be used directly with VB6. You will have to regiuster
them for COM interop and "export" classes and methods to COM:

<http://mvps.org/dotnet/dotnet/samples/codingtechnique/downloads/MyComLib.zip>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
Thanks for the pointers.

VB 6 now happily runs the .dll as a .tlb, though MS Access makes a
reference, then crashes when it tries to load a form. Any thoughts?

Thanks agan.

Mike
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bm************@ID-208219.news.uni-berlin.de...
* "Mike Whitaker" <mw@onsiteapplications_notreal.com.au> scripsit:
So far I have tested building a .dll file with an interface. Then by
generating another VB.Net project that has a reference to the .dll I can
happily see the interface of the .dll. All of this is in VB.Net. This seems pretty neat, and will allow for variables to be passed from one app to the other happily. At the moment all the .dll does is open a form.

However, if I create a project in VB 6, it throws an error when I try and set a reference to my .Net .dll file ("Can't add a reference to the given file")
If I try and register the .dll through VBA in Access (Shell "regsvr32.exe C:\Data\TEST\Test_OCX\bin\Test_OCX.dll"), I get an error to the effect of an invalid entry point in the .dll.

All that the .dll file contains is a class with a public sub that opens the form. (vb.net 2003)

Any thoughts?

Am I trying to register the .dll in VB 6 the wrong way or is there something that I am missing with building the .dll?

If I build pretty much a similar .dll or .ocx in VB 6 then it appears as
though both VB 6 and .Net can interact with the control.
.NET DLLs cannot be used directly with VB6. You will have to regiuster
them for COM interop and "export" classes and methods to COM:

<http://mvps.org/dotnet/dotnet/sample...ds/MyComLib.zi
p>
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

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

Similar topics

2
by: Serge | last post by:
Hello, Does anyone know what registry key exactly defines which version of VS.NET is installed on the machine? I have checked the registry and it seems that the possible key might be:...
3
by: Jason | last post by:
Hi all, Merry Christmas! I would like to have trial period for my .NET application and let user to enter S/N for registration. I would like to ask how can we store the registration status of...
1
by: Shree | last post by:
Hi, My OS is Windows 2000 SP4. And I have a .NET 1.1 dll. I run the regasm command on the dll and I get the successful registration prompt. However, the dll is NOT registered. I checked the...
6
by: Greg Collins [InfoPath MVP] | last post by:
I couldn't find what I was looking for doing a search through the newsgroup, so here goes... I'm have a Web site user registration confirmation page that I want to show a set of random numbers...
1
by: Ashok K Kumar | last post by:
Hi, I have a ATL Attributed DLL which exposes a COM Component. My requirement is, whenever, the DLL is registered, I also would like to add some entries to the HKLM/Softwares/CompanyName........
2
by: news | last post by:
I just upgraded to PHP 4.4.2 on my Slackware 10.2 system. And Apache/mySQL/PHP all work great through a browser. No errors. But when I try to run a PHP script through the command line, which I...
3
by: Ryan | last post by:
I am going to create an asp site that allows the users to fill out application information. Their personal information will be stored server side in a SQL 2005 database and they can come back to...
1
by: delusion7 | last post by:
Trying to create a table and insert records from a webform and I keep getting this message: "Successfully created the registration table. Unable to execute the query. Error code...
5
by: JT | last post by:
Hi, I would like opinions on a shareware issue. If shareware uses an online database to hold registration codes, which get copied locally and therefore only needs to check online if the...
2
by: nirav11 | last post by:
# include <iostream> # include <fstream> # include <iomanip> # include <cstdlib> // needed for exit () using namespace std; int main() { ifstream inFile; ofstream outFile;
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: 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
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
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
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
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
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.