🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13203

Visual Basic/BCC DLL Problem

#13203
From: David Feustel
Date: Fri, 28 Jun 1991 02:10
40 lines
1332 bytes
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.
Technical Details
Message-ID: <1991Jun28.021052.27948@netcom.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!netcomsv!feustel

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!apple!netcomsv!feustel
From: feustel@netcom.COM (David Feustel)
Newsgroups: comp.windows.ms
Subject: Visual Basic/BCC DLL Problem
Message-ID: <1991Jun28.021052.27948@netcom.COM>
Date: 28 Jun 91 02:10:52 GMT
Organization: DAFCO - An OS/2 Oasis
Lines: 40