Thread View: comp.lang.pascal.delphi.misc
5 messages
5 total messages
Started by Cozimworsit
Wed, 13 Jun 2001 14:51
How to use an API contained within a .dll ?
Author: Cozimworsit
Date: Wed, 13 Jun 2001 14:51
Date: Wed, 13 Jun 2001 14:51
6 lines
1510 bytes
1510 bytes
I would like to get the values generated by windows' defaulft SNMP component (snmpapi.dll i think). How can I do that ? Actually I want to get the speed of data transfers over an ethernet interface (Total data transferred(ko) divided by time (s) ) So I need need to read the "Total data transferred" value.
Re: How to use an API contained within a .dll ?
Author: Bert Kortenbach
Date: Thu, 14 Jun 2001 11:55
Date: Thu, 14 Jun 2001 11:55
25 lines
2017 bytes
2017 bytes
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 ? Bert Cozimworsit <cozimworsit@e-wc.org> schreef in berichtnieuws 9g8049$stg$1@reader1.fr.uu.net... > I would like to get the values generated by windows' defaulft SNMP component > (snmpapi.dll i think). > How can I do that ? > Actually I want to get the speed of data transfers over an ethernet > interface (Total data transferred(ko) divided by time (s) ) So I need need > to read the "Total data transferred" value. > > >
Re: How to use an API contained within a .dll ?
Author: Cozimworsit
Date: Thu, 14 Jun 2001 14:41
Date: Thu, 14 Jun 2001 14:41
17 lines
1847 bytes
1847 bytes
"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) ?
Re: How to use an API contained within a .dll ?
Author: 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) ? > >
Re: How to use an API contained within a .dll ?
Author: Cozimworsit
Date: Tue, 19 Jun 2001 14:07
Date: Tue, 19 Jun 2001 14:07
20 lines
2214 bytes
2214 bytes
it's ok for the example, i managed to create and use my own test dll now I would like to know the name of the procedures/functions (and its parameter(s) if needed) in SNMPAPI.dll (18kb) to get the total bytes transferred (download and then upload) during a windows session... Do you know them ? Or a way to get them ? Or some documentation about it ? > 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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads