This is the mail archive of the
mailing list for the Cygwin project.
RE: DLL And Visual Basic
- From: "Roth, Kevin P." <KPRoth at MarathonOil dot com>
- To: "Tim" <tjbynum at swbell dot net>,<cygwin at cygwin dot com>
- Date: Mon, 21 Jan 2002 11:47:10 -0500
- Subject: RE: DLL And Visual Basic
FWIW - when following exactly the recipe you provided, mine worked OK.
small changes though:
You had this in your VB form:
Private Declare Function doit Lib "bar.dll" (ByVal ...
However, since the function's name in MyTest.c is testit (not doit), I
Alias "testit", like:
Private Declare Function doit Lib "bar.dll" Alias "testit" (ByVal ...
Second: your script builds "MyTest.dll", not "bar.dll", so I changed
Private Declare Function doit Lib "MyTest.dll" Alias "testit" (ByVal
Third - you called your test function from within Form_Load. This will
(normally) run once for any particular form. So, I added a button to
form, and moved "i = doit(100)" into the new Button1_Click function.
Works perfectly for me...
You might try compiling to an .EXE and running that, instead of running
inside the VB debugger...
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html