Share to: share facebook share twitter share wa share telegram print page

Windows Native API

The Native API is a lightweight application programming interface (API) used by Windows NT's kernel and user mode applications. This API is used in the early stages of Windows NT startup process, when other components and APIs are still unavailable. Therefore, a few Windows components, such as the Client/Server Runtime Subsystem (CSRSS), are implemented using the Native API. The Native API is also used by subroutines such as those in kernel32.dll that implement the Windows API, the API based on which most of the Windows components are created.

Most of the Native API calls are implemented in ntoskrnl.exe and are exposed to user mode by ntdll.dll. The entry point of ntdll.dll is LdrInitializeThunk. Native API calls are handled by the kernel via the System Service Descriptor Table (SSDT).

Function groups

The Native API comprises many functions. They include C runtime functions that are needed for a very basic C runtime execution, such as strlen(), sprintf(), memcpy() and floor(). Other common procedures like malloc(), printf(), scanf() are missing (the first because it does not specify a heap to allocate memory from and the second and third because they use the console, accessed only via KERNEL32.DLL). The vast majority of other Native API routines, by convention, have a 2 or 3 letter prefix, which is:

  • Nt or Zw are system calls declared in ntdll.dll and ntoskrnl.exe. When called from ntdll.dll in user mode, these groups are almost exactly the same; they execute an interrupt into kernel mode and call the equivalent function in ntoskrnl.exe via the SSDT. When calling the functions directly in ntoskrnl.exe (only possible in kernel mode), the Zw variants ensure kernel mode, whereas the Nt variants do not.[1] The Zw prefix does not stand for anything.[2]
  • Rtl is the second largest group of ntdll calls. These comprise the (extended) C Run-Time Library, which includes many utility functions that can be used by native applications, yet don't directly involve kernel support.
  • Csr are client-server functions that are used to communicate with the Win32 subsystem process, csrss.exe (csrss stands for client/server runtime sub-system).
  • Dbg are debugging functions such as a software breakpoint.
  • Ki are upcalls from kernel mode for events like APC dispatching.
  • Ldr are loader functions for PE file handling and starting of new processes.
  • Nls for National Language Support (similar to code pages).
  • Pfx for prefix handling.
  • Tp for threadpool handling.

user32.dll and gdi32.dll include several other calls that execute an interrupt into kernel mode. These were not part of the original Windows NT design, as can be seen in Windows NT 3.5. However, due to performance issues of hardware of that age, it was decided to move the graphics subsystem into kernel mode. As such, system call in the range of 0x1000-0x1FFF are satisfied by win32k.sys (instead of ntoskrnl.exe as done for 0-0x0FFF), and are declared in user32.dll and gdi32.dll. These functions have the NtUser and NtGdi prefix (e.g. NtUserLockWorkStation and NtGdiEnableEudc).

Uses

Uses of Native API functions includes but not limited to:

  • Enabling and disabling privileges (RtlAdjustPrivilege)
  • Creating remote threads within processes that are running in different session (RtlCreateUserThread)
  • Running native applications (RtlCreateUserProcess)
  • Performing a forced shutdown (NtShutdownSystem)
  • Causing a BSOD in User mode (NtRaiseHardError)
  • Displaying a string in Native Mode (NtDisplayString)

See also

References

  1. ^ The NT Insider (August 27, 2003). "Nt vs. Zw - Clearing Confusion On The Native API". OSR Online. 10 (4). OSR Open Systems Resources. Retrieved 2013-09-16.
  2. ^ Raymond Chen (2009). "The Old New Thing : What does the "Zw" prefix mean?". Microsoft Corporation. Retrieved 2009-06-13.

Read other articles:

William PaleyWilliam Paley (1743–1805)LahirJuli 1743Peterborough, InggrisMeninggal25 Mei 1805Bishopwearmouth, InggrisTempat tinggalInggrisKebangsaanInggrisAlmamaterChrist's College, CambridgeDikenal atasBerkontribusi pada filsafat moral, filsafat politik, etik dan filsafat agamaPenghargaanMembers' Prize, Cambridge, 1765Karier ilmiahBidangteologi alamInstitusiGiggleswick Grammar School, Christ's College, Cambridge, Giggleswick Parish, Katedral Carlisle, Katedral Lincoln, Katedral Durham Will...

Tezuka Productions Co., Ltd. 株式会社手塚プロダクション Tipo Kabushiki gaishaIndustria Estudio de animaciónGénero AnimaciónForma legal kabushiki gaishaFundación 29 de enero de 1968 (55 años)Fundador Osamu TezukaSede central Shinjuku, Tokio, Japón Presidente Takayuki MatsutaniDirector Rumiko TezukaMakoto TezukaProductos Anime (OVAS y Películas)Capital social 20 millones de yenesCoordenadas 35°42′34″N 139°41′51″E / 35.709583333333, 139.69738888...

حفل توزيع جوائز الأوسكار ال85 ملصق الحفل التاريخ 24 فبراير 2013  المكان مسرح دولبي  البلد  الولايات المتحدة المضيف سيث ماكفارلن الموقع الرسمي الموقع الرسمي  حفل توزيع جوائز الأوسكار الرابع والثمانون  حفل توزيع جوائز الأوسكار السادس والثمانون  تعديل مصدري - تعد...

Espejo frontal El espejo frontal es un instrumento propio de sí mismo de la otorrinolaringología que consiste en un espejo cóncavo con un agujero que el explorador se sujeta en la cabeza mediante una cinta. Se usa para concentrar y orientar los rayos luminosos procedentes de una fuente externa hacia una cavidad (típicamente la cavidad oral) y permitir simultáneamente su examen, sin producir sombras. Con la aparición de otros instrumentos (fibroscopio, otoscopio, linternas tipo lápiz), ...

مركز أبحاث توماس جون واتسونمعلومات عامةجزء من آي بي إم ريسيرش سُمِّي باسم توماس جون واتسون، الأب البلد الولايات المتحدة تقع في التقسيم الإداري مقاطعة ويستتشستر، نيويورك المكان يوركتاون هايهتس (نيويورك) الإحداثيات 41°12′37″N 73°48′11″W / 41.2102°N 73.803°W / 41.2102; -73.803 الم...

Abies fanjingshanensis Охоронний статус Під загрозою зникнення (МСОП 3.1) Біологічна класифікація Царство: Рослини (Plantae) Клада: Судинні рослини (Tracheophyta) Клада: Голонасінні (Gymnosperms) Відділ: Хвойні (Pinophyta) Клас: Хвойні (Pinopsida) Порядок: Соснові (Pinales) Родина: Соснові (Pinaceae) Рід: Ялиця (Abies) Ви...

احتجاجات بابوا 2019 محتجون في سارمي التاريخ 19 أغسطس 2019 – مستمرة(4 سنوات، و3 شهور، و6 أيام) المكان عدة مدن من بابوا وبابوا الغربية الأسباب حركة لأجل استقلال بابواحوادث عنصرية في سورابايا الأطراف حركة بابوا الحرةطلاب بابويين إندونيسيا الشرطة الإندونيسية الجيش الإندون...

Мелвілл англ. Melville Island oil sands Названо на честь МелвіллТип geological depositdВходить до Bjorne FormationdКраїна  Канада Регіон Нунавут Ме́лвілл (Нафтоносні піски острова Мелвілл; англ. Melville Island oil sands) — друге після Атабаски унікальне родовище бітумінозних пісків у Канаді. За запасами...

Абхазія — термін, який має кілька значень. Ця сторінка значень містить посилання на статті про кожне з них.Якщо ви потрапили сюди за внутрішнім посиланням, будь ласка, поверніться та виправте його так, щоб воно вказувало безпосередньо на потрібну статтю.@ пошук посилань са

Ebensfeld Lambang kebesaranLetak Ebensfeld di Lichtenfels NegaraJermanNegara bagianBayernWilayahOberfrankenKreisLichtenfelsPemerintahan • MayorBernhard Storath (CSU)Luas • Total68,73 km2 (2,654 sq mi)Ketinggian255 m (837 ft)Populasi (2013-12-31)[1] • Total5.596 • Kepadatan0,81/km2 (2,1/sq mi)Zona waktuWET/WMPET (UTC+1/+2)Kode pos96250Kode area telepon09573Pelat kendaraanLIFSitus webwww.ebensfeld.de Eben...

OceanoAtlântico OceanoPacífico Região Norte Região Nordeste Região Centro-Oeste Região Sudeste Região Sul Acre Amazonas Pará Roraima Amapá Rondônia Tocantins Maranhão Bahia Piauí Ceará Rio Grandedo Norte Paraíba Pernambuco Alagoas Sergipe Mato Grosso Mato Grossodo Sul DistritoFederal Goiás Minas Gerais São Paulo Rio de Janeiro Espírito Santo Paraná Santa Catarina Rio Grandedo Sul Argentina Bolívia Chile Colômbia Guiana Francesa Guiana Paraguai Peru Suriname Uruguai Venezue...

Даріо Шимич Особисті дані Народження 12 листопада 1975(1975-11-12)[1][2][3] (48 років)   Загреб, Соціалістична Республіка Хорватія, СФРЮ Зріст 177 см Вага 76 кг Громадянство  Хорватія Позиція захисник Юнацькі клуби «Динамо» (Загреб) Професіональні клуби* Роки Клуб І (...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Oktober 2022. Kintamani adalah roman yang dikarang oleh Imam Supardi dan diterbitkan tahun 1932 oleh Balai Pustaka. Roman ini mengisahkan tentang cinta seorang pemuda kepada kekasihnya yang telah menikah dengan orang lain. Keduanya akhirnya mencapai pernikahan. Lata...

Caracas Aeropuerto Internacional de Maiquetía - Simón Bolívar Predefinição:Info/Aeroporto IATA: CCS - ICAO: SVMI Características Tipo Público Administração Instituto Nacional de Aeronáutica Civil Serve Caracas, Venezuela Localização Maiquetía, La Guaira, Venezuela Inauguração 1945 Coordenadas 10° 36' 11 N 66° 59' 26 O Altitude 72 m (236 ft) Movimento de 2015 Passageiros 12.000.000 passageiros Website oficial Página oficial Mapa SVMILocal do aeroporto Pistas C...

1st Lancashire Artillery VolunteersLancashire & Cheshire RGA524th (Lancashire & Cheshire) Coast Rgt, RA420th (Lancashire & Cheshire) Coast Rgt, RA19th Century waistbelt of the Lancashire Volunteer ArtilleryActive1859–1956Country United KingdomBranch Volunteer Force/Territorial ArmyRoleCoastal artilleryPart ofMersey Fire CommandGarrison/HQLiverpoolNickname(s)'Brown's Corps'EngagementsWorld War IWorld War IIMilitary unit The 1st Lancashire Artillery Volunteers (1st LAV),...

Este artículo o sección necesita referencias que aparezcan en una publicación acreditada.Este aviso fue puesto el 23 de marzo de 2021. Los llamados grandes del fútbol uruguayo son tradicionalmente los clubes Nacional y Peñarol. Esta denominación comenzó a utilizarse en el comienzo del profesionalismo, adoptándola por la influencia del fútbol argentino, en donde se popularizó la denominación de los cinco grandes del fútbol argentino. Si bien a lo largo de la historia es indiscutibl...

Building in Karachi, Pakistan 24°50′59″N 67°00′20″E / 24.84972°N 67.00556°E / 24.84972; 67.00556Habib Bank Plazaحبیب بینک پلازہHabib Bank PlazaGeneral informationTypeBankLocationKarachi, PakistanAddressI. I. Chundrigar Road, Karachi-75650CountryPakistanConstruction started1963Construction stopped1969Completed1971 [1]OwnerHabib Bank Ltd (49%), AKFED (51%)HeightRoof101 m (331 ft)[2]Technical detailsFloor count22[3 ...

1997 video gameMonopoly Star WarsDeveloper(s)Artech StudiosPublisher(s)Hasbro InteractiveSeriesMonopolyStar WarsPlatform(s)Microsoft WindowsReleaseOctober 21, 1997[1]Genre(s)Strategy, board game Monopoly Star Wars is the 1997 Monopoly franchise Star Wars video game based on the board game and set in the Star Wars fictional universe. It is one of many Monopoly video game adaptions. The game was developed by Artech Studios and published by Hasbro Interactive. It was released exclusively...

Untuk atlet renang Paralimpiade, lihat Yizhar Cohen (perenang). Izhar CohenLahir13 Maret 1951 (umur 72)Tel Aviv, IsraelGenrepopPekerjaanPenyanyi-penulis lagu, pemeran, artis perhiasan.InstrumenVokalArtis terkaitAlphabetaSitus webwww.izhar-cohen.eu.pn Izhar Cohen (Ibrani: יזהר כהן; lahir 13 Maret 1951) adalah seorang penyanyi Israel. Ia memenangkan Kontes Lagu Eurovision 1978. Kehidupan pribadi Cohen lahir di Tel Aviv, Israel, dan dibesarkan di Giv'atayim, dari keluarga penyany...

Đối với các định nghĩa khác, xem Molise (định hướng). Molise—  Vùng của Ý  — Hiệu kỳHuy hiệuMoliseQuốc giaÝThủ phủCampobassoChính quyền • Thủ hiếnPaolo Di Laura Frattura (Đảng Dân chủ)Diện tích • Tổng cộng4.438 km2 (1,714 mi2)Dân số (ngày 1 tháng 1 năm 2015) • Tổng cộng313.348 • Mật độ71/km2 (180/mi2)Tên cư dânMol...

Kembali kehalaman sebelumnya