feustel@netcom.COM (David Feustel) (06/28/91)
I am trying to call a dll function from Visual Basic and am getting
a "Undefined function" message. The DLL is being generated using
Borland BCC compiler with -WD option. VB finds the DLL, it just can't
find the functions in the DLL. Does anyone know what's wrong?
=====================dll.cpp follows=======================
#include <windows.h>
#include <dos.h>
int FAR PASCAL LibMain
(HANDLE hInstance // DLL instance handle
,WORD wDataSeg // DS register value
,WORD cbHeapSize // size of local heap
,LPSTR lpCmdLine // far pointer to command line loading DLL
)
{
return 1;
}
unsigned char Myin(int portid)
{
return inportb(portid);
}
unsigned int Myinw(int portid)
{
return inport(portid);
}
int FAR PASCAL WEP(int nParameter)
{
return 1;
}
--
David Feustel, 1930 Curdes Ave, Fort Wayne, IN 46805, (219) 482-9631
EMAIL: feustel@netcom.com
I voted for Bush once. As it's turning out, once was once too often.