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

Create Entry Point in Class Library

Plz..

I intend to share a class library though network. This library is gonna
be called by a VB6 project.

I've found out that a late file-based binding on vb6 is the easiest way
to bind it...
DECLARE FUNCTION Enc (str As String) LIB "enc.dll" As Boolean
for example...
But .NET Class Library doesn't have an entry point, so my plans were
flushed away.
Reading in over the internet i found out that System.Reflection can
create this EntryPoint, but the farest i got is
Dim instance as Assembly
Dim value as MethodInfo
value = instance.EntryPoint

To it seens to be what I need... but... How do I use it???
I couldn't find any sample codes... Nor any clarifying information...

Any little help is appreciated...
Tks in advance...
christiano


Oct 2 '08 #1
5 6023
"Christiano Donke" <cd****@digiexpress.com.brschrieb:
I intend to share a class library though network. This library is gonna
be called by a VB6 project.

I've found out that a late file-based binding on vb6 is the easiest way
to bind it...
DECLARE FUNCTION Enc (str As String) LIB "enc.dll" As Boolean for
example...
But .NET Class Library doesn't have an entry point, so my plans were
flushed away.
Exposing managed functions the way it's done in the unmanaged (Win32) world
is not supported by .NET, except maybe when using C++/CLI.

If your client is written in VB6, you could also expose classes and their
members to COM.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Oct 2 '08 #2
I created a VB.Net DLL to be run with VB6.
Using the Declare approach (in VB6), I also get the "entry Point" Killer
when trying to run it.
Using the COM approch (in VB6), Intellisense shows me all aspects of the
DLL, compiles ok, but gives the "Automation error -2147024894 System cannot
find the file specified" when trying to run it. I have been surfing the net
for hours, finding lots of junk responses, but no step by step answer. Maybe
I am expecting too much.
Ron

"Herfried K. Wagner [MVP]" wrote:
"Christiano Donke" <cd****@digiexpress.com.brschrieb:
I intend to share a class library though network. This library is gonna
be called by a VB6 project.

I've found out that a late file-based binding on vb6 is the easiest way
to bind it...
DECLARE FUNCTION Enc (str As String) LIB "enc.dll" As Boolean for
example...
But .NET Class Library doesn't have an entry point, so my plans were
flushed away.

Exposing managed functions the way it's done in the unmanaged (Win32) world
is not supported by .NET, except maybe when using C++/CLI.

If your client is written in VB6, you could also expose classes and their
members to COM.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 13 '08 #3

Thanks Herfried for responding to my note, but as best as I can tell, it is
the same reply you gave to the original person on this thread. I did
investigate the links you provided (some interesting stuff) but after wading
through it, I did not find anything to further the solution. If I am missing
something, consider me ... (whatever). I'm afraid I missed the point of your
reply.

Ron

"Ron" wrote:
I created a VB.Net DLL to be run with VB6.
Using the Declare approach (in VB6), I also get the "entry Point" Killer
when trying to run it.
Using the COM approch (in VB6), Intellisense shows me all aspects of the
DLL, compiles ok, but gives the "Automation error -2147024894 System cannot
find the file specified" when trying to run it. I have been surfing the net
for hours, finding lots of junk responses, but no step by step answer. Maybe
I am expecting too much.
Ron

"Herfried K. Wagner [MVP]" wrote:
"Christiano Donke" <cd****@digiexpress.com.brschrieb:
I intend to share a class library though network. This library is gonna
be called by a VB6 project.
>
I've found out that a late file-based binding on vb6 is the easiest way
to bind it...
DECLARE FUNCTION Enc (str As String) LIB "enc.dll" As Boolean for
example...
>
>
But .NET Class Library doesn't have an entry point, so my plans were
flushed away.
Exposing managed functions the way it's done in the unmanaged (Win32) world
is not supported by .NET, except maybe when using C++/CLI.

If your client is written in VB6, you could also expose classes and their
members to COM.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 14 '08 #4
Ron wrote:
I created a VB.Net DLL to be run with VB6.
Using the Declare approach (in VB6), I also get the "entry Point" Killer
when trying to run it.
Not surprising; It's extremely difficult to build "Native" Windows dll's
(that use Entry Points) in either flavour of Visual Basic.
Using the COM approch (in VB6), Intellisense shows me all aspects of the
DLL, compiles ok, but gives the "Automation error -2147024894 System cannot
find the file specified" when trying to run it.
/Where/ are you putting the .Net Dll for your VB6 application find it?

When trying to load assemblies, the Framework /will/ look in the
application directory.

HTH,
Phill W.
Nov 17 '08 #5
Hi Phill

Thanks for the reply, Sadly I did place the dll (and tlb) in the same
directory as the source code I was running (but is that the "application"
directory??). I even ran Regasm on the dll located there. I have been reading
somewhere that the problem is with the registry as it may not have the
correct pointers. With caution, I have modified the registry, but that did
not work either. I am getting to the point of trying a dll written in C to
gain access to the entry points.

Ron
"Phill W." wrote:
Not surprising; It's extremely difficult to build "Native" Windows dll's
(that use Entry Points) in either flavour of Visual Basic.

/Where/ are you putting the .Net Dll for your VB6 application find it?

When trying to load assemblies, the Framework /will/ look in the
application directory.

HTH,
Phill W.
Nov 17 '08 #6

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

Similar topics

2
by: Rudi | last post by:
Is there anyone who can point me to a good tutorial on how to create a multithreaded class library? Class A is a controller that starts up a number of threads of code in Class B. Class B raises...
7
by: Josef | last post by:
Hello, I want to create a C# class library which I can use in an Excel VBA macro. I created a C# class library and set the "Register for COM Interop" option in Visual Studio to TRUE. Now in...
2
by: Tony Jones | last post by:
Is it possible for me to create a class library DLL and have it read it's configuration settings from the web.config of the ASP.NET application referencing it? IE - if I call...
2
by: Jos | last post by:
Maybe this subject is off-topic in this newsgroup, but I can't find a group about Visual Basic Standard Edition. My training book instructs me to create a new class library inside my solution...
0
by: James MA | last post by:
I'm going to develop a common library for applications in both Windows and Windows Mobile, this library will contain the bussiness rule only, which only contain some simply mathematics, and it...
6
by: Pucca | last post by:
Hi, I have a few C BER coding that I would like to compile into a C++ Class library project and then use it in my C# windows application. Can I do that from C# using pinvoke? If not then does...
3
by: Martyn Fewtrell | last post by:
Hi there. First of all let me apologise for this is a somewhat general question to which I would be interested in any opinions. As far as I can see when I create a web application the...
3
by: Jon Slaughter | last post by:
Is is possible to define a different entry point than Main? i.e. static void MainEntryPoint() {
4
by: Alan Mailer | last post by:
Again, I'm new to VB.net and there is something I need help with: Like (I assume) many of us, over time I want to be able to create some VB.net classes that I might want to use in more than one...
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
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...
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
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
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
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...

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.