Article View: comp.lang.pascal.delphi.misc
Article #174Re: How to use an API contained within a .dll ?
From: Bert Kortenbach
Date: Mon, 18 Jun 2001 15:01
Date: Mon, 18 Jun 2001 15:01
37 lines
2641 bytes
2641 bytes
Hi, I could give you an example, but that is only a small part of the information you would need to get your DLL stuff up and running. I would be best to read the help file (Win API) for information on Getprocaddress e.t.c. Be aware of the fact that some DLL's use C calling conventions and others use Pascal calling conventions (stack responsebility). (Delphi help on 'stdcall' gives info on that issue). www.deja.com (now Goole) gives you access to a large hystorical database of this (and others) newsgroup. Bert Cozimworsit <cozimworsit@e-wc.org> schreef in berichtnieuws 9gajsu$5d3$1@reader1.fr.uu.net... > > "Bert Kortenbach" <bkortenbach.aut@rbk.NoSpam.nl> a οΏ½crit dans le message > news: 992519189.11551.0.pluto.d4ee8199@news.demon.nl... > > Hello, > > > > I would dynamically load the DLL with loadlibrary. If the DLL is found > > (handle <>0) I would try to get the adress of the functions contained > within > > the DLL by calling GetProcAddress. If GetProcAddress returns a valid > adress, > > I call the function and get the results I want... > > > > Is that what you mean ? > > > > Yes, could you give me an example (loadlibrary, getprocadress and using the > procedures contained in the dll) ? > >
Technical Details
Message-ID:
<992875926.22001.0.pluto.d4ee8199@news.demon.nl>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.nl!demon!rbkgroep2.demon.nl!not-for-mailReferences:
<9g8049$stg$1@reader1.fr.uu.net> <992519189.11551.0.pluto.d4ee8199@news.demon.nl> <9gajsu$5d3$1@reader1.fr.uu.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: fb362,f91095d43ffd9f8e X-Google-Attributes: gidfb362,public X-Google-Thread: fd817,f91095d43ffd9f8e X-Google-Attributes: gidfd817,public X-Google-Thread: 10baee,f91095d43ffd9f8e X-Google-Attributes: gid10baee,public X-Google-ArrivalTime: 2001-06-18 07:53:12 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!news.demon.nl!demon!rbkgroep2.demon.nl!not-for-mail From: "Bert Kortenbach" <bkortenbach.aut@rbk.NoSpam.nl> Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.internet,alt.comp.lang.borland-delphi Subject: Re: How to use an API contained within a .dll ? Date: Mon, 18 Jun 2001 17:01:31 +0200 Message-ID: <992875926.22001.0.pluto.d4ee8199@news.demon.nl> References: <9g8049$stg$1@reader1.fr.uu.net> <992519189.11551.0.pluto.d4ee8199@news.demon.nl> <9gajsu$5d3$1@reader1.fr.uu.net> NNTP-Posting-Host: rbkgroep2.demon.nl X-NNTP-Posting-Host: rbkgroep2.demon.nl:212.238.129.153 X-Trace: news.demon.nl 992875926 pluto:22001 NO-IDENT rbkgroep2.demon.nl:212.238.129.153 X-Complaints-To: abuse@nl.demon.net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Lines: 39