calling unmanaged code in Win32 API

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hi!

When I looked in the doc for the Win32 API CreateCompatibleBitmap I saw
these two
Library Gdi32.lib
DLL Gdi32.dll

I know what a DLL is because that's what I use when callingWin32 API from
managed code but
what is the Gdi32.lib ?

//Tony
 
Hi Tony,

Tony Johansson wrote on 29.04.10
in microsoft.public.dotnet.languages.csharp
When I looked in the doc for the Win32 API CreateCompatibleBitmap I saw
these two
Library Gdi32.lib
DLL Gdi32.dll
I know what a DLL is because that's what I use when callingWin32 API from
managed code but
what is the Gdi32.lib ?

a lib file is an import library of functions that can be linked together
with other software. It is devided between static and dynamic libraries.
Static libraries include the full funstions where dynamic libraries just
include calls to the functions in a shared librare (the DLL in this case).

It is mainly used if you develop software in C or C++. After including the
header and linking with the lib file, you have direct access to the
functions (so you do not need to do anything else. Just call the function
directly!).

The .lib file is not required / used in .Net Development.

Maybe you find the description of
http://en.wikipedia.org/wiki/Dynamic-link_library#Import_libraries
helpfull.

With kind regards,

Konrad
 
When I looked in the doc for the Win32 API CreateCompatibleBitmap I saw
these two
Library Gdi32.lib
DLL Gdi32.dll

I know what a DLL is because that's what I use when callingWin32 API from
managed code but
what is the Gdi32.lib ?

Konrad explained in detail, but here's the short version: You only care
about the .lib files if you're using C/C++.
 
Back
Top