Hi all.
I use Borland C++ 5.02 and i want to use some features of a *.dll in my program. I dont know how to make this library available in my code.
Please help me.
Thanks a lot.
Hi all.
I use Borland C++ 5.02 and i want to use some features of a *.dll in my program. I dont know how to make this library available in my code.
Please help me.
Thanks a lot.
A DLL is a runtime library. If all you have is a DLL, you won't be able to use its code. You need a static library to link your program with. These static libraries are often called library.lib, or liblibrary.a.
What DLL do you wish to use? Is the code for it freely available?
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
You can use a DLL dynamically without a lib file by loading it into memory with the LoadLibrary() function, and then assigning a function pointer to the result of GetProcAddress(). This will give you the address of the function you wish to call. Go ahead and call it with the function pointer.
If you don't know how to handle function pointers or things like that, this is probably too advanced for you at present. If, however, you're comfortable with those elements of C, then check out on MSDN as to how to use DLLs this way.
Is that right? That's interesting . . . Do those functions exist in Borland C++?
Of course, unless you had a header file, you wouldn't be able to use macros and stuff like that that might make using the library easier.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
I can tell, because of your reference to MSDN . . . but I've never used Borland C++, and I wasn't sure if the said compiler would support those Windows functions.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
If it's important, I can test it later perhaps, but I don't see a reason why they wouldn't support it. I know Borland's stuff supported various Windows API functions from past programs I've written with it, so again, I would expect these functions to be supported as well.