C # and API

Source: Internet
Author: User

Application Programming Interface is a set of commands, which interfaces the programs with the processors. the most commonly used set of external procedures are those that make up Microsoft Windows itself. the Windows API contains thousands of functions, structures, and constants that you can declare and use in your projects. those functions are written in the C language, however, so they must be declared before you can use them. the declarations for DLL procedures can become fairly complex. specifically to C # it is more complex than VB. you can use API viewer tool to get API function declaration but you have to keep in mind the type of parameter which is different in C #.

API (Application Programming Interface) is a set of commands for the program and processor interfaces. The most common method is to call Microsoft WINDOWS internal processes externally. WINDOWS APIs include thousands of functions, structures, and constants that you can use. These functions are written in C language. You must declare them before using them. Defining a Dll process can be quite complex, or even more complex than VB. You can use the API Viewer tool to get the declaration of API functions, but it must be noted that its parameter type is different from that of C.

Most of the advanced programming ages support API programming. the Microsoft Foundation Class Library (MFC) framework encapsulates a large portion of the Win32 (API ). odbc api Functions are useful for faster Ming fast operations on database. with API your application can request lower-level services to perform on computers operating system. as API supports thousands of functionality from simple Message Box to Encryption or Remote computing, developers shoshould know how to implement API in their program.

Most advanced Languages Support APIs. Microsoft function library (MFC) encapsulates most Win32 APIs. ODBC APIs greatly improve the database operation speed. By using APIs, you can request more underlying system services. APIs are supported from simple dialogs to complex encryption operations. Developers should know how to use APIs in their programs

API has polictypes depending on OS, processor and functionality.

There are many types of APIS (for different operating systems, processors ............)

OS specific API:

Operating System-specific APIs:

Each operating system has common set of APIs and some special e.g. windows NT supports MS-DOS, Win16, Win32, POSIX (Portable Operating System Interface), OS/2 console API and Windows 95 supports MS-DOS, Win16 and Win32 APIs,

Each operating system has a set of public APIs and proprietary APIs. For example: Windows NT supports MS-DOS, Win16, Win32, POSIX (Portable Operating System Interface), OS/2 console API; While Windows 95 supports MS-DOS, Win16 and Win32 API.

Win16 and Win32 APIs:

Win16 is an API created for 16-bit processor and relies on 16 bit values. It has platform independent nature e.g. you can tie Win16 programs to MS-DOS feature like TSR programs.

WIN16 is a 16-bit processor that uses a 16-bit value. It is an independent platform. For example, you can run a TSR program in a MS-DOS environment.

Win32 is an API created for 32-bit processor and relies on 32 bit values. It is portable to any operating system, wide range of processors and platform independent nature.

WIN32 is a 32-bit processor and uses a 32-bit value. It can be used in any operating system and is widely used.

Win32 API has 32 prefix after the library name e.g. KERNEL32, USER32 etc?

Win32 api dll generally has a 32 suffix, such as KERNEL32 and USER32.

All APIs are implemented using 3 Libraries.

All APIs are implemented in the following three DLL files.

      • Kernel
      • User
      • GDI
1. KERNEL

It is the library named KERNEL32.DLL, which supports capabilities that are associated with OS such

Its database name is KERNEL32.DLL, which is an API set managed by the operating system

    • Process loading. Load the Process
    • Context switching.
    • File I/O. File Operations
    • Memory management. Memory management

E.g.GlobalMemoryStatusFunction obtains information about the systems current usage of both physical and virtual memory

For example:GlobalMemoryStatusFunction to obtain the usage information of the Physical Virtual Memory of the system.

2. USER

This is the library named "USER32.DLL" in Win32.

In WIN32, its database name is USER32.DLL

This allows managing the entire user interfaces such

It manages all user interfaces, such:

    • Windows
    • <

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.