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 |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
To: | Danny Smith <danny_r_smith_2001 AT yahoo DOT co DOT nz> |
Cc: | cygwin AT cygwin DOT com |
Subject: | Re: Can open() from console app, not from dll |
From: | Massimiliano Mirra <mmirra AT libero DOT it> |
Date: | Wed, 02 Apr 2003 01:55:16 +0200 |
In-Reply-To: | <20030401233049.66728.qmail@web21408.mail.yahoo.com> (Danny |
Smith's message of "Wed, 2 Apr 2003 09:30:49 +1000 (EST)") | |
Message-ID: | <87d6k5n57f.fsf@prism.localnet> |
User-Agent: | Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 |
References: | <20030401233049 DOT 66728 DOT qmail AT web21408 DOT mail DOT yahoo DOT com> |
MIME-Version: | 1.0 |
Danny Smith <danny_r_smith_2001 AT yahoo DOT co DOT nz> writes: >> I am able to open a file and write into it from a console application, >> but the same fails when done from within a function that is stored in >> a DLL and called from a Visual Basic application. > > VB expects stdcall convention. > Try adding WINAPI to OpenSomething Hmmm. If I understand correctly, and it's to be written ``int WINAPI OpenSomething'', it seems that it becomes unable to even call the function: ``Can't find DLL entry point OpenSomething in foo.dll'' Maybe I should have made it clearer that simply calling DLL functions is working; it's when they contain an open() that they just crash. > You will also need to either munge your declaration in VB to match the > exported name The name in foo.c is OpenSomething, the name in foo.def if OpenSomething, the name in the VB source is OpenSomething. Is this what you mean? (Sorry if that's a dumb question. I'm totally oblivious of the VB side here, luckily it's not me working on that.) Thank you! Massimiliano -- 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 |