Can someone be nice and explain me how to make a dll with MS Visual C++ 6 (step by step)
I know C++, Im a newbie with vb but i know how to call funtion from a alredy make dll (like mcisendstring in winmm) so be nice and explain to me :)
Printable View
Can someone be nice and explain me how to make a dll with MS Visual C++ 6 (step by step)
I know C++, Im a newbie with vb but i know how to call funtion from a alredy make dll (like mcisendstring in winmm) so be nice and explain to me :)
Sorry,
You're too polite.
You have to be more obnoxious and demanding :)
- jamie
ok:
1. open vc++
2. create a win32 dll project (no MFC), choose the "simple dll" option in the dialog that you get
3. make a function; it must be declared like this:
extern "C" <returntype> __stdcall <funcname>(params)
{
//code
}
then:
open notepad, and enter info like this:
LIBRARY "<dllname.dll>"
EXPORTS
<Function1>
<Function2>
just list all the functions you want to export.
save this as "<projectname>.def" and then in vc++ go to Project->Add to Project->Files
and add your DEF file. then compile, and you should be able to call the functions from VB :)
There are other ways than using a DEF file, but I find this works, and it's not very complex to do.