How to call functions in a DLL?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Martin (martinvalley_at_comcast.net)
Date: 09/15/04


Date: Wed, 15 Sep 2004 06:38:25 -0700

How can I "call" functions in a 3rd-party DLL from my VB6 program?

In a separate project, I'm using some functionality provided as part
of PHP (server-side scripting) to create graphics files (.png and
.jpg). For those of you that might be familiar with it, it's called
"gd". This is open source software. The author of gd also makes this
functionality available as a Windows DLL. It's written in C and he
provides all of the source code. He says that the "...dll now uses the
__stdcall calling convention. This means the DLL is now compatible
with Visual BASIC and other languages that cannot handle the __cdecl
calling convention...".

I downloaded all of this stuff but I can't figure out how to use it. I
e-mailed the author asking for examples of its use in VB6 but he said
nothing was available and that I would have to write my own
"Declares". All of this is completely over my head - all I want to do
is use some of the functions.

Can someone tell me what I need to do here? I know WHICH functions I
need and I know HOW to use them (from working with them in PHP). But
I'm lost as to how to go about it in VB.

Help?



Relevant Pages

  • Re: using c++ 6.0 DLL in VB.Net program, passing user defined Type
    ... Previously I had a VB6 program that would pass a Type to a DLL ... Public Structure ListInfo ' structure to hold information about ... Dim FileIndex As Short ...
    (microsoft.public.dotnet.languages.vb)
  • using c++ 6.0 DLL in VB.Net program, passing user defined Type
    ... I have an old C++ DLL that I am wishing to use in a VB.NET program. ... Previously I had a VB6 program that would pass a Type to a DLL ... Dim FileIndex As Short ... My DLL does not like the new data type. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: php e c++
    ... dovrei far in modo di inviare un comando dalla pagina php ad una dll, ... I sort of deduct you want to know how to invoke a DLL from within a PHP ... function/method in the C++ program, ...
    (comp.lang.php)
  • Re: PHP has encountered an access violation...
    ... I uninstalled PHP 5.2.5 and installed 5.2.6. ... correct dll to be used...thus solving your problem and the related symptoms. ... IIS, i've run several web servers with it, private and commercial, and never ...
    (comp.lang.php)
  • Re: [PHP] Missing DLLs
    ... Is that something in PHP source that could be fixed to specify WHICH dll is really missing? ... I'm happy to put it in bugs.php.net as a feature request, if it's actually IN php, but don't want to waste the resources to mark it as junk if there's no way PHP could do that. ... It's been a while since I've done Windows development, but IIRC PHP will only be able to tell that the DLL could not be loaded, I don't believe Windows exposes exactly what the problem was. ... Because I can recall other times that you got the urge to hit your head on the keyboard multiple times in order to get over the fact that the problem that caused the error was so ...king obvious. ...
    (php.general)