What is the relationship between the Windows API and the C runtime library?

What is the relationship between the Windows API and the C runtime library?

+3
source share
6 answers

In short: The Windows API contains all the functions specifically defined for Windows. The C runtime library contains all the functions that are required by standard C.

Physical libraries implementing these functions can be a single file (library), divided into two separate libraries or divided into many libraries, depending on the operating system and the actual API / service that you use.

For example, when creating files, the C standard includes a function:

fopen

for opening and creating files, etc., while the Win32 API (for example) defines functions such as:

CreateFile

. , , Windows, API Win32.

+6

C (msvcrt.dll, ). . API DLL ( user32.dll kernel32.dll). , Windows API - , .

, ocdecio , , C API . , , .

EDIT: DLL , , , :

kernel32.dll depends on:
  ntdll.dll

user32.dll depends on:
  gdi32.dll
  kernel32
  ntdll.dll
  advapi.dll
  msimg32.dll
  powerprof.dll (this dll references msvcrt.dll for some string functions)
  winsta.dll

msvcrt.dll depends on:
  kernel32.dll (yes it does have imports for CreateFileA)
  ntdll.dll

, , msvcrt API win32.

+4

Win32 - .

CRT - , C ++ (, printf cout).

Win32 - , Windows (, GetWindowText).

+4

:

  • API Windows - API, Microsoft Windows [TM].
  • C " ", C , / (, Unix)

:

  • , ++, Windows
  • Windows C Windows API ( , ..).
+1

C Windows API

0

Unix Windows API.

-2

All Articles