delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MimeOLE: | Produced By Microsoft Exchange V6.0.4712.0 |
content-class: | urn:content-classes:message |
MIME-Version: | 1.0 |
Subject: | RE: DLL And Visual Basic |
Date: | Mon, 21 Jan 2002 11:47:10 -0500 |
Message-ID: | <6EB31774D39507408D04392F40A10B2BC1FEE8@FDYEXC202.mgroupnet.com> |
X-MS-Has-Attach: | |
X-MS-TNEF-Correlator: | |
Thread-Topic: | DLL And Visual Basic |
Thread-Index: | AcGim0XI1xhOfjE3RuCwX+6+5C7sRg== |
From: | "Roth, Kevin P." <KPRoth AT MarathonOil DOT com> |
To: | "Tim" <tjbynum AT swbell DOT net>, <cygwin AT cygwin DOT com> |
X-OriginalArrivalTime: | 21 Jan 2002 16:47:12.0158 (UTC) FILETIME=[460703E0:01C1A29B] |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id g0LGlWW14854 |
FWIW - when following exactly the recipe you provided, mine worked OK. Three 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 added 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 again: Private Declare Function doit Lib "MyTest.dll" Alias "testit" (ByVal ... Third - you called your test function from within Form_Load. This will only (normally) run once for any particular form. So, I added a button to your 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... --Kevin -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |