dll creation problem: can't find dll entry point 
Author Message
 dll creation problem: can't find dll entry point

Hi,
I'm relatively new to VB, and extremely new to creating dll's and calling
them. I tried the following:
I wanna create a dll in VB, and call some dll function from within another
vb project.

My dll project looks like this:

Option Explicit

Public Function msgtest() As Boolean
MsgBox ("i'm in!!!")
msgtest = True
End Function

I 'maked' it, copied it to the windows/system directory. Then i started a
second project, trying to call this function. The code of that project looks
like this:

Option Explicit

Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

Public Sub Form_Load()
    msgtest
End Sub

I get the error message:
can't find dll entry point msgtest in dlltest.dll

What am i doing wrong here?

Thanks in advance

Stefan

--

ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
you can't create windows dlls in VB. Try using C instead. VB will only build
ActiveX dlls, which are unrelated.

ahmad.



Quote:
> Hi,
> I'm relatively new to VB, and extremely new to creating dll's and calling
> them. I tried the following:
> I wanna create a dll in VB, and call some dll function from within another
> vb project.

> My dll project looks like this:

> Option Explicit

> Public Function msgtest() As Boolean
> MsgBox ("i'm in!!!")
> msgtest = True
> End Function

> I 'maked' it, copied it to the windows/system directory. Then i started a
> second project, trying to call this function. The code of that project
looks
> like this:

> Option Explicit

> Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> Public Sub Form_Load()
>     msgtest
> End Sub

> I get the error message:
> can't find dll entry point msgtest in dlltest.dll

> What am i doing wrong here?

> Thanks in advance

> Stefan

> --

> ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
If your DLL is called MyDLL, you would.....

Dim objAnyName as MyDLL
Set objAnyName = New MyDLL

after that, to call your function, you'd use...

call objAnyName.msgtest

BTW. If you compile your dll and simply move it to the system folder, you'll need to re register it in it's new location.


Quote:
> Hi,
> I'm relatively new to VB, and extremely new to creating dll's and calling
> them. I tried the following:
> I wanna create a dll in VB, and call some dll function from within another
> vb project.

> My dll project looks like this:

> Option Explicit

> Public Function msgtest() As Boolean
> MsgBox ("i'm in!!!")
> msgtest = True
> End Function

> I 'maked' it, copied it to the windows/system directory. Then i started a
> second project, trying to call this function. The code of that project looks
> like this:

> Option Explicit

> Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> Public Sub Form_Load()
>     msgtest
> End Sub

> I get the error message:
> can't find dll entry point msgtest in dlltest.dll

> What am i doing wrong here?

> Thanks in advance

> Stefan

> --

> ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
This solution would work with an ActiveX DLL. PCSHLL32.DLL is a standard C
DLL. II know this because I am currently using it to get VB to talk to an
IBM 3270 terminal emulator session.

ahmad.


Quote:
> If your DLL is called MyDLL, you would.....

> Dim objAnyName as MyDLL
> Set objAnyName = New MyDLL

> after that, to call your function, you'd use...

> call objAnyName.msgtest

> BTW. If you compile your dll and simply move it to the system folder,

you'll need to re register it in it's new location.
Quote:




Quote:
> > Hi,
> > I'm relatively new to VB, and extremely new to creating dll's and
calling
> > them. I tried the following:
> > I wanna create a dll in VB, and call some dll function from within
another
> > vb project.

> > My dll project looks like this:

> > Option Explicit

> > Public Function msgtest() As Boolean
> > MsgBox ("i'm in!!!")
> > msgtest = True
> > End Function

> > I 'maked' it, copied it to the windows/system directory. Then i started
a
> > second project, trying to call this function. The code of that project
looks
> > like this:

> > Option Explicit

> > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > Public Sub Form_Load()
> >     msgtest
> > End Sub

> > I get the error message:
> > can't find dll entry point msgtest in dlltest.dll

> > What am i doing wrong here?

> > Thanks in advance

> > Stefan

> > --

> > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Maybe I lost part of the thread or something but I didn't see hime as for info about 'PCSHLL32.DLL'
Quote:

> This solution would work with an ActiveX DLL. PCSHLL32.DLL is a standard C
> DLL. II know this because I am currently using it to get VB to talk to an
> IBM 3270 terminal emulator session.

> ahmad.



> > If your DLL is called MyDLL, you would.....

> > Dim objAnyName as MyDLL
> > Set objAnyName = New MyDLL

> > after that, to call your function, you'd use...

> > call objAnyName.msgtest

> > BTW. If you compile your dll and simply move it to the system folder,
> you'll need to re register it in it's new location.



> > > Hi,
> > > I'm relatively new to VB, and extremely new to creating dll's and
> calling
> > > them. I tried the following:
> > > I wanna create a dll in VB, and call some dll function from within
> another
> > > vb project.

> > > My dll project looks like this:

> > > Option Explicit

> > > Public Function msgtest() As Boolean
> > > MsgBox ("i'm in!!!")
> > > msgtest = True
> > > End Function

> > > I 'maked' it, copied it to the windows/system directory. Then i started
> a
> > > second project, trying to call this function. The code of that project
> looks
> > > like this:

> > > Option Explicit

> > > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > > Public Sub Form_Load()
> > >     msgtest
> > > End Sub

> > > I get the error message:
> > > can't find dll entry point msgtest in dlltest.dll

> > > What am i doing wrong here?

> > > Thanks in advance

> > > Stefan

> > > --

> > > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
You should've keyed off of the phrase....
Quote:
> > I wanna create a dll in VB, and call some dll function from within another
> > vb project.

> you can't create windows dlls in VB. Try using C instead. VB will only build
> ActiveX dlls, which are unrelated.

> ahmad.



> > Hi,
> > I'm relatively new to VB, and extremely new to creating dll's and calling
> > them. I tried the following:
> > I wanna create a dll in VB, and call some dll function from within another
> > vb project.

> > My dll project looks like this:

> > Option Explicit

> > Public Function msgtest() As Boolean
> > MsgBox ("i'm in!!!")
> > msgtest = True
> > End Function

> > I 'maked' it, copied it to the windows/system directory. Then i started a
> > second project, trying to call this function. The code of that project
> looks
> > like this:

> > Option Explicit

> > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > Public Sub Form_Load()
> >     msgtest
> > End Sub

> > I get the error message:
> > can't find dll entry point msgtest in dlltest.dll

> > What am i doing wrong here?

> > Thanks in advance

> > Stefan

> > --

> > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Apologies, you are right. I was mixing this up with an entirely different
problem.

ahmad.


Quote:
> Maybe I lost part of the thread or something but I didn't see hime as for

info about 'PCSHLL32.DLL'
Quote:




Quote:
> > This solution would work with an ActiveX DLL. PCSHLL32.DLL is a standard
C
> > DLL. II know this because I am currently using it to get VB to talk to
an
> > IBM 3270 terminal emulator session.

> > ahmad.



> > > If your DLL is called MyDLL, you would.....

> > > Dim objAnyName as MyDLL
> > > Set objAnyName = New MyDLL

> > > after that, to call your function, you'd use...

> > > call objAnyName.msgtest

> > > BTW. If you compile your dll and simply move it to the system folder,
> > you'll need to re register it in it's new location.



> > > > Hi,
> > > > I'm relatively new to VB, and extremely new to creating dll's and
> > calling
> > > > them. I tried the following:
> > > > I wanna create a dll in VB, and call some dll function from within
> > another
> > > > vb project.

> > > > My dll project looks like this:

> > > > Option Explicit

> > > > Public Function msgtest() As Boolean
> > > > MsgBox ("i'm in!!!")
> > > > msgtest = True
> > > > End Function

> > > > I 'maked' it, copied it to the windows/system directory. Then i
started
> > a
> > > > second project, trying to call this function. The code of that
project
> > looks
> > > > like this:

> > > > Option Explicit

> > > > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > > > Public Sub Form_Load()
> > > >     msgtest
> > > > End Sub

> > > > I get the error message:
> > > > can't find dll entry point msgtest in dlltest.dll

> > > > What am i doing wrong here?

> > > > Thanks in advance

> > > > Stefan

> > > > --

> > > > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
??

Ahmad.


Quote:
> You should've keyed off of the phrase....

> > > I wanna create a dll in VB, and call some dll function from within
another
> > > vb project.




Quote:
> > you can't create windows dlls in VB. Try using C instead. VB will only
build
> > ActiveX dlls, which are unrelated.

> > ahmad.



> > > Hi,
> > > I'm relatively new to VB, and extremely new to creating dll's and
calling
> > > them. I tried the following:
> > > I wanna create a dll in VB, and call some dll function from within
another
> > > vb project.

> > > My dll project looks like this:

> > > Option Explicit

> > > Public Function msgtest() As Boolean
> > > MsgBox ("i'm in!!!")
> > > msgtest = True
> > > End Function

> > > I 'maked' it, copied it to the windows/system directory. Then i
started a
> > > second project, trying to call this function. The code of that project
> > looks
> > > like this:

> > > Option Explicit

> > > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > > Public Sub Form_Load()
> > >     msgtest
> > > End Sub

> > > I get the error message:
> > > can't find dll entry point msgtest in dlltest.dll

> > > What am i doing wrong here?

> > > Thanks in advance

> > > Stefan

> > > --

> > > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
It goes like this....

1. Code your class in an ActiveX DLL project.  Be sure that your class's
instancing property is set to anything other than "Private" or
"PublicNotCreatable".
2. Build your project.  Do not move the DLL.
3. In your project properties dialog box, select the "Component" tab.  Change
the Version Compatibility settings to "Binary Compatibility".  Be sure that the
DLL file that you built is showing in the textbox below the option.
4. Build the project again.
5. Start a NEW instance of Visual Basic.
6. Open the project you wish to add the DLL functionality to.
7. From the Project Menu, select "References".  Find the component you defined
in the list.  Select the checkbox next to it.  Click OK.

Since you have a reference set to your DLL, you don't need to use a declare
statement.  You now have access to all of the public classes of your DLL.

You need to make an instance of the class that contains your function:
    Private MyInstance as New MyDLL.MyClass

You now have an object variable that has all the capabilities you have assigned
in your class.  Now you just need to use it:
    MyInstance.msgtest

There you are!  There you have it.  You will want to invest some time into
reading some of the On-Line Help topics regarding in-process components.  Here
is my reading list:

    Using Visual Basic
        Programmer's Guide
            Part 2: What can you do with Visual Basic
                * Programming With Objects
                * Programming with components
        Component Tools Guide
            * Creating ActiveX Components

I would recommend you invest the paper in printing out the documents that I have
listed.  You will learn everything you ever wanted to know about ActiveX DLLs.
To print the entire section, you right-click on the topic you want to print (the
ones that I marked with an asterisk), and select "Print...".  You will want to
select "Print the selected heading and all subtopics."

HTH,
ian


Quote:
> Hi,
> I'm relatively new to VB, and extremely new to creating dll's and calling
> them. I tried the following:
> I wanna create a dll in VB, and call some dll function from within another
> vb project.

> My dll project looks like this:

> Option Explicit

> Public Function msgtest() As Boolean
> MsgBox ("i'm in!!!")
> msgtest = True
> End Function

> I 'maked' it, copied it to the windows/system directory. Then i started a
> second project, trying to call this function. The code of that project looks
> like this:

> Option Explicit

> Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> Public Sub Form_Load()
>     msgtest
> End Sub

> I get the error message:
> can't find dll entry point msgtest in dlltest.dll

> What am i doing wrong here?

> Thanks in advance

> Stefan

> --

> ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Hi Ian,

Thank you very much for your info, it's a big help!
I've got one more q:
I thought that if i wrote a dll in VB, i could also call the function from
other places, like a c++ programme or from a wise installation script... But
one of the answers above said that you cannot call a vb dll function from
elsewhere then from a vb appliction... is that so?

Stefan



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
As long as the program supports the Component Object Model (COM), it should
work.  I say that it should because there is always an exception to the rule.
If you want to be sure that a DLL will be able to be used by almost any
programming language, you would want to compile it in C or C++.

You shouldn't have any trouble with the Wise Installation System (I believe it
is fully COM compliant), but you might have problems with older versions of
C++.  If it is VC++, you should be fine.  You will have to work with the data
types that are supported by the target programming language (no passing
variants).  I must emphasize that this is all theoretical.  I have not tried to
use VB dll files in Wise or C++.  Let me know how it works.

HTH,
ian


Quote:
> Hi Ian,

> Thank you very much for your info, it's a big help!
> I've got one more q:
> I thought that if i wrote a dll in VB, i could also call the function from
> other places, like a c++ programme or from a wise installation script... But
> one of the answers above said that you cannot call a vb dll function from
> elsewhere then from a vb appliction... is that so?

> Stefan



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Ok Ian,

If i succeed, i will let you know! But as i'm being more of a c++ programmer
then a VB programmer, i'm very tempted now to switch to C++ for this dll...

Thanks again!!!!

Stefan



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Whoops.... Forgot to mention that little 'Set a reference' detail.
Quote:

> It goes like this....

> 1. Code your class in an ActiveX DLL project.  Be sure that your class's
> instancing property is set to anything other than "Private" or
> "PublicNotCreatable".
> 2. Build your project.  Do not move the DLL.
> 3. In your project properties dialog box, select the "Component" tab.  Change
> the Version Compatibility settings to "Binary Compatibility".  Be sure that the
> DLL file that you built is showing in the textbox below the option.
> 4. Build the project again.
> 5. Start a NEW instance of Visual Basic.
> 6. Open the project you wish to add the DLL functionality to.
> 7. From the Project Menu, select "References".  Find the component you defined
> in the list.  Select the checkbox next to it.  Click OK.

> Since you have a reference set to your DLL, you don't need to use a declare
> statement.  You now have access to all of the public classes of your DLL.

> You need to make an instance of the class that contains your function:
>     Private MyInstance as New MyDLL.MyClass

> You now have an object variable that has all the capabilities you have assigned
> in your class.  Now you just need to use it:
>     MyInstance.msgtest

> There you are!  There you have it.  You will want to invest some time into
> reading some of the On-Line Help topics regarding in-process components.  Here
> is my reading list:

>     Using Visual Basic
>         Programmer's Guide
>             Part 2: What can you do with Visual Basic
>                 * Programming With Objects
>                 * Programming with components
>         Component Tools Guide
>             * Creating ActiveX Components

> I would recommend you invest the paper in printing out the documents that I have
> listed.  You will learn everything you ever wanted to know about ActiveX DLLs.
> To print the entire section, you right-click on the topic you want to print (the
> ones that I marked with an asterisk), and select "Print...".  You will want to
> select "Print the selected heading and all subtopics."

> HTH,
> ian


> > Hi,
> > I'm relatively new to VB, and extremely new to creating dll's and calling
> > them. I tried the following:
> > I wanna create a dll in VB, and call some dll function from within another
> > vb project.

> > My dll project looks like this:

> > Option Explicit

> > Public Function msgtest() As Boolean
> > MsgBox ("i'm in!!!")
> > msgtest = True
> > End Function

> > I 'maked' it, copied it to the windows/system directory. Then i started a
> > second project, trying to call this function. The code of that project looks
> > like this:

> > Option Explicit

> > Private Declare Function msgtest Lib "dlltest.dll" () As Boolean

> > Public Sub Form_Load()
> >     msgtest
> > End Sub

> > I get the error message:
> > can't find dll entry point msgtest in dlltest.dll

> > What am i doing wrong here?

> > Thanks in advance

> > Stefan

> > --

> > ee-consultants.de         >true emailaddress



Mon, 18 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
Right, and if you are a C programmer, that's the way to go. But for
Basic-only programmers, there's powerbasic, which allows you to create
regular DLLs (or even full executables). It's extremely powerful (you
have pointers, inline assembler, extended data types...),
hypertight-hyperfast code... Unfortunately, it still is somewhat far
from what would be its full grown potential. You may take a look at

        http://www.powerbasic.com

On Thu, 30 Sep 1999 16:01:59 +0100, "Ahmad Zaman"

Quote:

>you can't create windows dlls in VB. Try using C instead. VB will only build
>ActiveX dlls, which are unrelated.

>ahmad.

Manuel Algora



Thu, 21 Mar 2002 03:00:00 GMT  
 dll creation problem: can't find dll entry point
You can create C style exportable functions in VB using APIs
See Desaware's Spyworks.


Quote:
> Right, and if you are a C programmer, that's the way to go. But for
> Basic-only programmers, there's PowerBasic, which allows you to create
> regular DLLs (or even full executables). It's extremely powerful (you
> have pointers, inline assembler, extended data types...),
> hypertight-hyperfast code... Unfortunately, it still is somewhat far
> from what would be its full grown potential. You may take a look at

> http://www.powerbasic.com

> On Thu, 30 Sep 1999 16:01:59 +0100, "Ahmad Zaman"

> >you can't create windows dlls in VB. Try using C instead. VB will only
build
> >ActiveX dlls, which are unrelated.

> >ahmad.

> Manuel Algora




Tue, 26 Mar 2002 03:00:00 GMT  
 
 [ 19 post ]  Go to page: [1] [2]

 Relevant Pages 

1. dll creation problem: can't find dll entry point

2. VB5 DLL function / Can't find DLL entry point

3. VB5 DLL Error - Can't Find Entry Point in ...dll

4. VB5 DLL Error - Can't Find Entry Point in ...dll

5. Can't find DLL entry point OpenEventLog in advapi32.dll

6. Can't find DLL entry point NetGetDCName in netapi32.dll

7. Can't find DLL entry point NetRemoteTOD in NETAPI32.DLL

8. VB can't find entry point in VC++ DLL

9. Can't find DLL entry-point ...??

10. VB Can't Find DLL Entry Point

11. Can't find DLL Entry point ExitWindows in user32

12. Newbie Question: Can't find DLL entry point

 

 
Powered by phpBB® Forum Software