I could tell you how to do it in ms visual c++4 if thats ok?
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
Ill get back to you but it may be a while as I will have to reinstall the software to check it out first - ok?
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
in VC++ 6.0 IDE create a "win32 Dynamic-Link Library" project. Step 1 of the wizard has 3 radiao buttons select "a DLL project that exports some symbols" then press Finish button. The wizard will generate the DLL project. Look at the *.cpp and *.h files. They will show you how to add your own functions and how to "export" them so that they can be used by other applications. Just copy-past the functions or files into that project, export them as illusterated.
Ancient Dragon
Retired & Loving It
30,047 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,342
How are you using the DLL'S? You cant just call them and pass arguments like you would an .EXE file.
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600
sounds like the function names in the dll have been mangled, so mathlib doesn't know how to handle that. In the dll, use extern "C" if you don't need c++ classes to keep the compiler from mangling the names.
extern "C"
{
void _dllexport foo();
}
DllMain() is called by the os, not directly by using applications. Its sortof like a c++ class constructor/destructor in that it is called then the DLL is loaded into memory and again just before exit.
Ancient Dragon
Retired & Loving It
30,047 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,342
Sorry but I cant figure it out for you as I cant install VC++ 4 on my XP machine as it wants to install IE 1 and says I dont have it. If I click cancel install aborts and I cant just copy the files.
jbennet
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,820
Solved Threads: 600