call winapi


Hi,
When I call the function from WinAPI MessageBox (after I add Windows.h), the compiler automatically will add User32.lib library?
(http://msdn.microsoft.com/en-us/library/windows/desktop/ms645505 (v = VS.85). aspx)
Or how does it work?
Sorry for bad English
It specifies User32.lib and User32.DLL. .lib files are really only used by MS Visual Studio as a way of statically linking libraries. The other option is to dynamically link the libraries using a DLL (Dynamic link library).

Now check C:/Windows/System32/ for User32.dll. It's probably there. C:/Windows/System32 is pointed to by the PATH environment variable which means that when Windows looks for the DLL, it will look in system32 in addition to your current directory.

Really this means that when you include Windows.h, you are not necessarily adding a massive static library to your exe. Depending on your compiler and setup, you may be simply referring to a dynamic library that already exists on every windows system.
Great, thank you
Topic archived. No new replies allowed.