This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can open() from console app, not from dll

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

``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!


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]