If you want to implicitely load your dll (so, include the header files to your app and not call LoadLibrary and GetProcAddress), a lib file is needed. Dll and lib files are not so different, the only difference that I know is that the lib will be added to your app during the linkage of your app, and the dll will be added at run-time.
The .lib file is a file that has the stuff the linker needs to build your executable program. Windows cannot use them, but compilers and linkers can. Its a lot like a .obj file really, except it contains everything needed for all the stuff in your 'library' whereas an obj is from a single source file. It also contains a protocol for the associated .dll (basicaly, offsets of where functions start, the name and parameters(?) of the functions, calling conventions(?) and things like this).
A .dll can have a lot of different stuff -- data, functions, anything really. A dll that has shared routines is what the OS needs to run those routines -- compare this to a 'mini executable'. A program smoothly jumps from its own executable statements to the ones in the .dll and back again. Windows does some smoke and mirrors here to make the file loading efficient(ish).
"If you judge people, you have no time to love them."
Yup, he's(cedric) right. When you make use of the .lib file, you can call the function in the dll as if it's available as a location function. You don't need to go in for LoadLibrary , GetProcAddress which would otherwise become an "explicit" linking.
Quite, thank you.
Here we work with microcontroller, no windows stuff. We are using libs as well, and libs are really only a collection of .obj with a header and entry points for the linker (actually we also have a locator, this is the step you do not need with .dll).
I did not know about the fact that you can simply add a .lib to get direct access to the .dll.
On Windows Xp, there is a functionality that allows to copy the archives of an user. This functionality is had access through My Computer ( click of the right button of mouse ) -> Properties -> Advanced -> User Profiles -> Settings -> Copy to.
There is user called João. In the directory c:\documents and settings\João\ are the João user's files. I just want to copy them to another directory. This functionality, as i said, is had access by My Computer -> Properties -> Advanced -> User Profiles -> Settings -> Copy To, but i want do that by C++ programming.
I was thinking in something like a method of a WMI Class or the ShellExecute command.
I guess there *is* such a thing as a stupid question...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001