Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the relationship between the Windows API and the C run time library?

Tags:

c

winapi

What is the relationship between the Windows API and the C run time library?

like image 721
MainID Avatar asked Dec 03 '22 16:12

MainID


1 Answers

In a nutshell: The Windows API contains all the functions defined specifically for Windows. The C run-time library contains all the functions that are required by standard C.

The physical libraries that implement these functions may be a single file (library), split across two separate libraries or split into many libraries, depending on the operating system and the actual API/service you are using.

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

fopen

to open and create files, etc., while the Win32 API (for example) defines functions like:

CreateFile

to create and manipulate files. The first one will be available wherever a standard C run-time library is available while the second one will only be available on a Windows machine that supports the Win32 API.

like image 113
Jason Coco Avatar answered Apr 13 '23 01:04

Jason Coco