Visual C++ 6.0 DLLs |
Author: |
Message: |
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
O.P. Visual C++ 6.0 DLLs
I'm trying to make a DLL, but I keep getting "Cannot find entry point <function name> in <dllname>" errors. I've followed instructions from various website, but they all cause the same errors.
Can sombody zip up an example project for me so I can see where I'm going wrong?
<Eljay> "Problems encountered: shit blew up"
|
|
09-21-2007 08:12 PM |
|
|
ShawnZ
Veteran Member
Posts: 3146 Reputation: 43
32 / /
Joined: Jan 2003
|
RE: Visual C++ 6.0 DLLs
what dll? one of yours or a system one?
This post was edited on 09-21-2007 at 08:16 PM by ShawnZ.
Spoiler: the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
|
|
09-21-2007 08:16 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
O.P. RE: Visual C++ 6.0 DLLs
I'm trying to make one of my own... I've made the .cpp, h and def files and followed the instructions given on website. The DLL makes ok, but I can't call it from within VB
<Eljay> "Problems encountered: shit blew up"
|
|
09-21-2007 08:18 PM |
|
|
vikke
Senior Member
Posts: 900 Reputation: 28
31 / /
Joined: May 2006
|
RE: Visual C++ 6.0 DLLs
Are you sure your exported functions are in the def file?
They should be, then compile and copy to the same directory as your VB exe.
|
|
09-21-2007 08:32 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
O.P. RE: Visual C++ 6.0 DLLs
Yeah, they are definatley exported... I've seen a few sites say that I should do it
<Eljay> "Problems encountered: shit blew up"
|
|
09-21-2007 08:33 PM |
|
|
vikke
Senior Member
Posts: 900 Reputation: 28
31 / /
Joined: May 2006
|
RE: Visual C++ 6.0 DLLs
Hmm.. They may be mangled by your compiler. To find out, download dependencywalker from www.dependencywalker.com, and open your DLL.
More information of name mangling here: http://en.wikipedia.org/wiki/Name_mangling
|
|
09-22-2007 07:21 AM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
O.P. RE: Visual C++ 6.0 DLLs
quote: Originally posted by vikke
Hmm.. They may be mangled by your compiler. To find out, download dependencywalker from www.dependencywalker.com, and open your DLL.
I checked it out in Dependency Walker and it appears to be ok...
Still notworking though =/
Attachment: error.PNG (38.42 KB)
This file has been downloaded 147 time(s).
<Eljay> "Problems encountered: shit blew up"
|
|
09-22-2007 05:35 PM |
|
|
vikke
Senior Member
Posts: 900 Reputation: 28
31 / /
Joined: May 2006
|
RE: Visual C++ 6.0 DLLs
It is mangled. Click F10 in Dependency Walker to unmangle all function names.
If it wouldn't be mangled it would be:
This post was edited on 09-22-2007 at 09:43 PM by vikke.
|
|
09-22-2007 05:50 PM |
|
|
Mnjul
forum super mod
plz wub me
Posts: 5396 Reputation: 58
– / /
Joined: Nov 2002
Status: Away
|
RE: Visual C++ 6.0 DLLs
Does your DLL has a DllMain function?
|
|
09-22-2007 06:47 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
O.P. RE: Visual C++ 6.0 DLLs
code: BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
<Eljay> "Problems encountered: shit blew up"
|
|
09-22-2007 08:34 PM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|