I have some questions about dynamic and static libraries. I know that a dll is a dynamic library whose image is loaded into memory and all processes can call functions and use them. And .lib is just an archive of object files, is this really the case?
My Russian MASM64 package (link) uses .lib libraries which I include in my .asm file, the same name as the system dll. But these .lib files are not an archive of object files, they tell the program which functions from the dll I can call and the address to them? I can use dumpbin to dump exports from kernel32.dll, which is in my system32 and create a .def file for the list of exported functions, then create a lib file with the lib utility.
Also a question about .inc files, I know they are just analog of .h from C/C++ projects, then what is the difference between these entries:
includelib "user32.lib"
extern __imp_ActivateKeyboardLayout:qword
ActivateKeyboardLayout TEXTEQU <__imp_ActivateKeyboardLayout>
is written in the .inc files in my package. And if I write it myself in my program:
includelib "user32.lib"
ActivateKeyboardLayout PROTO
and everything will also work, what's the difference. Can I use dumpbin to create .lib files for each .dll as I described above and write PROTO in the .inc files for all functions?