Showing preview only (633K chars total). Download the full file or copy to clipboard to get everything.
Repository: amdf/NativeShell
Branch: master
Commit: 4e081c66ac69
Files: 70
Total size: 607.5 KB
Directory structure:
gitextract_ic8dbz2h/
├── .github/
│ └── workflows/
│ ├── build.yml
│ └── release.yml
├── .gitignore
├── CONTRIBUTORS.md
├── LICENSE
├── README.md
├── display.c
├── file.c
├── hardware.c
├── input.c
├── install/
│ ├── add.reg
│ └── remove.reg
├── keytrans.c
├── main.c
├── makefile
├── ndk/
│ ├── arch/
│ │ ├── ketypes.h
│ │ └── mmtypes.h
│ ├── asm.h
│ ├── cctypes.h
│ ├── cmfuncs.h
│ ├── cmtypes.h
│ ├── dbgkfuncs.h
│ ├── dbgktypes.h
│ ├── exfuncs.h
│ ├── extypes.h
│ ├── halfuncs.h
│ ├── haltypes.h
│ ├── i386/
│ │ ├── ketypes.h
│ │ └── mmtypes.h
│ ├── ifssupp.h
│ ├── inbvfuncs.h
│ ├── inbvtypes.h
│ ├── iofuncs.h
│ ├── iotypes.h
│ ├── kdfuncs.h
│ ├── kdtypes.h
│ ├── kefuncs.h
│ ├── ketypes.h
│ ├── ldrfuncs.h
│ ├── ldrtypes.h
│ ├── lpcfuncs.h
│ ├── lpctypes.h
│ ├── mmfuncs.h
│ ├── mmtypes.h
│ ├── ntndk.h
│ ├── ntnls.h
│ ├── obfuncs.h
│ ├── obtypes.h
│ ├── pofuncs.h
│ ├── potypes.h
│ ├── powerpc/
│ │ ├── ketypes.h
│ │ └── mmtypes.h
│ ├── psfuncs.h
│ ├── pstypes.h
│ ├── readme.txt
│ ├── rtlfuncs.h
│ ├── rtltypes.h
│ ├── sefuncs.h
│ ├── setypes.h
│ ├── umfuncs.h
│ └── umtypes.h
├── ntfile.c
├── ntfile.h
├── ntreg.c
├── ntreg.h
├── precomp.h
├── process.c
├── shell.c
├── sources
└── sysinfo.c
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/build.yml
================================================
name: Build with WDK 7.1.0
on:
workflow_dispatch:
workflow_call:
jobs:
build:
name: Build
runs-on: windows-latest
steps:
- name: Cache WDK
id: cache-wdk-installed
uses: actions/cache@v3
env:
cache-name: cache-wdk-7.1.0-installed
with:
path: C:\WinDDK\7600.16385.1
key: ${{ env.cache-name }}
- if: ${{ steps.cache-wdk-installed.outputs.cache-hit != 'true' }}
name: Download WDK 7.1.0.7600
run: (New-Object Net.WebClient).DownloadFile("https://download.microsoft.com/download/4/A/2/4A25C7D5-EFBE-4182-B6A9-AE6850409A78/GRMWDK_EN_7600_1.ISO", "${{ github.workspace }}\GRMWDK_EN_7600_1.ISO")
- if: ${{ steps.cache-wdk-installed.outputs.cache-hit != 'true' }}
name: Install 7zip
run: choco install 7zip
- if: ${{ steps.cache-wdk-installed.outputs.cache-hit != 'true' }}
name: Unpack ISO
run: 7z.exe x -y -o"${{ github.workspace }}" "${{ github.workspace }}\GRMWDK_EN_7600_1.ISO"
- if: ${{ steps.cache-wdk-installed.outputs.cache-hit != 'true' }}
name: Setup WDK 7.1.0.7600
run: .\KitSetup.exe /install ALL /ui-level EXPRESS
shell: cmd
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'srcdir'
- name: Build project x86
run: |
C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1 fre x86 WXP && D: && cd ${{ github.workspace }}\srcdir && build /g /w
shell: cmd
- name: Build project x64
run: |
C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1 fre x64 WIN7 && D: && cd ${{ github.workspace }}\srcdir && build /g /w
shell: cmd
- name: Upload artifact i386
uses: actions/upload-artifact@v4
with:
name: nativeshell-i386
path: |
${{ github.workspace }}\srcdir\objfre_wxp_x86\i386\native.exe
${{ github.workspace }}\srcdir\install\*
${{ github.workspace }}\srcdir\README.md
retention-days: 1
- name: Upload artifact amd64
uses: actions/upload-artifact@v4
with:
name: nativeshell-amd64
path: |
${{ github.workspace }}\srcdir\objfre_win7_amd64\amd64\native.exe
${{ github.workspace }}\srcdir\install\*
${{ github.workspace }}\srcdir\README.md
retention-days: 1
================================================
FILE: .github/workflows/release.yml
================================================
name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
uses: ./.github/workflows/build.yml
release:
needs: build
name: Release
runs-on: ubuntu-latest
steps:
- name: Create release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
body: NT native executable and install files
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Download i386 binary
uses: actions/download-artifact@v4
with:
name: nativeshell-i386
path: ${{ github.workspace }}/i386
- name: Prepare release i386 binary
working-directory: ${{ github.workspace }}/i386
run: zip -r --junk-paths nativeshell.zip ./*
- name: Release i386 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/i386/nativeshell.zip
asset_name: nativeshell-${{ github.ref_name }}.i386.zip
asset_content_type: application/zip
- name: Download amd64 binary
uses: actions/download-artifact@v4
with:
name: nativeshell-amd64
path: ${{ github.workspace }}/amd64
- name: Prepare release amd64 binary
working-directory: ${{ github.workspace }}/amd64
run: zip -r --junk-paths nativeshell.zip ./*
- name: Release amd64 binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/amd64/nativeshell.zip
asset_name: nativeshell-${{ github.ref_name }}.amd64.zip
asset_content_type: application/zip
================================================
FILE: .gitignore
================================================
.vscode
*.log
objfre_wxp_x86
objfre_win7_amd64
*.err
*.wrn
*.cmd
================================================
FILE: CONTRIBUTORS.md
================================================
- Alex Ionescu (the original creator)
- amdf
- ReactOS Team (keyboard translation code parts)
- Dmitri Arkhangelski (code parts from ZenWINX library)
================================================
FILE: LICENSE
================================================
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
================================================
FILE: README.md
================================================
# NativeShell
Command line interface for Windows Native Mode.
It can perform some basic operations with Windows files and directories.
Program runs before starting of main Windows components, so it has access to the entire file system and registry without many restrictions.
All operations are implemented through the Native API (ntdll.dll).
The sources are based on NCLI (Native Command Line Interface) from the TinyKRNL Project. A code from ZenWINX library partially used.
## Requirements
Windows Driver Kit Version 7.1.0
## Build
Build command for WDK x86 Free Build Environment:
`build /g /w`
Build output is native.exe.
# Install
Copy native.exe to %systemroot%\system32\
Use add.reg from `install` directory.
# Uninstall
Use remove.reg from `install` directory.
Delete %systemroot%\system32\native.exe
================================================
FILE: display.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: display.c
* DESCRIPTION: This module handles displaying output to screen.
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
WCHAR DisplayBuffer[1024];
USHORT LinePos = 0;
WCHAR PutChar[2] = L" ";
UNICODE_STRING CharString = {2, 2, PutChar};
/*++
* @name RtlCliPrintString
*
* The RtlCliPrintString routine display a unicode string on the display device
*
* @param Message
* Pointer to a unicode string containing the message to print.
*
* @return STATUS_SUCCESS or failure code.
*
* @remarks None.
*
*--*/
NTSTATUS
RtlCliPrintString(IN PUNICODE_STRING Message)
{
ULONG i;
NTSTATUS Status;
for (i = 0; i < (Message->Length / sizeof(WCHAR)); i++)
{
Status = RtlCliPutChar(Message->Buffer[i]);
}
return Status;
}
/*++
* @name RtlCliPutChar
*
* The RtlCliPutChar routine displays a character.
*
* @param Char
* Character to print out.
*
* @return STATUS_SUCCESS or failure code.
*
* @remarks None.
*
*--*/
NTSTATUS
RtlCliPutChar(IN WCHAR Char)
{
// Initialize the string
CharString.Buffer[0] = Char;
// Make sure that this isn't backspace
if (Char != '\r')
{
// Check if it's a new line
if (Char == '\n')
{
// Reset the display buffer
LinePos = 0;
DisplayBuffer[LinePos] = UNICODE_NULL;
}
else
{
// Add the character in our buffer
DisplayBuffer[LinePos] = Char;
LinePos++;
}
}
// Print the character
return NtDisplayString(&CharString);
}
/*++
* @name RtlClipBackspace
*
* The RtlClipBackspace routine handles a backspace command.
*
* @param None.
*
* @return STATUS_SUCCESS or failure code if printing failed.
*
* @remarks Backspace is handled by printing the previous string minus the last
* two characters.
*
*--*/
NTSTATUS
RtlClipBackspace(VOID)
{
UNICODE_STRING BackString;
// Update the line position
LinePos--;
// Finalize this buffer and make it unicode
DisplayBuffer[LinePos] = ANSI_NULL;
RtlInitUnicodeString(&BackString, DisplayBuffer);
// Display the buffer
return NtDisplayString(&BackString);
}
NTSTATUS
__cdecl RtlCliDisplayString(IN PCH Message, ...)
{
va_list MessageList;
PCHAR MessageBuffer;
UNICODE_STRING MessageString;
NTSTATUS Status;
MessageBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, 512);
// First, combine the message
va_start(MessageList, Message);
_vsnprintf(MessageBuffer, 512, Message, MessageList);
va_end(MessageList);
// Now make it a unicode string
RtlCreateUnicodeStringFromAsciiz(&MessageString, MessageBuffer);
// Display it on screen
Status = RtlCliPrintString(&MessageString);
// Free Memory
RtlFreeHeap(RtlGetProcessHeap(), 0, MessageBuffer);
RtlFreeUnicodeString(&MessageString);
return Status;
}
================================================
FILE: file.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: file.c
* DESCRIPTION: This module implements commands for dealing with files and directories.
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
/*++
* @name RtlCliGetCurrentDirectory
*
* The RtlCliGetCurrentDirectory routine provides a way to get the current
* directory.
*
* @param CurrentDirectory
* The current directory.
*
* @return ULONG
*
* @remarks Documentation for this routine needs to be completed.
*
*--*/
ULONG
RtlCliGetCurrentDirectory(IN OUT PWSTR CurrentDirectory)
{
return RtlGetCurrentDirectory_U(MAX_PATH * sizeof(WCHAR),
CurrentDirectory);
}
/*++
* @name RtlCliSetCurrentDirectory
*
* The RtlCliSetCurrentDirectory routine provides a way to change the current
* directory.
*
* @param Directory
* The directory to change to.
*
* @return NTSTATUS
*
* @remarks Documentation for this routine needs to be completed.
*
*--*/
NTSTATUS
RtlCliSetCurrentDirectory(PCHAR Directory)
{
WCHAR buf[MAX_PATH];
UNICODE_STRING us;
if (NULL == Directory)
{
return STATUS_UNSUCCESSFUL;
}
// Full path contains at least two symbols, the second is ':'
if (strnlen(Directory, MAX_PATH) >= 2 && Directory[1] == ':')
{
RtlCreateUnicodeStringFromAsciiz(&us, Directory);
RtlSetCurrentDirectory_U(&us);
RtlFreeUnicodeString(&us);
return STATUS_SUCCESS;
}
GetFullPath(Directory, buf, TRUE);
RtlInitUnicodeString(&us, buf);
RtlSetCurrentDirectory_U(&us);
return STATUS_SUCCESS;
}
VOID RtlCliDumpFileInfo(PFILE_BOTH_DIR_INFORMATION DirInfo)
{
PWCHAR Null;
WCHAR Save;
TIME_FIELDS Time;
CHAR SizeString[16];
WCHAR ShortString[12 + 1];
WCHAR FileString[MAX_PATH + 1];
WCHAR FileStringSize[100];
WCHAR ShortStringSize[100];
UINT file_size = 0;
UINT short_size = 0;
// The filename isn't null-terminated, and the next structure follows
// right after it. So, we save the next char (which ends up being the
// NextEntryOffset of the next structure), then temporarly clear it so
// that the RtlCliDisplayString can treat it as a null-terminated string
Null = (PWCHAR)((PBYTE)DirInfo->FileName + DirInfo->FileNameLength);
Save = *Null;
*Null = 0;
// Get the last access time
RtlSystemTimeToLocalTime(&DirInfo->CreationTime, &DirInfo->CreationTime);
RtlTimeToTimeFields(&DirInfo->CreationTime, &Time);
// Don't display sizes for directories
if (!(DirInfo->FileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
sprintf(SizeString, "%d", DirInfo->AllocationSize.LowPart);
}
else
{
sprintf(SizeString, " ", DirInfo->AllocationSize.LowPart);
}
// Display this entry
file_size = DirInfo->FileNameLength / sizeof(WCHAR);
short_size = DirInfo->ShortNameLength / sizeof(WCHAR);
swprintf(ShortStringSize, L"%d", short_size);
swprintf(FileStringSize, L"%d", file_size);
if (DirInfo->ShortNameLength)
{
memset(ShortString, 0x00, (12 + 1) * sizeof(WCHAR));
wcsncpy(ShortString, DirInfo->ShortName, short_size);
}
else
{
swprintf(ShortString, L" ");
}
if (DirInfo->FileNameLength)
{
memset(FileString, 0x00, (MAX_PATH + 1) * sizeof(WCHAR));
wcsncpy(FileString, DirInfo->FileName, file_size);
}
else
{
swprintf(FileString, L" ");
}
RtlCliDisplayString("%02d.%02d.%04d %02d:%02d %s %9s %-28S %12S\n",
Time.Day,
Time.Month,
Time.Year,
Time.Hour,
Time.Minute,
DirInfo->FileAttributes & FILE_ATTRIBUTE_DIRECTORY ? "<DIR>" : " ",
SizeString,
FileString,
ShortString);
// Restore the character that was here before
*Null = Save;
}
/*++
* @name RtlCliListDirectory
*
* The RtlCliListDirectory routine lists the current directory contents.
*
* @param None.
*
* @return NTSTATUS
*
* @remarks Documentation for this routine needs to be completed.
*
*--*/
NTSTATUS
RtlCliListDirectory(PWCHAR CurrentDirectory)
{
UNICODE_STRING DirectoryString;
OBJECT_ATTRIBUTES ObjectAttributes;
HANDLE DirectoryHandle;
NTSTATUS Status;
IO_STATUS_BLOCK IoStatusBlock;
BOOLEAN FirstQuery = TRUE;
PFILE_BOTH_DIR_INFORMATION DirectoryInfo, Entry;
HANDLE EventHandle;
CHAR i, c;
// Convert dir to NT Format
if (!RtlDosPathNameToNtPathName_U(CurrentDirectory,
&DirectoryString,
NULL,
NULL))
{
return STATUS_UNSUCCESSFUL;
}
// Initialize the object attributes
RtlCliDisplayString(" Directory of %S\n\n", CurrentDirectory);
InitializeObjectAttributes(&ObjectAttributes,
&DirectoryString,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
// Open the directory
Status = ZwCreateFile(&DirectoryHandle,
FILE_LIST_DIRECTORY,
&ObjectAttributes,
&IoStatusBlock,
NULL,
0,
FILE_SHARE_READ | FILE_SHARE_WRITE,
FILE_OPEN,
FILE_DIRECTORY_FILE,
NULL,
0);
if (!NT_SUCCESS(Status))
{
return Status;
}
// Allocate space for directory entry information
DirectoryInfo = RtlAllocateHeap(RtlGetProcessHeap(), 0, 4096);
if (!DirectoryInfo)
{
return STATUS_INSUFFICIENT_RESOURCES;
}
// Create the event to wait on
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtCreateEvent(&EventHandle,
EVENT_ALL_ACCESS,
&ObjectAttributes,
SynchronizationEvent,
FALSE);
if (!NT_SUCCESS(Status))
{
return Status;
}
// Start loop
i = 0;
for (;;)
{
// Get the contents of the directory, adding up the size as we go
Status = ZwQueryDirectoryFile(DirectoryHandle,
EventHandle,
NULL,
0,
&IoStatusBlock,
DirectoryInfo,
4096,
FileBothDirectoryInformation,
FALSE,
NULL,
FirstQuery);
if (Status == STATUS_PENDING)
{
// Wait on the event
NtWaitForSingleObject(EventHandle, FALSE, NULL);
Status = IoStatusBlock.Status;
}
// Check for success
if (!NT_SUCCESS(Status))
{
// Nothing left to enumerate. Close handles and free memory
ZwClose(DirectoryHandle);
RtlFreeHeap(RtlGetProcessHeap(), 0, DirectoryInfo);
return STATUS_SUCCESS;
}
// Loop every directory
Entry = DirectoryInfo;
while (Entry)
{
// List the file
RtlCliDumpFileInfo(Entry);
if (++i > 20)
{
i = 0;
RtlCliDisplayString("Continue listing (y/n):");
while (TRUE)
{
c = RtlCliGetChar(hKeyboard);
if (c == 'n' || c == 'N')
{
RtlCliDisplayString("\n");
return STATUS_SUCCESS;
}
if (c == 'y' || c == 'Y')
{
break;
}
}
RtlCliDisplayString("\n");
}
// Make sure we still have a file
if (!Entry->NextEntryOffset)
break;
// Move to the next one
Entry = (PFILE_BOTH_DIR_INFORMATION)((ULONG_PTR)Entry +
Entry->NextEntryOffset);
}
// This isn't the first scan anymore
FirstQuery = FALSE;
}
}
================================================
FILE: hardware.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: hardware.c
* DESCRIPTION: Device tree routines.
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
#define MAX_DEVICE_ID_LEN 200
#define ROOT_NAME L"HTREE\\ROOT\\0"
ULONG Level = 0;
HANDLE RootKey = 0;
NTSTATUS
RtlCliGetEnumKey(OUT PHANDLE KeyHandle)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System"
L"\\CurrentControlSet\\Enum");
// Initialize the object attributes
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
// Open the key for read access
return NtOpenKey(KeyHandle, KEY_READ, &ObjectAttributes);
}
NTSTATUS
RtlCliGetChildOrSibling(IN PWCHAR Name,
OUT PWCHAR ChildName,
IN ULONG Type)
{
NTSTATUS Status;
PLUGPLAY_CONTROL_RELATED_DEVICE_DATA PlugPlayData;
// Initialize the Root Device Node name
RtlInitUnicodeString(&PlugPlayData.TargetDeviceInstance, Name);
// Initialize the request
PlugPlayData.Relation = Type;
PlugPlayData.RelatedDeviceInstanceLength = MAX_DEVICE_ID_LEN;
PlugPlayData.RelatedDeviceInstance = ChildName;
// Get the root child node
Status = NtPlugPlayControl(PlugPlayControlGetRelatedDevice,
(PVOID)&PlugPlayData,
sizeof(PLUGPLAY_CONTROL_RELATED_DEVICE_DATA));
return Status;
}
NTSTATUS
RtlCliPrintDeviceName(IN PWCHAR Name)
{
NTSTATUS Status = STATUS_SUCCESS;
HANDLE RegHandle;
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING KeyName;
PKEY_VALUE_FULL_INFORMATION FullInformation;
ULONG ResultLength;
WCHAR Buffer[MAX_DEVICE_ID_LEN];
ULONG i;
// If we don't already have a root key, get it now
if (!RootKey)
Status = RtlCliGetEnumKey(&RootKey);
if (NT_SUCCESS(Status))
{
// Root key opened, now initialize the device instance key name
RtlInitUnicodeString(&KeyName, Name);
// Setup the object attributes and open the key
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
0,
RootKey,
NULL);
Status = NtOpenKey(&RegHandle, KEY_READ, &ObjectAttributes);
if (NT_SUCCESS(Status))
{
// Setup and allocate the key data structure
ResultLength = sizeof(*FullInformation) + 256;
FullInformation = RtlAllocateHeap(RtlGetProcessHeap(),
0,
ResultLength);
// Now check for a friendly name
RtlInitUnicodeString(&KeyName, L"FriendlyName");
Status = NtQueryValueKey(RegHandle,
&KeyName,
KeyValueFullInformation,
FullInformation,
ResultLength,
&ResultLength);
if (!NT_SUCCESS(Status))
{
// No friendly name found, try the device description key
RtlInitUnicodeString(&KeyName, L"DeviceDesc");
Status = NtQueryValueKey(RegHandle,
&KeyName,
KeyValueFullInformation,
FullInformation,
ResultLength,
&ResultLength);
}
// Check if we have success until here
if (NT_SUCCESS(Status))
{
// Get the pointer to the name
Name = (PWCHAR)((ULONG_PTR)FullInformation +
FullInformation->DataOffset);
// Indent the name to create the appeareance of a tree
for (i = 0; i < (Level * 2); i++)
Buffer[i] = ' ';
Buffer[i] = UNICODE_NULL;
// Add the device name or description, and display it
wcscat(Buffer, Name);
RtlCliDisplayString("%S\n", Buffer);
DbgPrint("%S\n", Buffer);
}
// Close the key to the device instance name
NtClose(RegHandle);
}
}
// Return status to caller
return Status;
}
NTSTATUS
RtlCliListSubNodes(IN PWCHAR Parent,
IN PWCHAR Sibling,
IN PWCHAR Current)
{
NTSTATUS Status;
WCHAR FoundSibling[MAX_DEVICE_ID_LEN];
WCHAR FoundChild[MAX_DEVICE_ID_LEN];
// Start looping
do
{
// Get the first sibling
Status = RtlCliGetChildOrSibling(Current, FoundSibling, PNP_GET_SIBLING_DEVICE);
if (!NT_SUCCESS(Status))
*FoundSibling = UNICODE_NULL;
// Print its name
Status = RtlCliPrintDeviceName(Current);
// Get its children
Status = RtlCliGetChildOrSibling(Current, FoundChild, PNP_GET_CHILD_DEVICE);
if (NT_SUCCESS(Status))
{
// Get it's children's subnodes
Level++;
RtlCliListSubNodes(Current, NULL, FoundChild);
Level--;
}
// Move to the next sibling
Current = FoundSibling;
} while (*Current);
// Return status
return Status;
}
NTSTATUS
RtlCliListHardwareTree(VOID)
{
NTSTATUS Status;
WCHAR Buffer[MAX_DEVICE_ID_LEN];
// Get the root node's child
Status = RtlCliGetChildOrSibling(ROOT_NAME, Buffer, PNP_GET_CHILD_DEVICE);
if (!NT_SUCCESS(Status))
{
RtlCliDisplayString("NtPlugPlayControl get root node failed.\n");
}
// Now get the entire tree
Status = RtlCliListSubNodes(ROOT_NAME, NULL, Buffer);
if (!NT_SUCCESS(Status))
{
RtlCliDisplayString("NtPlugPlayControl get child nodes failed.\n");
}
return Status;
}
================================================
FILE: input.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: input.c
* DESCRIPTION: This module deals with device input (such as mouse or keyboard).
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
// FIXME: Temporary here
NTSTATUS
RtlClipBackspace(
VOID);
// Event to wait on for keyboard input
HANDLE hEvent;
// Raw keyboard character buffer
ULONG CurrentChar = 0;
// Input buffer
CHAR Line[1024];
CHAR CurrentPosition = 0;
/*++
* @name RtlCliOpenInputDevice
*
* The RtlCliOpenInputDevice routine opens an input device.
*
* @param Handle
* Pointer where the handle for the input device will be returned.
*
* @param Type
* Type of the input device to use.
*
* @return STATUS_SUCCESS or error code when attemping to open the device.
*
* @remarks This routine supports both mouse and keyboard input devices.
*
*--*/
NTSTATUS
RtlCliOpenInputDevice(OUT PHANDLE Handle,
IN CON_DEVICE_TYPE Type)
{
UNICODE_STRING Driver;
OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK Iosb;
HANDLE hDriver;
NTSTATUS Status;
// Chose the driver to use
// FIXME: Support MouseType later
// FIXME: Don't hardcode keyboard path
if (Type == KeyboardType)
{
RtlInitUnicodeString(&Driver, L"\\Device\\KeyboardClass0");
}
// Initialize the object attributes
InitializeObjectAttributes(&ObjectAttributes,
&Driver,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
// Open a handle to it
Status = NtCreateFile(&hDriver,
SYNCHRONIZE | GENERIC_READ | FILE_READ_ATTRIBUTES,
&ObjectAttributes,
&Iosb,
NULL,
FILE_ATTRIBUTE_NORMAL,
0,
FILE_OPEN,
FILE_DIRECTORY_FILE,
NULL,
0);
// Now create an event that will be used to wait on the device
InitializeObjectAttributes(&ObjectAttributes, NULL, 0, NULL, NULL);
Status = NtCreateEvent(&hEvent, EVENT_ALL_ACCESS, &ObjectAttributes, 1, 0);
// Return the handle
*Handle = hDriver;
return Status;
}
/*++
* @name RtlClipWaitForInput
*
* The RtlClipWaitForInput routine waits for input from an input device.
*
* @param hDriver
* Handle of the driver/device to get input from.
*
* @param Buffer
* Input buffer.
*
* @param BufferSize
* Size of the input buffer.
*
* @return STATUS_SUCCESS or error code from the read operation.
*
* @remarks This routine waits for input to be available.
*
*--*/
NTSTATUS
RtlClipWaitForInput(IN HANDLE hDriver,
IN PVOID Buffer,
IN OUT PULONG BufferSize)
{
IO_STATUS_BLOCK Iosb;
LARGE_INTEGER ByteOffset;
NTSTATUS Status;
// Clean up the I/O Status block and read from byte 0
RtlZeroMemory(&Iosb, sizeof(Iosb));
RtlZeroMemory(&ByteOffset, sizeof(ByteOffset));
// Try to read the data
Status = NtReadFile(hDriver,
hEvent,
NULL,
NULL,
&Iosb,
Buffer,
*BufferSize,
&ByteOffset,
NULL);
// Check if data is pending
if (Status == STATUS_PENDING)
{
// Wait on the data to be read
Status = NtWaitForSingleObject(hEvent, TRUE, NULL);
}
// Return status and how much data was read
*BufferSize = (ULONG)Iosb.Information;
return Status;
}
CHAR RtlCliGetChar(IN HANDLE hDriver)
{
KEYBOARD_INPUT_DATA KeyboardData;
KBD_RECORD kbd_rec;
ULONG BufferLength = sizeof(KEYBOARD_INPUT_DATA);
RtlClipWaitForInput(hDriver, &KeyboardData, &BufferLength);
IntTranslateKey(&KeyboardData, &kbd_rec);
if (!kbd_rec.bKeyDown)
{
return (-1);
}
return kbd_rec.AsciiChar;
}
/*++
* @name RtlCliGetLine
*
* The RtlCliGetLine routine gets line from keyboard.
*
* @param hDriver
* Keyboard handle.
*
* @return PCHAR
*
* @remarks Because we don't currently have a thread to display on screen
* whatever is typed, we handle this in the same thread and display
* a character only if someone is actually waiting for it. This
* will be changed later.
*/
PCHAR
RtlCliGetLine(IN HANDLE hDriver)
{
CHAR Char;
BOOLEAN First = FALSE;
// Wait for a new character
while (TRUE)
{
// Get the character that was pressed
Char = RtlCliGetChar(hDriver);
// Check if this was ENTER
if (Char == '\r')
{
// First, null-terminate the line buffer
Line[CurrentPosition] = ANSI_NULL;
CurrentPosition = 0;
// Return it
return Line;
}
else if (Char == '\b')
{
// Make sure we don't back-space beyond the limit
if (CurrentPosition)
{
// NtDisplayString does not properly handle backspace, so
// we unfortunately have to rely on a hack.
// We have to call in the display subsystem to redisplay the
// current text buffer and replace last character with space.
RtlCliPutChar('\r');
RtlClipBackspace();
RtlCliPutChar(' ');
RtlCliPutChar('\r');
RtlClipBackspace();
// Now we do the only thing we're supposed to do, which is to
// remove a character in the command buffer as well.
CurrentPosition--;
}
// Continue listening for chars.
continue;
}
// We got another character. Make sure it's not NULL.
if (!Char || Char == -1)
continue;
// Add it to our line buffer
Line[CurrentPosition] = Char;
CurrentPosition++;
// Again, as noted earlier, we combine input with display in a very
// unholy way, so we also have to display it on screen.
RtlCliPutChar(Char);
}
}
================================================
FILE: install/add.reg
================================================
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"BootExecute"=hex(7):61,75,74,6f,63,68,65,63,6b,20,61,75,74,6f,63,68,6b,20,2a,\
00,6e,61,74,69,76,65,20,48,65,6c,6c,6f,20,57,6f,72,6c,64,21,00,00
================================================
FILE: install/remove.reg
================================================
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"BootExecute"=hex(7):61,75,74,6f,63,68,65,63,6b,20,61,75,74,6f,63,68,6b,20,2a,\
00,00
================================================
FILE: keytrans.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: keytrans.c
* DESCRIPTION: Keyboard codes translation.
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
typedef struct _SCANTOASCII
{
USHORT ScanCode;
UCHAR Normal;
UCHAR Shift;
} SCANTOASCII, *PSCANTOASCII;
SCANTOASCII ScanToAscii[] = {
{0x1e, 'a', 'A'},
{0x30, 'b', 'B'},
{0x2e, 'c', 'C'},
{0x20, 'd', 'D'},
{0x12, 'e', 'E'},
{0x21, 'f', 'F'},
{0x22, 'g', 'G'},
{0x23, 'h', 'H'},
{0x17, 'i', 'I'},
{0x24, 'j', 'J'},
{0x25, 'k', 'K'},
{0x26, 'l', 'L'},
{0x32, 'm', 'M'},
{0x31, 'n', 'N'},
{0x18, 'o', 'O'},
{0x19, 'p', 'P'},
{0x10, 'q', 'Q'},
{0x13, 'r', 'R'},
{0x1f, 's', 'S'},
{0x14, 't', 'T'},
{0x16, 'u', 'U'},
{0x2f, 'v', 'V'},
{0x11, 'w', 'W'},
{0x2d, 'x', 'X'},
{0x15, 'y', 'Y'},
{0x2c, 'z', 'Z'},
{0x02, '1', '!'},
{0x03, '2', '@'},
{0x04, '3', '#'},
{0x05, '4', '$'},
{0x06, '5', '%'},
{0x07, '6', '^'},
{0x08, '7', '&'},
{0x09, '8', '*'},
{0x0a, '9', '('},
{0x0b, '0', ')'},
{0x29, '\'', '~'},
{0x0c, '-', '_'},
{0x0d, '=', '+'},
{0x1a, '[', '{'},
{0x1b, ']', '}'},
{0x2b, '\\', '|'},
{0x27, ';', ':'},
{0x28, '\'', '"'},
{0x33, ',', '<'},
{0x34, '.', '>'},
{0x35, '/', '?'},
{0x4a, '-', '-'},
{0x4e, '+', '+'},
{0x37, '*', '*'},
{0x39, ' ', ' '},
{0x1c, '\r', '\r'},
{0x0e, 0x08, 0x08}, /* backspace */
{0, 0, 0}};
static void IntUpdateControlKeyState(LPDWORD State, PKEYBOARD_INPUT_DATA InputData)
{
DWORD Value = 0;
if (InputData->Flags & KEY_E1) /* Only the pause key has E1 */
return;
if (!(InputData->Flags & KEY_E0))
{
switch (InputData->MakeCode)
{
case 0x2a:
case 0x36:
Value = SHIFT_PRESSED;
break;
case 0x1d:
Value = LEFT_CTRL_PRESSED;
break;
case 0x38:
Value = LEFT_ALT_PRESSED;
break;
case 0x45:
Value = NUMLOCK_ON;
if (!(InputData->Flags & KEY_BREAK))
*State ^= Value;
return;
default:
return;
}
}
else
{
switch (InputData->MakeCode)
{
case 0x1d:
Value = RIGHT_CTRL_PRESSED;
break;
case 0x38:
Value = RIGHT_ALT_PRESSED;
break;
default:
return;
}
}
if (InputData->Flags & KEY_BREAK)
*State &= ~Value;
else
*State |= Value;
}
static UCHAR IntAsciiFromInput(PKEYBOARD_INPUT_DATA InputData, DWORD KeyState)
{
UINT Counter = 0;
while (ScanToAscii[Counter].ScanCode != 0)
{
if (ScanToAscii[Counter].ScanCode == InputData->MakeCode)
{
if (KeyState & SHIFT_PRESSED)
return ScanToAscii[Counter].Shift;
return ScanToAscii[Counter].Normal;
}
Counter++;
}
return 0;
}
/*
* Only the bKeyDown and AsciiChar members are used in the zenwinx library.
*/
void IntTranslateKey(PKEYBOARD_INPUT_DATA InputData, KBD_RECORD *kbd_rec)
{
static DWORD dwControlKeyState;
kbd_rec->wVirtualScanCode = InputData->MakeCode;
kbd_rec->bKeyDown = (InputData->Flags & KEY_BREAK) ? FALSE : TRUE;
IntUpdateControlKeyState(&dwControlKeyState, InputData);
kbd_rec->dwControlKeyState = dwControlKeyState;
if (InputData->Flags & KEY_E0)
kbd_rec->dwControlKeyState |= ENHANCED_KEY;
kbd_rec->AsciiChar = IntAsciiFromInput(InputData, kbd_rec->dwControlKeyState);
}
================================================
FILE: main.c
================================================
/**
* PROJECT: Native Shell
* COPYRIGHT: LGPL; See LICENSE in the top level directory
* FILE: main.c
* DESCRIPTION: This module handles the main command line interface and command parsing.
* DEVELOPERS: See CONTRIBUTORS.md in the top level directory
*/
#include "precomp.h"
HANDLE hKeyboard;
HANDLE hHeap;
HANDLE hKey;
#define __APP_VER__ "0.14.1"
#if defined(_M_AMD64) || defined(_AMD64_)
#define __NCLI_VER__ __APP_VER__ " x64"
#else
#define __NCLI_VER__ __APP_VER__ " x86"
#endif
WCHAR *helpstr[] =
{
{L"\n"
L"cd X - Change directory to X md X - Make directory X\n"
L"copy X Y - Copy file X to Y poweroff - Power off PC\n"
L"dir X - Show directory contents pwd - Print working directory\n"
L"del X - Delete file X reboot - Reboot PC\n"
L"devtree - Dump device tree shutdown - Shutdown PC\n"
L"\x0000"},
{L"exit - Exit shell sysinfo - Dump system information\n"
L"lm - List modules drawtext X - Draw string X\n"
L"lp - List processes move X Y - Move file X to Y\n"
L"testvid - Test screen output testarg X Y - Test argument parsing\n"
L"\n"
L"X: - change drive letter to X\n"
L"If a command is not in the list, it is treated as an executable name\n"
L"\n"
L"\x0000"}};
VOID RtlClipProcessMessage(PCHAR Command)
{
WCHAR CurrentDirectory[MAX_PATH] = {0};
UNICODE_STRING CurrentDirectoryString;
CHAR CommandBuf[BUFFER_SIZE] = {0};
UINT argc;
CHAR **argv;
strncpy(CommandBuf, Command, strnlen(Command, BUFFER_SIZE));
argv = StringToArguments(&CommandBuf[0], &argc);
if (0 == argc)
return;
if (!_strnicmp(argv[0], CMDSTR("exit")))
{
// Exit from shell
DeinitHeapMemory(hHeap);
NtTerminateProcess(NtCurrentProcess(), 0);
}
else if (!_strnicmp(argv[0], CMDSTR("testarg")))
{
UINT i = 0;
RtlCliDisplayString("Args: %d\n", argc);
if (argc > 1)
{
for (i = 1; i < argc; i++)
{
if (NULL != argv[i])
RtlCliDisplayString("Arg %d: %s\n", i, argv[i]);
else
{
RtlCliDisplayString("Arg %d: NULL\n", i);
break;
}
}
}
}
else if (!_strnicmp(argv[0], CMDSTR("help")))
{
RtlCliDisplayString("%S", helpstr[0]);
RtlCliDisplayString("%S", helpstr[1]);
}
else if (!_strnicmp(argv[0], CMDSTR("lm")))
{
// List Modules (!lm)
RtlCliListDrivers();
}
else if (!_strnicmp(argv[0], CMDSTR("lp")))
{
// List Processes (!lp)
RtlCliListProcesses();
}
else if (!_strnicmp(argv[0], CMDSTR("sysinfo")))
{
// Dump System Information (sysinfo)
RtlCliDumpSysInfo();
}
else if (!_strnicmp(argv[0], CMDSTR("cd")))
{
// Set the current directory
RtlCliSetCurrentDirectory(&Command[3]);
}
else if (!_strnicmp(argv[0], CMDSTR("drawtext")))
{
#if (NTDDI_VERSION >= NTDDI_WIN7)
UNICODE_STRING us;
ANSI_STRING as;
RtlInitAnsiString(&as, &Command[9]);
RtlAnsiStringToUnicodeString(&us, &as, TRUE);
NtDrawText(&us);
RtlFreeUnicodeString(&us);
#else
RtlCliDisplayString("\nNot supported prior to Win7\n");
#endif
}
else if (!_strnicmp(argv[0], CMDSTR("pwd")))
{
// Get the current directory
RtlCliGetCurrentDirectory(CurrentDirectory);
// Display it
RtlInitUnicodeString(&CurrentDirectoryString, CurrentDirectory);
RtlCliPrintString(&CurrentDirectoryString);
}
else if (!_strnicmp(argv[0], CMDSTR("dir")))
{
WCHAR Dir[MAX_PATH];
WCHAR ArgDir[MAX_PATH];
RtlCliGetCurrentDirectory(Dir);
if (argc > 1)
{
UNICODE_STRING us;
ANSI_STRING as;
RtlInitAnsiString(&as, argv[1]);
RtlAnsiStringToUnicodeString(&us, &as, TRUE);
AppendString(Dir, L"\\");
AppendString(Dir, us.Buffer);
RtlFreeUnicodeString(&us);
}
// List directory
RtlCliListDirectory(Dir);
}
else if (!_strnicmp(argv[0], CMDSTR("devtree")))
{
// Dump hardware tree
RtlCliListHardwareTree();
}
else if (!_strnicmp(argv[0], CMDSTR("shutdown")))
{
RtlCliShutdown();
}
else if (!_strnicmp(argv[0], CMDSTR("reboot")))
{
RtlCliReboot();
}
else if (!_strnicmp(argv[0], CMDSTR("poweroff")))
{
RtlCliPowerOff();
}
else if (!_strnicmp(argv[0], CMDSTR("testvid")))
{
UINT j;
WCHAR i, w;
UNICODE_STRING us;
LARGE_INTEGER delay;
memset(&delay, 0x00, sizeof(LARGE_INTEGER));
delay.LowPart = 100000000;
RtlInitUnicodeString(&us, L" ");
// 75x23
RtlCliDisplayString("\nVid mode is 75x23\n\nCharacter test:");
j = 0;
for (w = L'A'; w < 0xFFFF; w++)
{
j++;
NtDelayExecution(FALSE, &delay);
// w = i;
if (w != L'\n' && w != L'\r')
{
RtlCliPutChar(w);
}
else
{
RtlCliPutChar(L' ');
}
if (j > 70)
{
j = 0;
RtlCliPutChar(L'\n');
}
}
}
else if (!_strnicmp(argv[0], CMDSTR("copy")))
{
// Copy file
if (argc > 2)
{
WCHAR buf1[MAX_PATH] = {0};
WCHAR buf2[MAX_PATH] = {0};
GetFullPath(argv[1], buf1, FALSE);
GetFullPath(argv[2], buf2, FALSE);
RtlCliDisplayString("\nCopy %S to %S\n", buf1, buf2);
if (FileExists(buf1))
{
if (!NtFileCopyFile(buf1, buf2))
{
RtlCliDisplayString("Failed.\n");
}
}
else
{
RtlCliDisplayString("File does not exist.\n");
}
}
else
{
RtlCliDisplayString("Not enough arguments.\n");
}
}
else if (!_strnicmp(argv[0], CMDSTR("move")))
{
// Move/rename file
if (argc > 2)
{
WCHAR buf1[MAX_PATH] = {0};
WCHAR buf2[MAX_PATH] = {0};
GetFullPath(argv[1], buf1, FALSE);
GetFullPath(argv[2], buf2, FALSE);
RtlCliDisplayString("\nMove %S to %S\n", buf1, buf2);
if (FileExists(buf1))
{
if (!NtFileMoveFile(buf1, buf2, FALSE))
{
RtlCliDisplayString("Failed.\n");
}
}
else
{
RtlCliDisplayString("File does not exist.\n");
}
}
else
{
RtlCliDisplayString("Not enough arguments.\n");
}
}
else if (!_strnicmp(argv[0], CMDSTR("del")))
{
// Delete file
if (argc > 1)
{
WCHAR buf1[MAX_PATH] = {0};
GetFullPath(argv[1], buf1, FALSE);
if (FileExists(buf1))
{
RtlCliDisplayString("\nDelete %S\n", buf1);
if (!NtFileDeleteFile(buf1))
{
RtlCliDisplayString("Failed.\n");
}
}
else
{
RtlCliDisplayString("File does not exist.\n");
}
}
else
{
RtlCliDisplayString("Not enough arguments.\n");
}
}
else if (!_strnicmp(argv[0], CMDSTR("md")))
{
// Make directory
if (argc > 1)
{
WCHAR buf1[MAX_PATH] = {0};
GetFullPath(argv[1], buf1, FALSE);
RtlCliDisplayString("\nCreate directory %S\n", buf1);
if (!NtFileCreateDirectory(buf1))
{
RtlCliDisplayString("Failed.\n");
}
}
else
{
RtlCliDisplayString("Not enough arguments.\n");
}
}
else if ((strlen(argv[0]) == 2) && (argv[0][1] == ':'))
{
// Change disk
RtlCliSetCurrentDirectory(argv[0]);
return;
}
else
{
// Unknown command, try to find an executable and run it.
WCHAR filename[MAX_PATH] = {0};
BOOL bExist = FALSE;
GetFullPath(argv[0], filename, FALSE);
bExist = FileExists(filename);
if (!bExist)
{
wcscat(filename, L".exe");
bExist = FileExists(filename);
}
if (bExist)
{
HANDLE hProcess;
NTSTATUS status;
ANSI_STRING as;
UNICODE_STRING us;
RtlInitAnsiString(&as, Command);
RtlAnsiStringToUnicodeString(&us, &as, TRUE);
NtClose(hKeyboard);
status = CreateNativeProcess(filename, us.Buffer, &hProcess);
if (NT_SUCCESS(status))
{
NtWaitForSingleObject(hProcess, FALSE, NULL);
}
else
{
RtlCliDisplayString("Failed to execute %s\n", Command);
}
RtlCliOpenInputDevice(&hKeyboard, KeyboardType);
RtlFreeUnicodeString(&us);
}
else
{
RtlCliDisplayString("%s is not recognized as a command or an executable file name\n"
"\nType \"help\" for the list of commands.\n",
Command);
}
}
}
/*++
* @name RtlClipDisplayPrompt
*
* The RtlClipDisplayPrompt routine
*
* @param None.
*
* @return None.
*
* @remarks Documentation for this routine needs to be completed.
*
*--*/
VOID RtlClipDisplayPrompt(VOID)
{
WCHAR CurrentDirectory[MAX_PATH];
UNICODE_STRING DirString;
RtlCliGetCurrentDirectory(CurrentDirectory);
if (!RtlDosPathNameToNtPathName_U(CurrentDirectory, &DirString, NULL, NULL))
{
RtlCliDisplayString("%S>", CurrentDirectory);
return;
}
RtlCliPrintString(&DirString);
RtlCliPutChar(L'>');
}
NTSTATUS
__cdecl main(INT argc,
PCHAR argv[],
PCHAR envp[],
ULONG DebugFlag OPTIONAL)
{
PPEB Peb = NtCurrentPeb();
NTSTATUS Status;
PCHAR Command;
hHeap = InitHeapMemory();
hKey = NULL;
// Show banner
RtlCliDisplayString("Native Shell v" __NCLI_VER__ " (build " __DATE__ " " __TIME__ ")\n\n");
// Setup keyboard input
Status = RtlCliOpenInputDevice(&hKeyboard, KeyboardType);
// Show initial prompt
RtlClipDisplayPrompt();
// Wait for a new line
while (TRUE)
{
// Get the line that was entered and display a new line
Command = RtlCliGetLine(hKeyboard);
RtlCliDisplayString("\n");
// Make sure there's actually a command
if (*Command)
{
// Process the command and do a new line again.
RtlClipProcessMessage(Command);
RtlCliDisplayString("\n");
}
// Display the prompt, and restart the loop
RtlClipDisplayPrompt();
continue;
}
DeinitHeapMemory(hHeap);
NtTerminateProcess(NtCurrentProcess(), 0);
return STATUS_SUCCESS;
}
================================================
FILE: makefile
================================================
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the driver components of the Windows NT DDK
#
!INCLUDE $(NTMAKEENV)\makefile.def
================================================
FILE: ndk/arch/ketypes.h
================================================
/*++ NDK Version: 0095
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
ketypes.h (ARCH)
Abstract:
Portability file to choose the correct Architecture-specific file.
Author:
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
--*/
#ifndef _ARCH_KETYPES_H
#define _ARCH_KETYPES_H
//
// Include the right file for this architecture.
//
#ifdef _M_IX86
#include <i386/ketypes.h>
#elif defined(_M_PPC)
#include <powerpc/ketypes.h>
#else
#error "Unknown processor"
#endif
#endif
================================================
FILE: ndk/arch/mmtypes.h
================================================
/*++ NDK Version: 0095
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
mmtypes.h (ARCH)
Abstract:
Portability file to choose the correct Architecture-specific file.
Author:
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
--*/
#ifndef _ARCH_MMTYPES_H
#define _ARCH_MMTYPES_H
//
// Include the right file for this architecture.
//
#if defined(_M_IX86) || defined(_M_AMD64)
#include <i386/mmtypes.h>
#elif defined(_M_PPC)
#include <powerpc/mmtypes.h>
#else
#error "Unknown processor"
#endif
#endif
================================================
FILE: ndk/asm.h
================================================
/*++ NDK Version: 0095
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
asm.h
Abstract:
ASM Offsets for dealing with de-referencing structures in registers.
C-compatible version of the file ks386.inc present in the newest WDK.
Author:
Alex Ionescu (alex.ionescu@reactos.com) 06-Oct-2004
--*/
#ifndef _ASM_H
#define _ASM_H
#define NEW_SCHEDULER
//
// PCR Access
//
#ifdef __ASM__
#ifdef CONFIG_SMP
#define PCR fs:
#else
#define PCR ds:[0xFFDFF000]
#endif
#endif
//
// CPU Modes
//
#define KernelMode 0x0
#define UserMode 0x1
//
// CPU Types
//
#define CPU_INTEL 0x1
#define CPU_AMD 0x2
//
// Selector Names
//
#ifdef __ASM__
#define RPL_MASK 0x0003
#define MODE_MASK 0x0001
#define KGDT_R0_CODE (0x8)
#define KGDT_R0_DATA (0x10)
#define KGDT_R3_CODE (0x18)
#define KGDT_R3_DATA (0x20)
#define KGDT_TSS (0x28)
#define KGDT_R0_PCR (0x30)
#define KGDT_R3_TEB (0x38)
#define KGDT_LDT (0x48)
#define KGDT_DF_TSS (0x50)
#define KGDT_NMI_TSS (0x58)
#endif
//
// KV86M_REGISTERS Offsets
//
#define KV86M_REGISTERS_EBP 0x0
#define KV86M_REGISTERS_EDI 0x4
#define KV86M_REGISTERS_ESI 0x8
#define KV86M_REGISTERS_EDX 0xC
#define KV86M_REGISTERS_ECX 0x10
#define KV86M_REGISTERS_EBX 0x14
#define KV86M_REGISTERS_EAX 0x18
#define KV86M_REGISTERS_DS 0x1C
#define KV86M_REGISTERS_ES 0x20
#define KV86M_REGISTERS_FS 0x24
#define KV86M_REGISTERS_GS 0x28
#define KV86M_REGISTERS_EIP 0x2C
#define KV86M_REGISTERS_CS 0x30
#define KV86M_REGISTERS_EFLAGS 0x34
#define KV86M_REGISTERS_ESP 0x38
#define KV86M_REGISTERS_SS 0x3C
#define TF_SAVED_EXCEPTION_STACK 0x8C
#define TF_REGS 0x90
#define TF_ORIG_EBP 0x94
//
// TSS Offsets
//
#define KTSS_ESP0 0x4
#define KTSS_CR3 0x1C
#define KTSS_EFLAGS 0x24
#define KTSS_IOMAPBASE 0x66
#define KTSS_IO_MAPS 0x68
//
// KTHREAD Offsets
//
#define KTHREAD_DEBUG_ACTIVE 0x03
#define KTHREAD_INITIAL_STACK 0x18
#define KTHREAD_STACK_LIMIT 0x1C
#define KTHREAD_TEB 0x74
#define KTHREAD_KERNEL_STACK 0x20
#define KTHREAD_ALERTED 0x5E
#define KTHREAD_APCSTATE_PROCESS 0x28 + 0x10
#define KTHREAD_PENDING_USER_APC 0x28 + 0x16
#define KTHREAD_PENDING_KERNEL_APC 0x28 + 0x15
#define KTHREAD_CONTEXT_SWITCHES 0x48
#define KTHREAD_STATE_ 0x4C
#define KTHREAD_NPX_STATE 0x4D
#define KTHREAD_WAIT_IRQL 0x4E
#define KTHREAD_NEXT_PROCESSOR 0x40
#define KTHREAD_WAIT_REASON 0x5A
#define KTHREAD_PRIORITY 0x5B
#define KTHREAD_SWAP_BUSY 0x5D
#define KTHREAD_SERVICE_TABLE 0x118
#define KTHREAD_PREVIOUS_MODE 0xD7
#define KTHREAD_COMBINED_APC_DISABLE 0x70
#define KTHREAD_SPECIAL_APC_DISABLE 0x72
#define KTHREAD_LARGE_STACK 0x107
#define KTHREAD_TRAP_FRAME 0x110
#define KTHREAD_CALLBACK_STACK 0x114
#define KTHREAD_APC_STATE_INDEX 0x11C
#define KTHREAD_STACK_BASE 0x158
#define KTHREAD_QUANTUM 0x15D
#define KTHREAD_KERNEL_TIME 0x160
#define KTHREAD_USER_TIME 0x18C
//
// KPROCESS Offsets
//
#define KPROCESS_DIRECTORY_TABLE_BASE 0x18
#define KPROCESS_LDT_DESCRIPTOR0 0x20
#define KPROCESS_LDT_DESCRIPTOR1 0x24
#define KPROCESS_INT21_DESCRIPTOR0 0x28
#define KPROCESS_INT21_DESCRIPTOR1 0x2C
#define KPROCESS_IOPM_OFFSET 0x30
#define KPROCESS_ACTIVE_PROCESSORS 0x34
#define EPROCESS_VDM_OBJECTS 0x144
//
// KTIMER_TABLE Offsets
//
#ifdef __ASM__
#define KTIMER_TABLE_ENTRY 0x00
#define KTIMER_TABLE_TIME 0x08
#define TIMER_ENTRY_SIZE 0x10
#define TIMER_TABLE_SIZE 0x200
#endif
//
// KPRCB Offsets
//
#define KPRCB_DR0 0x2F8
#define KPRCB_DR1 0x2FC
#define KPRCB_DR2 0x300
#define KPRCB_DR3 0x304
#define KPRCB_DR6 0x308
#define KPRCB_DR7 0x30C
#define KPRCB_TIMER_HAND 0x964
#define KPRCB_TIMER_REQUEST 0x968
//
// KPCR Offsets
//
#define KPCR_EXCEPTION_LIST 0x0
#define KPCR_INITIAL_STACK 0x4
#define KPCR_STACK_LIMIT 0x8
#define KPCR_PERF_GLOBAL_GROUP_MASK 0x8
#define KPCR_CONTEXT_SWITCHES 0x10
#define KPCR_SET_MEMBER_COPY 0x14
#define KPCR_TEB 0x18
#define KPCR_SELF 0x1C
#define KPCR_PRCB 0x20
#define KPCR_IRQL 0x24
#define KPCR_IRR 0x28
#define KPCR_IRR_ACTIVE 0x2C
#define KPCR_IDR 0x30
#define KPCR_KD_VERSION_BLOCK 0x34
#define KPCR_IDT 0x38
#define KPCR_GDT 0x3C
#define KPCR_TSS 0x40
#define KPCR_STALL_SCALE_FACTOR 0x4C
#define KPCR_SET_MEMBER 0x48
#define KPCR_NUMBER 0x51
#define KPCR_VDM_ALERT 0x54
#define KPCR_PRCB_DATA 0x120
#define KPCR_CURRENT_THREAD 0x124
#define KPCR_PRCB_NEXT_THREAD 0x128
#define KPCR_PRCB_IDLE_THREAD 0x12C
#define KPCR_PROCESSOR_NUMBER 0x130
#define KPCR_PRCB_SET_MEMBER 0x134
#define KPCR_PRCB_CPU_TYPE 0x138
#define KPCR_NPX_THREAD 0x640
#define KPCR_DR6 0x428
#define KPCR_DR7 0x42C
#define KPCR_PRCB_INTERRUPT_COUNT 0x644
#define KPCR_PRCB_KERNEL_TIME 0x648
#define KPCR_PRCB_USER_TIME 0x64C
#define KPCR_PRCB_DPC_TIME 0x650
#define KPCR_PRCB_DEBUG_DPC_TIME 0x654
#define KPCR_PRCB_INTERRUPT_TIME 0x658
#define KPCR_PRCB_ADJUST_DPC_THRESHOLD 0x65C
#define KPCR_PRCB_SKIP_TICK 0x664
#define KPCR_SYSTEM_CALLS 0x6B8
#define KPCR_PRCB_DPC_QUEUE_DEPTH 0xA4C
#define KPCR_PRCB_DPC_COUNT 0xA50
#define KPCR_PRCB_DPC_STACK 0xA68
#define KPCR_PRCB_MAXIMUM_DPC_QUEUE_DEPTH 0xA6C
#define KPCR_PRCB_DPC_REQUEST_RATE 0xA70
#define KPCR_PRCB_DPC_INTERRUPT_REQUESTED 0xA78
#define KPCR_PRCB_DPC_ROUTINE_ACTIVE 0xA7A
#define KPCR_PRCB_DPC_LAST_COUNT 0xA80
#define KPCR_PRCB_TIMER_REQUEST 0xA88
#define KPCR_PRCB_QUANTUM_END 0xAA1
#define KPCR_PRCB_DEFERRED_READY_LIST_HEAD 0xC10
#define KPCR_PRCB_POWER_STATE_IDLE_FUNCTION 0xEC0
//
// KINTERRUPT Offsets
//
#define KINTERRUPT_SERVICE_ROUTINE 0x0C
#define KINTERRUPT_SERVICE_CONTEXT 0x10
#define KINTERRUPT_TICK_COUNT 0x18
#define KINTERRUPT_ACTUAL_LOCK 0x1C
#define KINTERRUPT_IRQL 0x20
#define KINTERRUPT_VECTOR 0x24
#define KINTERRUPT_SYNCHRONIZE_IRQL 0x29
#define KINTERRUPT_DISPATCH_COUNT 0x38
//
// KGDTENTRY Offsets
//
#define KGDT_BASE_LOW 0x2
#define KGDT_BASE_MID 0x4
#define KGDT_BASE_HI 0x7
#define KGDT_LIMIT_HI 0x6
#define KGDT_LIMIT_LOW 0x0
//
// FPU Save Area Offsets
//
#define FP_CONTROL_WORD 0x0
#define FP_STATUS_WORD 0x4
#define FP_TAG_WORD 0x8
#define FP_ERROR_OFFSET 0xC
#define FP_ERROR_SELECTOR 0x10
#define FP_DATA_OFFSET 0x14
#define FP_DATA_SELECTOR 0x18
#define FN_CR0_NPX_STATE 0x20C
#define SIZEOF_FX_SAVE_AREA 528
#define NPX_FRAME_LENGTH 0x210
//
// FX Save Area Offsets
//
#define FX_CONTROL_WORD 0x0
#define FX_STATUS_WORD 0x2
#define FX_TAG_WORD 0x4
#define FX_ERROR_OPCODE 0x6
#define FX_ERROR_OFFSET 0x8
#define FX_ERROR_SELECTOR 0xC
#define FX_DATA_OFFSET 0x10
#define FX_DATA_SELECTOR 0x14
#define FX_MXCSR 0x18
//
// NPX States
//
#define NPX_STATE_NOT_LOADED 0xA
#define NPX_STATE_LOADED 0x0
//
// Trap Frame Offsets
//
#define KTRAP_FRAME_DEBUGEBP 0x0
#define KTRAP_FRAME_DEBUGEIP 0x4
#define KTRAP_FRAME_DEBUGARGMARK 0x8
#define KTRAP_FRAME_DEBUGPOINTER 0xC
#define KTRAP_FRAME_TEMPCS 0x10
#define KTRAP_FRAME_TEMPESP 0x14
#define KTRAP_FRAME_DR0 0x18
#define KTRAP_FRAME_DR1 0x1C
#define KTRAP_FRAME_DR2 0x20
#define KTRAP_FRAME_DR3 0x24
#define KTRAP_FRAME_DR6 0x28
#define KTRAP_FRAME_DR7 0x2C
#define KTRAP_FRAME_GS 0x30
#define KTRAP_FRAME_RESERVED1 0x32
#define KTRAP_FRAME_ES 0x34
#define KTRAP_FRAME_RESERVED2 0x36
#define KTRAP_FRAME_DS 0x38
#define KTRAP_FRAME_RESERVED3 0x3A
#define KTRAP_FRAME_EDX 0x3C
#define KTRAP_FRAME_ECX 0x40
#define KTRAP_FRAME_EAX 0x44
#define KTRAP_FRAME_PREVIOUS_MODE 0x48
#define KTRAP_FRAME_EXCEPTION_LIST 0x4C
#define KTRAP_FRAME_FS 0x50
#define KTRAP_FRAME_RESERVED4 0x52
#define KTRAP_FRAME_EDI 0x54
#define KTRAP_FRAME_ESI 0x58
#define KTRAP_FRAME_EBX 0x5C
#define KTRAP_FRAME_EBP 0x60
#define KTRAP_FRAME_ERROR_CODE 0x64
#define KTRAP_FRAME_EIP 0x68
#define KTRAP_FRAME_CS 0x6C
#define KTRAP_FRAME_EFLAGS 0x70
#define KTRAP_FRAME_ESP 0x74
#define KTRAP_FRAME_SS 0x78
#define KTRAP_FRAME_RESERVED5 0x7A
#define KTRAP_FRAME_V86_ES 0x7C
#define KTRAP_FRAME_RESERVED6 0x7E
#define KTRAP_FRAME_V86_DS 0x80
#define KTRAP_FRAME_RESERVED7 0x82
#define KTRAP_FRAME_V86_FS 0x84
#define KTRAP_FRAME_RESERVED8 0x86
#define KTRAP_FRAME_V86_GS 0x88
#define KTRAP_FRAME_RESERVED9 0x8A
#define KTRAP_FRAME_SIZE 0x8C
#define KTRAP_FRAME_LENGTH 0x8C
#define KTRAP_FRAME_ALIGN 0x04
#define FRAME_EDITED 0xFFF8
//
// KUSER_SHARED_DATA Offsets
//
#ifdef __ASM__
#define USER_SHARED_DATA 0xFFDF0000
#endif
#define USER_SHARED_DATA_INTERRUPT_TIME 0x8
#define USER_SHARED_DATA_SYSTEM_TIME 0x14
#define USER_SHARED_DATA_TICK_COUNT 0x320
//
// KUSER_SHARED_DATA Offsets (this stuff is trash)
//
#define KERNEL_USER_SHARED_DATA 0x7FFE0000
#define KUSER_SHARED_PROCESSOR_FEATURES KERNEL_USER_SHARED_DATA + 0x274
#define KUSER_SHARED_SYSCALL KERNEL_USER_SHARED_DATA + 0x300
#define KUSER_SHARED_SYSCALL_RET KERNEL_USER_SHARED_DATA + 0x304
#define PROCESSOR_FEATURE_FXSR KUSER_SHARED_PROCESSOR_FEATURES + 0x4
//
// CONTEXT Offsets
//
#define CONTEXT_FLAGS 0x0
#define CONTEXT_DR6 0x14
#define CONTEXT_FLOAT_SAVE 0x1C
#define CONTEXT_SEGGS 0x8C
#define CONTEXT_SEGFS 0x90
#define CONTEXT_SEGES 0x94
#define CONTEXT_SEGDS 0x98
#define CONTEXT_EDI 0x9C
#define CONTEXT_ESI 0xA0
#define CONTEXT_EBX 0xA4
#define CONTEXT_EDX 0xA8
#define CONTEXT_ECX 0xAC
#define CONTEXT_EAX 0xB0
#define CONTEXT_EBP 0xB4
#define CONTEXT_EIP 0xB8
#define CONTEXT_SEGCS 0xBC
#define CONTEXT_EFLAGS 0xC0
#define CONTEXT_ESP 0xC4
#define CONTEXT_SEGSS 0xC8
#define CONTEXT_FLOAT_SAVE_CONTROL_WORD CONTEXT_FLOAT_SAVE + FP_CONTROL_WORD
#define CONTEXT_FLOAT_SAVE_STATUS_WORD CONTEXT_FLOAT_SAVE + FP_STATUS_WORD
#define CONTEXT_FLOAT_SAVE_TAG_WORD CONTEXT_FLOAT_SAVE + FP_TAG_WORD
#define CONTEXT_ALIGNED_SIZE 0x2CC
//
// EXCEPTION_RECORD Offsets
//
#define EXCEPTION_RECORD_EXCEPTION_CODE 0x0
#define EXCEPTION_RECORD_EXCEPTION_FLAGS 0x4
#define EXCEPTION_RECORD_EXCEPTION_RECORD 0x8
#define EXCEPTION_RECORD_EXCEPTION_ADDRESS 0xC
#define EXCEPTION_RECORD_NUMBER_PARAMETERS 0x10
#define SIZEOF_EXCEPTION_RECORD 0x14
#define EXCEPTION_RECORD_LENGTH 0x50
//
// Exception types
//
#ifdef __ASM__
#define EXCEPTION_NONCONTINUABLE 0x0001
#define EXCEPTION_UNWINDING 0x0002
#define EXCEPTION_EXIT_UNWIND 0x0004
#define EXCEPTION_STACK_INVALID 0x0008
#define EXCEPTION_NESTED_CALL 0x00010
#define EXCEPTION_TARGET_UNWIND 0x00020
#define EXCEPTION_COLLIDED_UNWIND 0x00040
#define EXCEPTION_UNWIND 0x00066
#define EXCEPTION_EXECUTE_HANDLER 0x00001
#define EXCEPTION_CONTINUE_SEARCH 0x00000
#define EXCEPTION_CONTINUE_EXECUTION 0xFFFFFFFF
#define EXCEPTION_CHAIN_END 0xFFFFFFFF
#endif
//
// TEB Offsets
//
#define TEB_EXCEPTION_LIST 0x0
#define TEB_STACK_BASE 0x4
#define TEB_STACK_LIMIT 0x8
#define TEB_FIBER_DATA 0x10
#define TEB_PEB 0x30
#define TEB_EXCEPTION_CODE 0x1A4
#define TEB_ACTIVATION_CONTEXT_STACK_POINTER 0x1A8
#define TEB_DEALLOCATION_STACK 0xE0C
#define TEB_GDI_BATCH_COUNT 0xF70
#define TEB_GUARANTEED_STACK_BYTES 0xF78
#define TEB_FLS_DATA 0xFB4
//
// PEB Offsets
//
#define PEB_KERNEL_CALLBACK_TABLE 0x2C
//
// FIBER Offsets
//
#define FIBER_PARAMETER 0x0
#define FIBER_EXCEPTION_LIST 0x4
#define FIBER_STACK_BASE 0x8
#define FIBER_STACK_LIMIT 0xC
#define FIBER_DEALLOCATION_STACK 0x10
#define FIBER_CONTEXT 0x14
#define FIBER_GUARANTEED_STACK_BYTES 0x2E0
#define FIBER_FLS_DATA 0x2E4
#define FIBER_ACTIVATION_CONTEXT_STACK 0x2E8
#define FIBER_CONTEXT_FLAGS FIBER_CONTEXT + CONTEXT_FLAGS
#define FIBER_CONTEXT_EAX FIBER_CONTEXT + CONTEXT_EAX
#define FIBER_CONTEXT_EBX FIBER_CONTEXT + CONTEXT_EBX
#define FIBER_CONTEXT_ECX FIBER_CONTEXT + CONTEXT_ECX
#define FIBER_CONTEXT_EDX FIBER_CONTEXT + CONTEXT_EDX
#define FIBER_CONTEXT_ESI FIBER_CONTEXT + CONTEXT_ESI
#define FIBER_CONTEXT_EDI FIBER_CONTEXT + CONTEXT_EDI
#define FIBER_CONTEXT_EBP FIBER_CONTEXT + CONTEXT_EBP
#define FIBER_CONTEXT_ESP FIBER_CONTEXT + CONTEXT_ESP
#define FIBER_CONTEXT_DR6 FIBER_CONTEXT + CONTEXT_DR6
#define FIBER_CONTEXT_FLOAT_SAVE_STATUS_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_STATUS_WORD
#define FIBER_CONTEXT_FLOAT_SAVE_CONTROL_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_CONTROL_WORD
#define FIBER_CONTEXT_FLOAT_SAVE_TAG_WORD FIBER_CONTEXT + CONTEXT_FLOAT_SAVE_TAG_WORD
//
// EFLAGS
//
#ifdef __ASM__
#define EFLAGS_TF 0x100
#define EFLAGS_INTERRUPT_MASK 0x200
#define EFLAGS_NESTED_TASK 0x4000
#define EFLAGS_V86_MASK 0x20000
#define EFLAGS_ALIGN_CHECK 0x40000
#define EFLAGS_VIF 0x80000
#define EFLAGS_VIP 0x100000
#define EFLAG_SIGN 0x8000
#define EFLAG_ZERO 0x4000
#define EFLAG_SELECT (EFLAG_SIGN + EFLAG_ZERO)
#endif
#define EFLAGS_USER_SANITIZE 0x3F4DD7
//
// CR0
//
#define CR0_PE 0x1
#define CR0_MP 0x2
#define CR0_EM 0x4
#define CR0_TS 0x8
#define CR0_ET 0x10
#define CR0_NE 0x20
#define CR0_WP 0x10000
#define CR0_AM 0x40000
#define CR0_NW 0x20000000
#define CR0_CD 0x40000000
#define CR0_PG 0x80000000
//
// CR4
//
#ifdef __ASM__
#define CR4_VME 0x1
#define CR4_PVI 0x2
#define CR4_TSD 0x4
#define CR4_DE 0x8
#define CR4_PSE 0x10
#define CR4_PAE 0x20
#define CR4_MCE 0x40
#define CR4_PGE 0x80
#define CR4_FXSR 0x200
#define CR4_XMMEXCPT 0x400
#endif
//
// DR6 and 7 Masks
//
#define DR6_LEGAL 0xE00F
#define DR7_LEGAL 0xFFFF0155
#define DR7_ACTIVE 0x55
#define DR7_OVERRIDE_V 0x04
#define DR7_RESERVED_MASK 0xDC00
#define DR7_OVERRIDE_MASK 0xF0000
//
// Usermode callout frame definitions
//
#define CBSTACK_STACK 0x0
#define CBSTACK_TRAP_FRAME 0x4
#define CBSTACK_CALLBACK_STACK 0x8
#define CBSTACK_EBP 0x18
#define CBSTACK_RESULT 0x20
#define CBSTACK_RESULT_LENGTH 0x24
//
// NTSTATUS and Bugcheck Codes
//
#ifdef __ASM__
#define STATUS_ACCESS_VIOLATION 0xC0000005
#define STATUS_IN_PAGE_ERROR 0xC0000006
#define STATUS_GUARD_PAGE_VIOLATION 0x80000001
#define STATUS_PRIVILEGED_INSTRUCTION 0xC0000096
#define STATUS_STACK_OVERFLOW 0xC00000FD
#define KI_EXCEPTION_ACCESS_VIOLATION 0x10000004
#define STATUS_INVALID_SYSTEM_SERVICE 0xC000001C
#define STATUS_NO_CALLBACK_ACTIVE 0xC0000258
#define STATUS_CALLBACK_POP_STACK 0xC0000423
#define STATUS_ARRAY_BOUNDS_EXCEEDED 0xC000008C
#define STATUS_ILLEGAL_INSTRUCTION 0xC000001D
#define STATUS_INVALID_LOCK_SEQUENCE 0xC000001E
#define STATUS_BREAKPOINT 0x80000003
#define STATUS_SINGLE_STEP 0x80000004
#define STATUS_INTEGER_DIVIDE_BY_ZERO 0xC0000094
#define STATUS_INTEGER_OVERFLOW 0xC0000095
#define STATUS_FLOAT_DENORMAL_OPERAND 0xC000008D
#define STATUS_FLOAT_DIVIDE_BY_ZERO 0xC000008E
#define STATUS_FLOAT_INEXACT_RESULT 0xC000008F
#define STATUS_FLOAT_INVALID_OPERATION 0xC0000090
#define STATUS_FLOAT_OVERFLOW 0xC0000091
#define STATUS_FLOAT_STACK_CHECK 0xC0000092
#define STATUS_FLOAT_UNDERFLOW 0xC0000093
#define STATUS_FLOAT_MULTIPLE_FAULTS 0xC00002B4
#define STATUS_FLOAT_MULTIPLE_TRAPS 0xC00002B5
#define APC_INDEX_MISMATCH 0x01
#define IRQL_NOT_GREATER_OR_EQUAL 0x09
#define IRQL_NOT_LESS_OR_EQUAL 0x0A
#define TRAP_CAUSE_UNKNOWN 0x12
#define KMODE_EXCEPTION_NOT_HANDLED 0x13
#define IRQL_GT_ZERO_AT_SYSTEM_SERVICE 0x4A
#define UNEXPECTED_KERNEL_MODE_TRAP 0x7F
#define ATTEMPTED_SWITCH_FROM_DPC 0xB8
#define HARDWARE_INTERRUPT_STORM 0xF2
//
// IRQL Levels
//
#define PASSIVE_LEVEL 0x0
#define APC_LEVEL 0x1
#define DISPATCH_LEVEL 0x2
#define CLOCK2_LEVEL 0x1C
#define HIGH_LEVEL 0x1F
//
// Quantum Decrements
//
#define CLOCK_QUANTUM_DECREMENT 0x3
#endif
//
// System Call Table definitions
//
#define NUMBER_SERVICE_TABLES 0x0002
#define SERVICE_NUMBER_MASK 0x0FFF
#define SERVICE_TABLE_SHIFT 0x0008
#define SERVICE_TABLE_MASK 0x0010
#define SERVICE_TABLE_TEST 0x0010
#define SERVICE_DESCRIPTOR_BASE 0x0000
#define SERVICE_DESCRIPTOR_COUNT 0x0004
#define SERVICE_DESCRIPTOR_LIMIT 0x0008
#define SERVICE_DESCRIPTOR_NUMBER 0x000C
#define SERVICE_DESCRIPTOR_LENGTH 0x0010
//
// VDM State Pointer
//
#define FIXED_NTVDMSTATE_LINEAR_PC_AT 0x714
//
// Machine types
//
#ifdef __ASM__
#define MACHINE_TYPE_ISA 0x0000
#define MACHINE_TYPE_EISA 0x0001
#define MACHINE_TYPE_MCA 0x0002
//
// Kernel Feature Bits
//
#define KF_RDTSC 0x00000002
//
// Kernel Stack Size
//
#define KERNEL_STACK_SIZE 0x3000
#endif
//
// Generic Definitions
//
#define PRIMARY_VECTOR_BASE 0x30 // FIXME: HACK
#define MAXIMUM_IDTVECTOR 0xFF
#endif // !_ASM_H
================================================
FILE: ndk/cctypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
cctypes.h
Abstract:
Type definitions for the Cache Controller.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _CCTYPES_H
#define _CCTYPES_H
//
// Dependencies
//
#include <umtypes.h>
#ifndef NTOS_MODE_USER
//
// Kernel Exported CcData
//
extern ULONG NTSYSAPI CcFastReadNotPossible;
extern ULONG NTSYSAPI CcFastReadWait;
extern ULONG NTSYSAPI CcFastReadResourceMiss;
extern ULONG NTSYSAPI CcFastReadNoWait;
extern ULONG NTSYSAPI CcFastMdlReadNotPossible;
//
// Virtual Address Control BLock
//
typedef struct _VACB
{
PVOID BaseAddress;
struct _SHARED_CACHE_MAP *SharedCacheMap;
union
{
LARGE_INTEGER FileOffset;
USHORT ActiveCount;
} Overlay;
LIST_ENTRY LruList;
} VACB, *PVACB;
//
// Private Cache Map Structure and Flags
//
typedef struct _PRIVATE_CACHE_MAP_FLAGS
{
ULONG DontUse:16;
ULONG ReadAheadActive:1;
ULONG ReadAheadEnabled:1;
ULONG Available:14;
} PRIVATE_CACHE_MAP_FLAGS;
typedef struct _PRIVATE_CACHE_MAP
{
union
{
CSHORT NodeTypeCode;
PRIVATE_CACHE_MAP_FLAGS Flags;
ULONG UlongFlags;
};
ULONG ReadAheadMask;
PFILE_OBJECT FileObject;
LARGE_INTEGER FileOffset1;
LARGE_INTEGER BeyondLastByte1;
LARGE_INTEGER FileOffset2;
LARGE_INTEGER BeyondLastByte2;
LARGE_INTEGER ReadAheadOffset[2];
ULONG ReadAheadLength[2];
KSPIN_LOCK ReadAheadSpinLock;
LIST_ENTRY PrivateLinks;
} PRIVATE_CACHE_MAP, *PPRIVATE_CACHE_MAP;
#ifdef _NTIFS_INCLUDED_
//
// Shared Cache Map
//
typedef struct _SHARED_CACHE_MAP
{
SHORT NodeTypeCode;
SHORT NodeByteSize;
ULONG OpenCount;
LARGE_INTEGER FileSize;
LIST_ENTRY BcbList;
LARGE_INTEGER SectionSize;
LARGE_INTEGER ValidDataLength;
LARGE_INTEGER ValidDataGoal;
PVACB InitialVacbs[4];
PVACB Vacbs;
PFILE_OBJECT FileObject;
PVACB ActiveVacb;
PVOID NeedToZero;
ULONG ActivePage;
ULONG NeedToZeroPage;
ULONG ActiveVacbSpinLock;
ULONG VacbActiveCount;
ULONG DirtyPages;
LIST_ENTRY SharedCacheMapLinks;
ULONG Flags;
ULONG Status;
PMCB Mbcb;
PVOID Section;
PKEVENT CreateEvent;
PKEVENT WaitOnActiveCount;
ULONG PagesToWrite;
LONGLONG BeyondLastFlush;
PCACHE_MANAGER_CALLBACKS Callbacks;
PVOID LazyWriteContext;
PLIST_ENTRY PrivateList;
PVOID LogHandle;
PVOID FlushToLsnRoutine;
ULONG DirtyPageThreshold;
ULONG LazyWritePassCount;
PCACHE_UNINITIALIZE_EVENT UninitializeEvent;
PVACB NeedToZeroVacb;
ULONG BcbSpinLock;
PVOID Reserved;
KEVENT Event;
PEX_PUSH_LOCK VacbPushLock;
PPRIVATE_CACHE_MAP PrivateCacheMap;
} SHARED_CACHE_MAP;
#endif /* _NTIFS_INCLUDED_ */
#endif /* NTOS_MODE_USER */
#endif /* _CCTYPES_H */
================================================
FILE: ndk/cmfuncs.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
cmfuncs.h
Abstract:
Function definitions for the Configuration Manager.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _CMFUNCS_H
#define _CMFUNCS_H
//
// Dependencies
//
#include <umtypes.h>
#include <cmtypes.h>
//
// Native calls
//
NTSTATUS
NTAPI
NtCompactKeys(
IN ULONG Count,
IN PHANDLE KeyArray
);
NTSTATUS
NTAPI
NtCompressKey(
IN HANDLE Key
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG TitleIndex,
IN PUNICODE_STRING Class OPTIONAL,
IN ULONG CreateOptions,
IN PULONG Disposition OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDeleteKey(
IN HANDLE KeyHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDeleteValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtEnumerateKey(
IN HANDLE KeyHandle,
IN ULONG Index,
IN KEY_INFORMATION_CLASS KeyInformationClass,
OUT PVOID KeyInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtEnumerateValueKey(
IN HANDLE KeyHandle,
IN ULONG Index,
IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
OUT PVOID KeyValueInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtFlushKey(
IN HANDLE KeyHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtGetPlugPlayEvent(
IN ULONG Reserved1,
IN ULONG Reserved2,
OUT PPLUGPLAY_EVENT_BLOCK Buffer,
IN ULONG BufferSize
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtInitializeRegistry(
USHORT Flag
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtLoadKey(
IN POBJECT_ATTRIBUTES KeyObjectAttributes,
IN POBJECT_ATTRIBUTES FileObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtLoadKey2(
IN POBJECT_ATTRIBUTES KeyObjectAttributes,
IN POBJECT_ATTRIBUTES FileObjectAttributes,
IN ULONG Flags
);
NTSTATUS
NTAPI
NtLoadKeyEx(
IN POBJECT_ATTRIBUTES TargetKey,
IN POBJECT_ATTRIBUTES SourceFile,
IN ULONG Flags,
IN HANDLE TrustClassKey
);
NTSTATUS
NTAPI
NtLockProductActivationKeys(
IN PULONG pPrivateVer,
IN PULONG pSafeMode
);
NTSTATUS
NTAPI
NtLockRegistryKey(
IN HANDLE KeyHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtNotifyChangeKey(
IN HANDLE KeyHandle,
IN HANDLE Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
IN BOOLEAN Asynchroneous,
OUT PVOID ChangeBuffer,
IN ULONG Length,
IN BOOLEAN WatchSubtree
);
NTSTATUS
NTAPI
NtNotifyChangeMultipleKeys(
IN HANDLE MasterKeyHandle,
IN ULONG Count,
IN POBJECT_ATTRIBUTES SlaveObjects,
IN HANDLE Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
IN BOOLEAN WatchTree,
OUT PVOID Buffer,
IN ULONG Length,
IN BOOLEAN Asynchronous
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtPlugPlayControl(
IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
IN OUT PVOID Buffer,
IN ULONG BufferSize
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryKey(
IN HANDLE KeyHandle,
IN KEY_INFORMATION_CLASS KeyInformationClass,
OUT PVOID KeyInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryMultipleValueKey(
IN HANDLE KeyHandle,
IN OUT PKEY_VALUE_ENTRY ValueList,
IN ULONG NumberOfValues,
OUT PVOID Buffer,
IN OUT PULONG Length,
OUT PULONG ReturnLength
);
NTSTATUS
NTAPI
NtQueryOpenSubKeys(
IN POBJECT_ATTRIBUTES TargetKey,
IN ULONG HandleCount
);
NTSTATUS
NTAPI
NtQueryOpenSubKeysEx(
IN POBJECT_ATTRIBUTES TargetKey,
IN ULONG BufferLength,
IN PVOID Buffer,
IN PULONG RequiredSize
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName,
IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
OUT PVOID KeyValueInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRenameKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ReplacementName
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtReplaceKey(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN HANDLE Key,
IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRestoreKey(
IN HANDLE KeyHandle,
IN HANDLE FileHandle,
IN ULONG RestoreFlags
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSaveKey(
IN HANDLE KeyHandle,
IN HANDLE FileHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSaveKeyEx(
IN HANDLE KeyHandle,
IN HANDLE FileHandle,
IN ULONG Flags
);
NTSTATUS
NTAPI
NtSaveMergedKeys(
IN HANDLE HighPrecedenceKeyHandle,
IN HANDLE LowPrecedenceKeyHandle,
IN HANDLE FileHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationKey(
IN HANDLE KeyHandle,
IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
IN PVOID KeyInformation,
IN ULONG KeyInformationLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName,
IN ULONG TitleIndex OPTIONAL,
IN ULONG Type,
IN PVOID Data,
IN ULONG DataSize
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtUnloadKey(
IN POBJECT_ATTRIBUTES KeyObjectAttributes
);
NTSTATUS
NTAPI
NtUnloadKey2(
IN POBJECT_ATTRIBUTES TargetKey,
IN ULONG Flags
);
NTSTATUS
NTAPI
NtUnloadKeyEx(
IN POBJECT_ATTRIBUTES TargetKey,
IN HANDLE Event
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG TitleIndex,
IN PUNICODE_STRING Class OPTIONAL,
IN ULONG CreateOptions,
IN PULONG Disposition OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwDeleteKey(
IN HANDLE KeyHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwDeleteValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName
);
NTSYSAPI
NTSTATUS
NTAPI
ZwEnumerateKey(
IN HANDLE KeyHandle,
IN ULONG Index,
IN KEY_INFORMATION_CLASS KeyInformationClass,
OUT PVOID KeyInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwEnumerateValueKey(
IN HANDLE KeyHandle,
IN ULONG Index,
IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
OUT PVOID KeyValueInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwFlushKey(
IN HANDLE KeyHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwGetPlugPlayEvent(
IN ULONG Reserved1,
IN ULONG Reserved2,
OUT PPLUGPLAY_EVENT_BLOCK Buffer,
IN ULONG BufferSize
);
NTSYSAPI
NTSTATUS
NTAPI
ZwLoadKey(
IN POBJECT_ATTRIBUTES KeyObjectAttributes,
IN POBJECT_ATTRIBUTES FileObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwLoadKey2(
IN POBJECT_ATTRIBUTES KeyObjectAttributes,
IN POBJECT_ATTRIBUTES FileObjectAttributes,
IN ULONG Flags
);
NTSYSAPI
NTSTATUS
NTAPI
ZwNotifyChangeKey(
IN HANDLE KeyHandle,
IN HANDLE Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
IN PVOID ApcContext OPTIONAL,
OUT PIO_STATUS_BLOCK IoStatusBlock,
IN ULONG CompletionFilter,
IN BOOLEAN Asynchroneous,
OUT PVOID ChangeBuffer,
IN ULONG Length,
IN BOOLEAN WatchSubtree
);
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenKey(
OUT PHANDLE KeyHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwPlugPlayControl(
IN PLUGPLAY_CONTROL_CLASS PlugPlayControlClass,
IN OUT PVOID Buffer,
IN ULONG BufferSize
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryKey(
IN HANDLE KeyHandle,
IN KEY_INFORMATION_CLASS KeyInformationClass,
OUT PVOID KeyInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryMultipleValueKey(
IN HANDLE KeyHandle,
IN OUT PKEY_VALUE_ENTRY ValueList,
IN ULONG NumberOfValues,
OUT PVOID Buffer,
IN OUT PULONG Length,
OUT PULONG ReturnLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName,
IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass,
OUT PVOID KeyValueInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwReplaceKey(
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN HANDLE Key,
IN POBJECT_ATTRIBUTES ReplacedObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwRestoreKey(
IN HANDLE KeyHandle,
IN HANDLE FileHandle,
IN ULONG RestoreFlags
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSaveKey(
IN HANDLE KeyHandle,
IN HANDLE FileHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSaveKeyEx(
IN HANDLE KeyHandle,
IN HANDLE FileHandle,
IN ULONG Flags
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetInformationKey(
IN HANDLE KeyHandle,
IN KEY_SET_INFORMATION_CLASS KeyInformationClass,
IN PVOID KeyInformation,
IN ULONG KeyInformationLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetValueKey(
IN HANDLE KeyHandle,
IN PUNICODE_STRING ValueName,
IN ULONG TitleIndex OPTIONAL,
IN ULONG Type,
IN PVOID Data,
IN ULONG DataSize
);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwInitializeRegistry(
USHORT Flag
);
NTSYSAPI
NTSTATUS
NTAPI
ZwUnloadKey(
IN POBJECT_ATTRIBUTES KeyObjectAttributes
);
#endif
================================================
FILE: ndk/cmtypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
cmtypes.h
Abstract:
Type definitions for the Configuration Manager.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _CMTYPES_H
#define _CMTYPES_H
//
// Dependencies
//
#include <umtypes.h>
#include <cfg.h>
#include <iotypes.h>
#define MAX_BUS_NAME 24
//
// PLUGPLAY_CONTROL_RELATED_DEVICE_DATA.Relations
//
#define PNP_GET_PARENT_DEVICE 1
#define PNP_GET_CHILD_DEVICE 2
#define PNP_GET_SIBLING_DEVICE 3
//
// PLUGPLAY_CONTROL_STATUS_DATA Operations
//
#define PNP_GET_DEVICE_STATUS 0
#define PNP_SET_DEVICE_STATUS 1
#define PNP_CLEAR_DEVICE_STATUS 2
#ifdef NTOS_MODE_USER
//
// Resource Type
//
#define CmResourceTypeNull 0
#define CmResourceTypePort 1
#define CmResourceTypeInterrupt 2
#define CmResourceTypeMemory 3
#define CmResourceTypeDma 4
#define CmResourceTypeDeviceSpecific 5
#define CmResourceTypeBusNumber 6
#define CmResourceTypeMaximum 7
#define CmResourceTypeNonArbitrated 128
#define CmResourceTypeConfigData 128
#define CmResourceTypeDevicePrivate 129
#define CmResourceTypePcCardConfig 130
#define CmResourceTypeMfCardConfig 131
//
// Resource Descriptor Share Dispositions
//
typedef enum _CM_SHARE_DISPOSITION
{
CmResourceShareUndetermined,
CmResourceShareDeviceExclusive,
CmResourceShareDriverExclusive,
CmResourceShareShared
} CM_SHARE_DISPOSITION;
#endif
//
// Port Resource Descriptor Flags
//
#define CM_RESOURCE_PORT_MEMORY 0x0000
#define CM_RESOURCE_PORT_IO 0x0001
#define CM_RESOURCE_PORT_10_BIT_DECODE 0x0004
#define CM_RESOURCE_PORT_12_BIT_DECODE 0x0008
#define CM_RESOURCE_PORT_16_BIT_DECODE 0x0010
#define CM_RESOURCE_PORT_POSITIVE_DECODE 0x0020
#define CM_RESOURCE_PORT_PASSIVE_DECODE 0x0040
#define CM_RESOURCE_PORT_WINDOW_DECODE 0x0080
//
// Memory Resource Descriptor Flags
//
#define CM_RESOURCE_MEMORY_READ_WRITE 0x0000
#define CM_RESOURCE_MEMORY_READ_ONLY 0x0001
#define CM_RESOURCE_MEMORY_WRITE_ONLY 0x0002
#define CM_RESOURCE_MEMORY_PREFETCHABLE 0x0004
#define CM_RESOURCE_MEMORY_COMBINEDWRITE 0x0008
#define CM_RESOURCE_MEMORY_24 0x0010
#define CM_RESOURCE_MEMORY_CACHEABLE 0x0020
//
// DMA Resource Descriptor Flags
//
#define CM_RESOURCE_DMA_8 0x0000
#define CM_RESOURCE_DMA_16 0x0001
#define CM_RESOURCE_DMA_32 0x0002
#define CM_RESOURCE_DMA_8_AND_16 0x0004
#define CM_RESOURCE_DMA_BUS_MASTER 0x0008
#define CM_RESOURCE_DMA_TYPE_A 0x0010
#define CM_RESOURCE_DMA_TYPE_B 0x0020
#define CM_RESOURCE_DMA_TYPE_F 0x0040
//
// NtInitializeRegistry Flags
//
#define CM_BOOT_FLAG_SMSS 0x0000
#define CM_BOOT_FLAG_SETUP 0x0001
#define CM_BOOT_FLAG_ACCEPTED 0x0002
#define CM_BOOT_FLAG_MAX 0x03E9
#ifdef NTOS_MODE_USER
//
// Information Classes for NtQueryKey
//
typedef enum _KEY_INFORMATION_CLASS
{
KeyBasicInformation,
KeyNodeInformation,
KeyFullInformation,
KeyNameInformation,
KeyCachedInformation,
KeyFlagsInformation
} KEY_INFORMATION_CLASS;
typedef enum _KEY_VALUE_INFORMATION_CLASS
{
KeyValueBasicInformation,
KeyValueFullInformation,
KeyValuePartialInformation,
KeyValueFullInformationAlign64,
KeyValuePartialInformationAlign64
} KEY_VALUE_INFORMATION_CLASS;
typedef enum _KEY_SET_INFORMATION_CLASS
{
KeyWriteTimeInformation,
KeyUserFlagsInformation,
MaxKeySetInfoClass
} KEY_SET_INFORMATION_CLASS;
#endif
//
// Plag and Play Classes
//
typedef enum _PLUGPLAY_CONTROL_CLASS
{
PlugPlayControlUserResponse = 0x07,
PlugPlayControlProperty = 0x0A,
PlugPlayControlGetRelatedDevice = 0x0C,
PlugPlayControlDeviceStatus = 0x0E,
PlugPlayControlGetDeviceDepth,
PlugPlayControlResetDevice = 0x14
} PLUGPLAY_CONTROL_CLASS;
typedef enum _PLUGPLAY_BUS_CLASS
{
SystemBus,
PlugPlayVirtualBus,
MaxPlugPlayBusClass
} PLUGPLAY_BUS_CLASS, *PPLUGPLAY_BUS_CLASS;
//
// Plag and Play Bus Types
//
typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
{
Root,
MaxPlugPlayVirtualBusType
} PLUGPLAY_VIRTUAL_BUS_TYPE, *PPLUGPLAY_VIRTUAL_BUS_TYPE;
//
// Plag and Play Event Categories
//
typedef enum _PLUGPLAY_EVENT_CATEGORY
{
HardwareProfileChangeEvent,
TargetDeviceChangeEvent,
DeviceClassChangeEvent,
CustomDeviceEvent,
DeviceInstallEvent,
DeviceArrivalEvent,
PowerEvent,
VetoEvent,
BlockedDriverEvent,
MaxPlugEventCategory
} PLUGPLAY_EVENT_CATEGORY;
#ifdef NTOS_MODE_USER
//
// Information Structures for NtQueryKeyInformation
//
typedef struct _KEY_WRITE_TIME_INFORMATION
{
LARGE_INTEGER LastWriteTime;
} KEY_WRITE_TIME_INFORMATION, *PKEY_WRITE_TIME_INFORMATION;
typedef struct _KEY_USER_FLAGS_INFORMATION
{
ULONG UserFlags;
} KEY_USER_FLAGS_INFORMATION, *PKEY_USER_FLAGS_INFORMATION;
typedef struct _KEY_FULL_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG ClassOffset;
ULONG ClassLength;
ULONG SubKeys;
ULONG MaxNameLen;
ULONG MaxClassLen;
ULONG Values;
ULONG MaxValueNameLen;
ULONG MaxValueDataLen;
WCHAR Class[1];
} KEY_FULL_INFORMATION, *PKEY_FULL_INFORMATION;
typedef struct _KEY_NAME_INFORMATION
{
WCHAR Name[1];
} KEY_NAME_INFORMATION, *PKEY_NAME_INFORMATION;
typedef struct _KEY_NODE_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG ClassOffset;
ULONG ClassLength;
ULONG NameLength;
WCHAR Name[1];
} KEY_NODE_INFORMATION, *PKEY_NODE_INFORMATION;
typedef struct _KEY_VALUE_ENTRY
{
PUNICODE_STRING ValueName;
ULONG DataLength;
ULONG DataOffset;
ULONG Type;
} KEY_VALUE_ENTRY, *PKEY_VALUE_ENTRY;
typedef struct _KEY_VALUE_PARTIAL_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG DataLength;
UCHAR Data[1];
} KEY_VALUE_PARTIAL_INFORMATION, *PKEY_VALUE_PARTIAL_INFORMATION;
typedef struct _KEY_VALUE_BASIC_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG NameLength;
WCHAR Name[1];
} KEY_VALUE_BASIC_INFORMATION, *PKEY_VALUE_BASIC_INFORMATION;
typedef struct _KEY_VALUE_FULL_INFORMATION
{
ULONG TitleIndex;
ULONG Type;
ULONG DataOffset;
ULONG DataLength;
ULONG NameLength;
WCHAR Name[1];
} KEY_VALUE_FULL_INFORMATION, *PKEY_VALUE_FULL_INFORMATION;
typedef struct _KEY_BASIC_INFORMATION
{
LARGE_INTEGER LastWriteTime;
ULONG TitleIndex;
ULONG NameLength;
WCHAR Name[1];
} KEY_BASIC_INFORMATION, *PKEY_BASIC_INFORMATION;
#endif
//
// Plug and Play Event Block
//
typedef struct _PLUGPLAY_EVENT_BLOCK
{
GUID EventGuid;
PLUGPLAY_EVENT_CATEGORY EventCategory;
PULONG Result;
ULONG Flags;
ULONG TotalSize;
PVOID DeviceObject;
union
{
struct
{
GUID ClassGuid;
WCHAR SymbolicLinkName[ANYSIZE_ARRAY];
} DeviceClass;
struct
{
WCHAR DeviceIds[ANYSIZE_ARRAY];
} TargetDevice;
struct
{
WCHAR DeviceId[ANYSIZE_ARRAY];
} InstallDevice;
struct
{
PVOID NotificationStructure;
WCHAR DeviceIds[ANYSIZE_ARRAY];
} CustomNotification;
struct
{
PVOID Notification;
} ProfileNotification;
struct
{
ULONG NotificationCode;
ULONG NotificationData;
} PowerNotification;
struct
{
PNP_VETO_TYPE VetoType;
WCHAR DeviceIdVetoNameBuffer[ANYSIZE_ARRAY];
} VetoNotification;
struct
{
GUID BlockedDriverGuid;
} BlockedDriverNotification;
};
} PLUGPLAY_EVENT_BLOCK, *PPLUGPLAY_EVENT_BLOCK;
//
// Plug and Play Control Classes
//
//Class 0x0A
typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
{
UNICODE_STRING DeviceInstance;
ULONG Property;
PVOID Buffer;
ULONG BufferSize;
} PLUGPLAY_CONTROL_PROPERTY_DATA, *PPLUGPLAY_CONTROL_PROPERTY_DATA;
// Class 0x0C
typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
{
UNICODE_STRING TargetDeviceInstance;
ULONG Relation;
PWCHAR RelatedDeviceInstance;
ULONG RelatedDeviceInstanceLength;
} PLUGPLAY_CONTROL_RELATED_DEVICE_DATA, *PPLUGPLAY_CONTROL_RELATED_DEVICE_DATA;
// Class 0x0E
typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
{
UNICODE_STRING DeviceInstance;
ULONG Operation;
ULONG DeviceStatus;
ULONG DeviceProblem;
} PLUGPLAY_CONTROL_STATUS_DATA, *PPLUGPLAY_CONTROL_STATUS_DATA;
// Class 0x0F
typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
{
UNICODE_STRING DeviceInstance;
ULONG Depth;
} PLUGPLAY_CONTROL_DEPTH_DATA, *PPLUGPLAY_CONTROL_DEPTH_DATA;
// Class 0x14
typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
{
UNICODE_STRING DeviceInstance;
} PLUGPLAY_CONTROL_RESET_DEVICE_DATA, *PPLUGPLAY_CONTROL_RESET_DEVICE_DATA;
//
// Plug and Play Bus Type Definition
//
typedef struct _PLUGPLAY_BUS_TYPE
{
PLUGPLAY_BUS_CLASS BusClass;
union
{
INTERFACE_TYPE SystemBusType;
PLUGPLAY_VIRTUAL_BUS_TYPE PlugPlayVirtualBusType;
};
} PLUGPLAY_BUS_TYPE, *PPLUGPLAY_BUS_TYPE;
//
// Plug and Play Bus Instance Definition
//
typedef struct _PLUGPLAY_BUS_INSTANCE
{
PLUGPLAY_BUS_TYPE BusType;
ULONG BusNumber;
WCHAR BusName[MAX_BUS_NAME];
} PLUGPLAY_BUS_INSTANCE, *PPLUGPLAY_BUS_INSTANCE;
#ifdef NTOS_MODE_USER
//
// Partial Resource Descriptor and List for Hardware
//
#include <pshpack1.h>
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
{
UCHAR Type;
UCHAR ShareDisposition;
USHORT Flags;
union
{
struct
{
PHYSICAL_ADDRESS Start;
ULONG Length;
} Generic;
struct
{
PHYSICAL_ADDRESS Start;
ULONG Length;
} Port;
struct
{
ULONG Level;
ULONG Vector;
ULONG Affinity;
} Interrupt;
struct
{
PHYSICAL_ADDRESS Start;
ULONG Length;
} Memory;
struct
{
ULONG Channel;
ULONG Port;
ULONG Reserved1;
} Dma;
struct
{
ULONG Data[3];
} DevicePrivate;
struct
{
ULONG Start;
ULONG Length;
ULONG Reserved;
} BusNumber;
struct
{
ULONG DataSize;
ULONG Reserved1;
ULONG Reserved2;
} DeviceSpecificData;
} u;
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
typedef struct _CM_PARTIAL_RESOURCE_LIST
{
USHORT Version;
USHORT Revision;
ULONG Count;
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
//
// Full Resource Descriptor and List for Hardware
//
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
{
INTERFACE_TYPE InterfaceType;
ULONG BusNumber;
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
typedef struct _CM_RESOURCE_LIST
{
ULONG Count;
CM_FULL_RESOURCE_DESCRIPTOR List[1];
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
//
// ROM Block Structure
//
typedef struct _CM_ROM_BLOCK
{
ULONG Address;
ULONG Size;
} CM_ROM_BLOCK, *PCM_ROM_BLOCK;
//
// Disk/INT13 Structures
//
typedef struct _CM_INT13_DRIVE_PARAMETER
{
USHORT DriveSelect;
ULONG MaxCylinders;
USHORT SectorsPerTrack;
USHORT MaxHeads;
USHORT NumberDrives;
} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
{
ULONG BytesPerSector;
ULONG NumberOfCylinders;
ULONG SectorsPerTrack;
ULONG NumberOfHeads;
} CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA;
#include <poppack.h>
#endif // _!NTOS_MODE_USER
#endif // _CMTYPES_H
================================================
FILE: ndk/dbgkfuncs.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
dbgkfuncs.h
Abstract:
Function definitions for the User Mode Debugging Facility.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _DBGKFUNCS_H
#define _DBGKFUNCS_H
//
// Dependencies
//
#include <umtypes.h>
#include <dbgktypes.h>
//
// Native calls
//
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDebugActiveProcess(
IN HANDLE Process,
IN HANDLE DebugObject
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateDebugObject(
OUT PHANDLE DebugHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN BOOLEAN KillProcessOnExit
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDebugContinue(
IN HANDLE DebugObject,
IN PCLIENT_ID AppClientId,
IN NTSTATUS ContinueStatus
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitForDebugEvent(
IN HANDLE DebugObject,
IN BOOLEAN Alertable,
IN PLARGE_INTEGER Timeout OPTIONAL,
OUT PDBGUI_WAIT_STATE_CHANGE StateChange
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRemoveProcessDebug(
IN HANDLE Process,
IN HANDLE DebugObject
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetInformationDebugObject(
IN HANDLE DebugObject,
IN DEBUGOBJECTINFOCLASS InformationClass,
IN PVOID Information,
IN ULONG InformationLength,
OUT PULONG ReturnLength OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwDebugActiveProcess(
IN HANDLE Process,
IN HANDLE DebugObject
);
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateDebugObject(
OUT PHANDLE DebugHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN BOOLEAN KillProcessOnExit
);
NTSYSAPI
NTSTATUS
NTAPI
ZwDebugContinue(
IN HANDLE DebugObject,
IN PCLIENT_ID AppClientId,
IN NTSTATUS ContinueStatus
);
NTSYSAPI
NTSTATUS
NTAPI
ZwRemoveProcessDebug(
IN HANDLE Process,
IN HANDLE DebugObject
);
NTSYSAPI
NTSTATUS
NTAPI
ZwWaitForDebugEvent(
IN HANDLE DebugObject,
IN BOOLEAN Alertable,
IN PLARGE_INTEGER Timeout OPTIONAL,
OUT PDBGUI_WAIT_STATE_CHANGE StateChange
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetInformationDebugObject(
IN HANDLE DebugObject,
IN DEBUGOBJECTINFOCLASS InformationClass,
IN PVOID Information,
IN ULONG InformationLength,
OUT PULONG ReturnLength OPTIONAL
);
#endif
================================================
FILE: ndk/dbgktypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
dbgktypes.h
Abstract:
Type definitions for the User Mode Debugging Facility.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _DBGKTYPES_H
#define _DBGKTYPES_H
//
// Dependencies
//
#include <umtypes.h>
#include <lpctypes.h>
//
// Debug Object Access Masks
//
#define DEBUG_OBJECT_WAIT_STATE_CHANGE 0x0001
#define DEBUG_OBJECT_ADD_REMOVE_PROCESS 0x0002
#define DEBUG_OBJECT_SET_INFORMATION 0x0004
#define DEBUG_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x0F)
//
// Debug Object Information Classes for NtQueryDebugObject
//
typedef enum _DEBUGOBJECTINFOCLASS
{
DebugObjectUnusedInformation,
DebugObjectKillProcessOnExitInformation
} DEBUGOBJECTINFOCLASS, *PDEBUGOBJECTINFOCLASS;
//
// Debug Message API Number
//
typedef enum _DBGKM_APINUMBER
{
DbgKmExceptionApi = 0,
DbgKmCreateThreadApi = 1,
DbgKmCreateProcessApi = 2,
DbgKmExitThreadApi = 3,
DbgKmExitProcessApi = 4,
DbgKmLoadDllApi = 5,
DbgKmUnloadDllApi = 6,
DbgKmErrorReportApi = 7,
DbgKmMaxApiNumber = 8,
} DBGKM_APINUMBER;
//
// Debug Object Information Structures
//
typedef struct _DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION
{
ULONG KillProcessOnExit;
} DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION, *PDEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION;
#ifndef NTOS_MODE_USER
//
// Debug Object
//
typedef struct _DEBUG_OBJECT
{
KEVENT EventsPresent;
FAST_MUTEX Mutex;
LIST_ENTRY EventList;
union
{
ULONG Flags;
struct
{
UCHAR DebuggerInactive:1;
UCHAR KillProcessOnExit:1;
};
};
} DEBUG_OBJECT, *PDEBUG_OBJECT;
#endif
//
// Debug States
//
typedef enum _DBG_STATE
{
DbgIdle,
DbgReplyPending,
DbgCreateThreadStateChange,
DbgCreateProcessStateChange,
DbgExitThreadStateChange,
DbgExitProcessStateChange,
DbgExceptionStateChange,
DbgBreakpointStateChange,
DbgSingleStepStateChange,
DbgLoadDllStateChange,
DbgUnloadDllStateChange
} DBG_STATE, *PDBG_STATE;
//
// Debug Message Structures
//
typedef struct _DBGKM_EXCEPTION
{
EXCEPTION_RECORD ExceptionRecord;
ULONG FirstChance;
} DBGKM_EXCEPTION, *PDBGKM_EXCEPTION;
typedef struct _DBGKM_CREATE_THREAD
{
ULONG SubSystemKey;
PVOID StartAddress;
} DBGKM_CREATE_THREAD, *PDBGKM_CREATE_THREAD;
typedef struct _DBGKM_CREATE_PROCESS
{
ULONG SubSystemKey;
HANDLE FileHandle;
PVOID BaseOfImage;
ULONG DebugInfoFileOffset;
ULONG DebugInfoSize;
DBGKM_CREATE_THREAD InitialThread;
} DBGKM_CREATE_PROCESS, *PDBGKM_CREATE_PROCESS;
typedef struct _DBGKM_EXIT_THREAD
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_THREAD, *PDBGKM_EXIT_THREAD;
typedef struct _DBGKM_EXIT_PROCESS
{
NTSTATUS ExitStatus;
} DBGKM_EXIT_PROCESS, *PDBGKM_EXIT_PROCESS;
typedef struct _DBGKM_LOAD_DLL
{
HANDLE FileHandle;
PVOID BaseOfDll;
ULONG DebugInfoFileOffset;
ULONG DebugInfoSize;
PVOID NamePointer;
} DBGKM_LOAD_DLL, *PDBGKM_LOAD_DLL;
typedef struct _DBGKM_UNLOAD_DLL
{
PVOID BaseAddress;
} DBGKM_UNLOAD_DLL, *PDBGKM_UNLOAD_DLL;
//
// User-Mode Debug State Change Structure
//
typedef struct _DBGUI_WAIT_STATE_CHANGE
{
DBG_STATE NewState;
CLIENT_ID AppClientId;
union
{
struct
{
HANDLE HandleToThread;
DBGKM_CREATE_THREAD NewThread;
} CreateThread;
struct
{
HANDLE HandleToProcess;
HANDLE HandleToThread;
DBGKM_CREATE_PROCESS NewProcess;
} CreateProcessInfo;
DBGKM_EXIT_THREAD ExitThread;
DBGKM_EXIT_PROCESS ExitProcess;
DBGKM_EXCEPTION Exception;
DBGKM_LOAD_DLL LoadDll;
DBGKM_UNLOAD_DLL UnloadDll;
} StateInfo;
} DBGUI_WAIT_STATE_CHANGE, *PDBGUI_WAIT_STATE_CHANGE;
//
// LPC Debug Message
//
typedef struct _DBGKM_MSG
{
PORT_MESSAGE h;
DBGKM_APINUMBER ApiNumber;
ULONG ReturnedStatus;
union
{
DBGKM_EXCEPTION Exception;
DBGKM_CREATE_THREAD CreateThread;
DBGKM_CREATE_PROCESS CreateProcess;
DBGKM_EXIT_THREAD ExitThread;
DBGKM_EXIT_PROCESS ExitProcess;
DBGKM_LOAD_DLL LoadDll;
DBGKM_UNLOAD_DLL UnloadDll;
};
} DBGKM_MSG, *PDBGKM_MSG;
#ifndef NTOS_MODE_USER
//
// Debug Event
//
typedef struct _DEBUG_EVENT
{
LIST_ENTRY EventList;
KEVENT ContinueEvent;
CLIENT_ID ClientId;
PEPROCESS Process;
PETHREAD Thread;
NTSTATUS Status;
ULONG Flags;
PETHREAD BackoutThread;
DBGKM_MSG ApiMsg;
} DEBUG_EVENT, *PDEBUG_EVENT;
#endif
#endif
================================================
FILE: ndk/exfuncs.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
exfuncs.h
Abstract:
Function definitions for the Executive.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _EXFUNCS_H
#define _EXFUNCS_H
//
// Dependencies
//
#include <umtypes.h>
#include <pstypes.h>
#include <extypes.h>
//
// Don't include WMI headers just for one define
//
typedef struct _EVENT_TRACE_HEADER *PEVENT_TRACE_HEADER;
#ifndef NTOS_MODE_USER
//
// Fast Mutex functions
//
VOID
FASTCALL
ExEnterCriticalRegionAndAcquireFastMutexUnsafe(
PFAST_MUTEX FastMutex
);
VOID
FASTCALL
ExReleaseFastMutexUnsafeAndLeaveCriticalRegion(
PFAST_MUTEX FastMutex
);
//
// Pushlock functions
//
VOID
FASTCALL
ExfAcquirePushLockExclusive(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfAcquirePushLockShared(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfReleasePushLock(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfReleasePushLockExclusive(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfReleasePushLockShared(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfTryToWakePushLock(
PEX_PUSH_LOCK PushLock
);
VOID
FASTCALL
ExfUnblockPushLock(
PEX_PUSH_LOCK PushLock,
PVOID CurrentWaitBlock
);
//
// Resource Functions
//
NTKERNELAPI
BOOLEAN
NTAPI
ExTryToAcquireResourceExclusiveLite(
IN PERESOURCE Resource
);
//
// Handle Table Functions
//
NTKERNELAPI
BOOLEAN
NTAPI
ExEnumHandleTable(
IN PHANDLE_TABLE HandleTable,
IN PEX_ENUM_HANDLE_CALLBACK EnumHandleProcedure,
IN OUT PVOID Context,
OUT PHANDLE Handle OPTIONAL
);
#endif
//
// Native Calls
//
NTSYSCALLAPI
NTSTATUS
NTAPI
NtAddAtom(
IN PWSTR AtomName,
IN ULONG AtomNameLength,
IN OUT PRTL_ATOM Atom
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCancelTimer(
IN HANDLE TimerHandle,
OUT PBOOLEAN CurrentState OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtClearEvent(
IN HANDLE EventHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN EVENT_TYPE EventType,
IN BOOLEAN InitialState
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateKeyedEvent(
OUT PHANDLE KeyedEventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN ULONG Flags
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateMutant(
OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN BOOLEAN InitialOwner
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateSemaphore(
OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN LONG InitialCount,
IN LONG MaximumCount
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateTimer(
OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN TIMER_TYPE TimerType
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDeleteAtom(
IN RTL_ATOM Atom
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDisplayString(
IN PUNICODE_STRING DisplayString
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtDrawText(
IN PUNICODE_STRING DisplayString
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtEnumerateSystemEnvironmentValuesEx(
IN ULONG InformationClass,
IN PVOID Buffer,
IN ULONG BufferLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtFindAtom(
IN PWSTR AtomName,
IN ULONG AtomNameLength,
OUT PRTL_ATOM Atom OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenKeyedEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenMutant(
OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenSemaphore(
OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAcces,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtOpenTimer(
OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtPulseEvent(
IN HANDLE EventHandle,
IN PLONG PulseCount OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryDefaultLocale(
IN BOOLEAN UserProfile,
OUT PLCID DefaultLocaleId
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryDefaultUILanguage(
PLANGID LanguageId
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryEvent(
IN HANDLE EventHandle,
IN EVENT_INFORMATION_CLASS EventInformationClass,
OUT PVOID EventInformation,
IN ULONG EventInformationLength,
OUT PULONG ReturnLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryInformationAtom(
IN RTL_ATOM Atom,
IN ATOM_INFORMATION_CLASS AtomInformationClass,
OUT PVOID AtomInformation,
IN ULONG AtomInformationLength,
OUT PULONG ReturnLength OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryInstallUILanguage(
PLANGID LanguageId
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryMutant(
IN HANDLE MutantHandle,
IN MUTANT_INFORMATION_CLASS MutantInformationClass,
OUT PVOID MutantInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQuerySemaphore(
IN HANDLE SemaphoreHandle,
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
OUT PVOID SemaphoreInformation,
IN ULONG Length,
OUT PULONG ReturnLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQuerySystemEnvironmentValue(
IN PUNICODE_STRING Name,
OUT PWSTR Value,
ULONG Length,
PULONG ReturnLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQuerySystemEnvironmentValueEx(
IN PUNICODE_STRING VariableName,
IN LPGUID VendorGuid,
IN PVOID Value,
IN OUT PULONG ReturnLength,
IN OUT PULONG Attributes
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQuerySystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
OUT PVOID SystemInformation,
IN SIZE_T Length,
OUT PSIZE_T ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtQueryTimer(
IN HANDLE TimerHandle,
IN TIMER_INFORMATION_CLASS TimerInformationClass,
OUT PVOID TimerInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtRaiseHardError(
IN NTSTATUS ErrorStatus,
IN ULONG NumberOfParameters,
IN ULONG UnicodeStringParameterMask,
IN PULONG_PTR Parameters,
IN ULONG ValidResponseOptions,
OUT PULONG Response
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtReleaseMutant(
IN HANDLE MutantHandle,
IN PLONG ReleaseCount OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtReleaseKeyedEvent(
IN HANDLE EventHandle,
IN PVOID Key,
IN BOOLEAN Alertable,
IN PLARGE_INTEGER Timeout OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtReleaseSemaphore(
IN HANDLE SemaphoreHandle,
IN LONG ReleaseCount,
OUT PLONG PreviousCount
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtResetEvent(
IN HANDLE EventHandle,
OUT PLONG NumberOfWaitingThreads OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetDefaultLocale(
IN BOOLEAN UserProfile,
IN LCID DefaultLocaleId
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetDefaultUILanguage(
LANGID LanguageId
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetDefaultHardErrorPort(
IN HANDLE PortHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetEvent(
IN HANDLE EventHandle,
OUT PLONG PreviousState OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetEventBoostPriority(
IN HANDLE EventHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetHighEventPair(
IN HANDLE EventPairHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetHighWaitLowEventPair(
IN HANDLE EventPairHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetLowEventPair(
HANDLE EventPair
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetLowWaitHighEventPair(
HANDLE EventPair
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemEnvironmentValue(
IN PUNICODE_STRING VariableName,
IN PUNICODE_STRING Value
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemEnvironmentValueEx(
IN PUNICODE_STRING VariableName,
IN LPGUID VendorGuid
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetSystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
IN PVOID SystemInformation,
IN SIZE_T SystemInformationLength
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetTimer(
IN HANDLE TimerHandle,
IN PLARGE_INTEGER DueTime,
IN PTIMER_APC_ROUTINE TimerApcRoutine,
IN PVOID TimerContext,
IN BOOLEAN WakeTimer,
IN LONG Period OPTIONAL,
OUT PBOOLEAN PreviousState OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtSetUuidSeed(
IN PUCHAR UuidSeed
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtShutdownSystem(
IN SHUTDOWN_ACTION Action
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitForKeyedEvent(
IN HANDLE EventHandle,
IN PVOID Key,
IN BOOLEAN Alertable,
IN PLARGE_INTEGER Timeout OPTIONAL
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitHighEventPair(
IN HANDLE EventPairHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtWaitLowEventPair(
IN HANDLE EventPairHandle
);
NTSYSCALLAPI
NTSTATUS
NTAPI
NtTraceEvent(
IN ULONG TraceHandle,
IN ULONG Flags,
IN ULONG TraceHeaderLength,
IN PEVENT_TRACE_HEADER TraceHeader
);
NTSYSAPI
NTSTATUS
NTAPI
ZwAddAtom(
IN PWSTR AtomName,
IN ULONG AtomNameLength,
IN OUT PRTL_ATOM Atom
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
ZwCancelTimer(
IN HANDLE TimerHandle,
OUT PBOOLEAN CurrentState OPTIONAL
);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwClearEvent(
IN HANDLE EventHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN EVENT_TYPE EventType,
IN BOOLEAN InitialState
);
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateMutant(
OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN BOOLEAN InitialOwner
);
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateSemaphore(
OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN LONG InitialCount,
IN LONG MaximumCount
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
ZwCreateTimer(
OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN TIMER_TYPE TimerType
);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwDeleteAtom(
IN RTL_ATOM Atom
);
NTSYSAPI
NTSTATUS
NTAPI
ZwDisplayString(
IN PUNICODE_STRING DisplayString
);
NTSYSAPI
NTSTATUS
NTAPI
ZwFindAtom(
IN PWSTR AtomName,
IN ULONG AtomNameLength,
OUT PRTL_ATOM Atom OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenEvent(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenEventPair(
OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenMutant(
OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenSemaphore(
OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAcces,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
ZwOpenTimer(
OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwPulseEvent(
IN HANDLE EventHandle,
IN PLONG PulseCount OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryDefaultLocale(
IN BOOLEAN UserProfile,
OUT PLCID DefaultLocaleId
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryDefaultUILanguage(
PLANGID LanguageId
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryEvent(
IN HANDLE EventHandle,
IN EVENT_INFORMATION_CLASS EventInformationClass,
OUT PVOID EventInformation,
IN ULONG EventInformationLength,
OUT PULONG ReturnLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryInformationAtom(
IN RTL_ATOM Atom,
IN ATOM_INFORMATION_CLASS AtomInformationClass,
OUT PVOID AtomInformation,
IN ULONG AtomInformationLength,
OUT PULONG ReturnLength OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryInstallUILanguage(
PLANGID LanguageId
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryMutant(
IN HANDLE MutantHandle,
IN MUTANT_INFORMATION_CLASS MutantInformationClass,
OUT PVOID MutantInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQuerySemaphore(
IN HANDLE SemaphoreHandle,
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
OUT PVOID SemaphoreInformation,
IN ULONG Length,
OUT PULONG ReturnLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQuerySystemEnvironmentValue(
IN PUNICODE_STRING Name,
OUT PWSTR Value,
ULONG Length,
PULONG ReturnLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQuerySystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
OUT PVOID SystemInformation,
IN SIZE_T Length,
OUT PSIZE_T ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwQueryTimer(
IN HANDLE TimerHandle,
IN TIMER_INFORMATION_CLASS TimerInformationClass,
OUT PVOID TimerInformation,
IN ULONG Length,
OUT PULONG ResultLength
);
NTSYSAPI
NTSTATUS
NTAPI
ZwRaiseHardError(
IN NTSTATUS ErrorStatus,
IN ULONG NumberOfParameters,
IN ULONG UnicodeStringParameterMask,
IN PULONG_PTR Parameters,
IN ULONG ValidResponseOptions,
OUT PULONG Response
);
NTSYSAPI
NTSTATUS
NTAPI
ZwReleaseMutant(
IN HANDLE MutantHandle,
IN PLONG ReleaseCount OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwReleaseSemaphore(
IN HANDLE SemaphoreHandle,
IN LONG ReleaseCount,
OUT PLONG PreviousCount
);
NTSYSAPI
NTSTATUS
NTAPI
ZwResetEvent(
IN HANDLE EventHandle,
OUT PLONG NumberOfWaitingThreads OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetDefaultLocale(
IN BOOLEAN UserProfile,
IN LCID DefaultLocaleId
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetDefaultUILanguage(
LANGID LanguageId
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetDefaultHardErrorPort(
IN HANDLE PortHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetEvent(
IN HANDLE EventHandle,
OUT PLONG PreviousState OPTIONAL
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetHighEventPair(
IN HANDLE EventPairHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetHighWaitLowEventPair(
IN HANDLE EventPairHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetLowEventPair(
HANDLE EventPair
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetLowWaitHighEventPair(
HANDLE EventPair
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetSystemEnvironmentValue(
IN PUNICODE_STRING VariableName,
IN PUNICODE_STRING Value
);
NTSYSAPI
NTSTATUS
NTAPI
ZwSetSystemInformation(
IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
IN PVOID SystemInformation,
IN SIZE_T SystemInformationLength
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
ZwSetTimer(
IN HANDLE TimerHandle,
IN PLARGE_INTEGER DueTime,
IN PTIMER_APC_ROUTINE TimerApcRoutine,
IN PVOID TimerContext,
IN BOOLEAN WakeTimer,
IN LONG Period OPTIONAL,
OUT PBOOLEAN PreviousState OPTIONAL
);
#endif
NTSYSAPI
NTSTATUS
NTAPI
ZwSetUuidSeed(
IN PUCHAR UuidSeed
);
NTSYSAPI
NTSTATUS
NTAPI
ZwShutdownSystem(
IN SHUTDOWN_ACTION Action
);
NTSYSAPI
NTSTATUS
NTAPI
ZwWaitHighEventPair(
IN HANDLE EventPairHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwWaitLowEventPair(
IN HANDLE EventPairHandle
);
NTSYSAPI
NTSTATUS
NTAPI
ZwTraceEvent(
IN ULONG TraceHandle,
IN ULONG Flags,
IN ULONG TraceHeaderLength,
IN PEVENT_TRACE_HEADER TraceHeader
);
#endif
================================================
FILE: ndk/extypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
extypes.h
Abstract:
Type definitions for the Executive.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _EXTYPES_H
#define _EXTYPES_H
//
// Dependencies
//
#include <umtypes.h>
#include <cfg.h>
#if defined(_MSC_VER) && !defined(NTOS_MODE_USER)
#include <ntimage.h>
#endif
#include <cmtypes.h>
#include <ketypes.h>
#include <potypes.h>
#include <lpctypes.h>
#ifdef NTOS_MODE_USER
#include <obtypes.h>
#endif
//
// GCC compatibility
//
#if defined(__GNUC__)
#define __ALIGNED(n) __attribute__((aligned (n)))
#elif defined(_MSC_VER)
#define __ALIGNED(n) __declspec(align(n))
#else
//#error __ALIGNED not defined for your compiler!
#define __ALIGNED(n)
#warning __ALIGNED not defined for your compiler!
#endif
//
// Atom and Language IDs
//
typedef USHORT LANGID, *PLANGID;
typedef USHORT RTL_ATOM, *PRTL_ATOM;
#ifndef NTOS_MODE_USER
//
// Kernel Exported Object Types
//
extern POBJECT_TYPE NTSYSAPI ExDesktopObjectType;
extern POBJECT_TYPE NTSYSAPI ExWindowStationObjectType;
extern POBJECT_TYPE NTSYSAPI ExIoCompletionType;
extern POBJECT_TYPE NTSYSAPI ExMutantObjectType;
extern POBJECT_TYPE NTSYSAPI ExTimerType;
//
// Exported NT Build Number
//
extern ULONG NtBuildNumber;
//
// Invalid Handle Value Constant
//
#define INVALID_HANDLE_VALUE (HANDLE)-1
#endif
//
// Increments
//
#define MUTANT_INCREMENT 1
//
// Callback Object Access Mask
//
#define CALLBACK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x0001)
#define CALLBACK_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE|0x0001)
#define CALLBACK_WRITE (STANDARD_RIGHTS_WRITE|SYNCHRONIZE|0x0001)
#define CALLBACK_READ (STANDARD_RIGHTS_READ|SYNCHRONIZE|0x0001)
//
// Event Object Access Masks
//
#ifdef NTOS_MODE_USER
#define EVENT_QUERY_STATE 0x0001
//
// Semaphore Object Access Masks
//
#define SEMAPHORE_QUERY_STATE 0x0001
#else
//
// Mutant Object Access Masks
//
#define MUTANT_QUERY_STATE 0x0001
#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
SYNCHRONIZE | \
MUTANT_QUERY_STATE)
#define TIMER_QUERY_STATE 0x0001
#define TIMER_MODIFY_STATE 0x0002
#define TIMER_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \
SYNCHRONIZE | \
TIMER_QUERY_STATE | \
TIMER_MODIFY_STATE)
#endif
//
// Event Pair Access Masks
//
#define EVENT_PAIR_ALL_ACCESS 0x1F0000L
//
// Profile Object Access Masks
//
#define PROFILE_CONTROL 0x0001
#define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL)
//
// Maximum Parameters for NtRaiseHardError
//
#define MAXIMUM_HARDERROR_PARAMETERS 4
//
// Pushlock bits
//
#define EX_PUSH_LOCK_LOCK_V ((ULONG_PTR)0x0)
#define EX_PUSH_LOCK_LOCK ((ULONG_PTR)0x1)
#define EX_PUSH_LOCK_WAITING ((ULONG_PTR)0x2)
#define EX_PUSH_LOCK_WAKING ((ULONG_PTR)0x4)
#define EX_PUSH_LOCK_MULTIPLE_SHARED ((ULONG_PTR)0x8)
#define EX_PUSH_LOCK_SHARE_INC ((ULONG_PTR)0x10)
#define EX_PUSH_LOCK_PTR_BITS ((ULONG_PTR)0xf)
//
// Pushlock Wait Block Flags
//
#define EX_PUSH_LOCK_FLAGS_EXCLUSIVE 1
#define EX_PUSH_LOCK_FLAGS_WAIT 2
//
// Resource (ERESOURCE) Flags
//
#define ResourceHasDisabledPriorityBoost 0x08
//
// Shutdown types for NtShutdownSystem
//
typedef enum _SHUTDOWN_ACTION
{
ShutdownNoReboot,
ShutdownReboot,
ShutdownPowerOff
} SHUTDOWN_ACTION;
//
// Responses for NtRaiseHardError
//
typedef enum _HARDERROR_RESPONSE_OPTION
{
OptionAbortRetryIgnore,
OptionOk,
OptionOkCancel,
OptionRetryCancel,
OptionYesNo,
OptionYesNoCancel,
OptionShutdownSystem
} HARDERROR_RESPONSE_OPTION, *PHARDERROR_RESPONSE_OPTION;
typedef enum _HARDERROR_RESPONSE
{
ResponseReturnToCaller,
ResponseNotHandled,
ResponseAbort,
ResponseCancel,
ResponseIgnore,
ResponseNo,
ResponseOk,
ResponseRetry,
ResponseYes,
ResponseTryAgain,
ResponseContinue
} HARDERROR_RESPONSE, *PHARDERROR_RESPONSE;
//
// System Information Classes for NtQuerySystemInformation
//
typedef enum _SYSTEM_INFORMATION_CLASS
{
SystemBasicInformation,
SystemProcessorInformation,
SystemPerformanceInformation,
SystemTimeOfDayInformation,
SystemPathInformation, /// Obsolete: Use KUSER_SHARED_DATA
SystemProcessInformation,
SystemCallCountInformation,
SystemDeviceInformation,
SystemProcessorPerformanceInformation,
SystemFlagsInformation,
SystemCallTimeInformation,
SystemModuleInformation,
SystemLocksInformation,
SystemStackTraceInformation,
SystemPagedPoolInformation,
SystemNonPagedPoolInformation,
SystemHandleInformation,
SystemObjectInformation,
SystemPageFileInformation,
SystemVdmInstemulInformation,
SystemVdmBopInformation,
SystemFileCacheInformation,
SystemPoolTagInformation,
SystemInterruptInformation,
SystemDpcBehaviorInformation,
SystemFullMemoryInformation,
SystemLoadGdiDriverInformation,
SystemUnloadGdiDriverInformation,
SystemTimeAdjustmentInformation,
SystemSummaryMemoryInformation,
SystemMirrorMemoryInformation,
SystemPerformanceTraceInformation,
SystemObsolete0,
SystemExceptionInformation,
SystemCrashDumpStateInformation,
SystemKernelDebuggerInformation,
SystemContextSwitchInformation,
SystemRegistryQuotaInformation,
SystemExtendServiceTableInformation,
SystemPrioritySeperation,
SystemPlugPlayBusInformation,
SystemDockInformation,
SystemPowerInformationNative,
SystemProcessorSpeedInformation,
SystemCurrentTimeZoneInformation,
SystemLookasideInformation,
SystemTimeSlipNotification,
SystemSessionCreate,
SystemSessionDetach,
SystemSessionInformation,
SystemRangeStartInformation,
SystemVerifierInformation,
SystemAddVerifier,
SystemSessionProcessesInformation,
SystemLoadGdiDriverInSystemSpaceInformation,
SystemNumaProcessorMap,
SystemPrefetcherInformation,
SystemExtendedProcessInformation,
SystemRecommendedSharedDataAlignment,
SystemComPlusPackage,
SystemNumaAvailableMemory,
SystemProcessorPowerInformation,
SystemEmulationBasicInformation,
SystemEmulationProcessorInformation,
SystemExtendedHanfleInformation,
SystemLostDelayedWriteInformation,
SystemBigPoolInformation,
SystemSessionPoolTagInformation,
SystemSessionMappedViewInformation,
SystemHotpatchInformation,
SystemObjectSecurityMode,
SystemWatchDogTimerHandler,
SystemWatchDogTimerInformation,
SystemLogicalProcessorInformation,
SystemWo64SharedInformationObosolete,
SystemRegisterFirmwareTableInformationHandler,
SystemFirmwareTableInformation,
SystemModuleInformationEx,
SystemVerifierTriageInformation,
SystemSuperfetchInformation,
SystemMemoryListInformation,
SystemFileCacheInformationEx,
SystemThreadPriorityClientIdInformation,
SystemProcessorIdleCycleTimeInformation,
SystemVerifierCancellationInformation,
SystemProcessorPowerInformationEx,
SystemRefTraceInformation,
SystemSpecialPoolInformation,
SystemProcessIdInformation,
SystemErrorPortInformation,
SystemBootEnvironmentInformation,
SystemHypervisorInformation,
SystemVerifierInformationEx,
SystemTimeZoneInformation,
SystemImageFileExecutionOptionsInformation,
SystemCoverageInformation,
SystemPrefetchPathInformation,
SystemVerifierFaultsInformation,
MaxSystemInfoClass,
} SYSTEM_INFORMATION_CLASS;
//
// System Information Classes for NtQueryMutant
//
typedef enum _MUTANT_INFORMATION_CLASS
{
MutantBasicInformation,
MutantOwnerInformation
} MUTANT_INFORMATION_CLASS;
//
// System Information Classes for NtQueryAtom
//
typedef enum _ATOM_INFORMATION_CLASS
{
AtomBasicInformation,
AtomTableInformation,
} ATOM_INFORMATION_CLASS;
//
// System Information Classes for NtQueryTimer
//
typedef enum _TIMER_INFORMATION_CLASS
{
TimerBasicInformation
} TIMER_INFORMATION_CLASS;
//
// System Information Classes for NtQuerySemaphore
//
typedef enum _SEMAPHORE_INFORMATION_CLASS
{
SemaphoreBasicInformation
} SEMAPHORE_INFORMATION_CLASS;
//
// System Information Classes for NtQueryEvent
//
typedef enum _EVENT_INFORMATION_CLASS
{
EventBasicInformation
} EVENT_INFORMATION_CLASS;
#ifdef NTOS_MODE_USER
//
// Firmware Table Actions for SystemFirmwareTableInformation
//
typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
{
SystemFirmwareTable_Enumerate = 0,
SystemFirmwareTable_Get = 1,
} SYSTEM_FIRMWARE_TABLE_ACTION, *PSYSTEM_FIRMWARE_TABLE_ACTION;
//
// Firmware Handler Callback
//
struct _SYSTEM_FIRMWARE_TABLE_INFORMATION;
typedef
NTSTATUS
(__cdecl *PFNFTH)(
IN struct _SYSTEM_FIRMWARE_TABLE_INFORMATION *FirmwareTableInformation
);
#else
//
// Handle Enumeration Callback
//
struct _HANDLE_TABLE_ENTRY;
typedef BOOLEAN
(NTAPI *PEX_ENUM_HANDLE_CALLBACK)(
IN struct _HANDLE_TABLE_ENTRY *HandleTableEntry,
IN HANDLE Handle,
IN PVOID Context
);
//
// Compatibility with Windows XP Drivers using ERESOURCE
//
typedef struct _ERESOURCE_XP
{
LIST_ENTRY SystemResourcesList;
POWNER_ENTRY OwnerTable;
SHORT ActiveCount;
USHORT Flag;
PKSEMAPHORE SharedWaiters;
PKEVENT ExclusiveWaiters;
OWNER_ENTRY OwnerThreads[2];
ULONG ContentionCount;
USHORT NumberOfSharedWaiters;
USHORT NumberOfExclusiveWaiters;
union
{
PVOID Address;
ULONG_PTR CreatorBackTraceIndex;
};
KSPIN_LOCK SpinLock;
} ERESOURCE_XP, *PERESOURCE_XP;
//
// Executive Work Queue Structures
//
typedef struct _EX_QUEUE_WORKER_INFO
{
ULONG QueueDisabled:1;
ULONG MakeThreadsAsNecessary:1;
ULONG WaitMode:1;
ULONG WorkerCount:29;
} EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
typedef struct _EX_WORK_QUEUE
{
KQUEUE WorkerQueue;
LONG DynamicThreadCount;
ULONG WorkItemsProcessed;
ULONG WorkItemsProcessedLastPass;
ULONG QueueDepthLastPass;
EX_QUEUE_WORKER_INFO Info;
} EX_WORK_QUEUE, *PEX_WORK_QUEUE;
//
// Executive Fast Reference Structure
//
typedef struct _EX_FAST_REF
{
union
{
PVOID Object;
ULONG_PTR RefCnt:3;
ULONG_PTR Value;
};
} EX_FAST_REF, *PEX_FAST_REF;
//
// Executive Cache-Aware Rundown Reference Descriptor
//
typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
{
PEX_RUNDOWN_REF RunRefs;
PVOID PoolToFree;
ULONG RunRefSize;
ULONG Number;
} EX_RUNDOWN_REF_CACHE_AWARE, *PEX_RUNDOWN_REF_CACHE_AWARE;
//
// Executive Rundown Wait Block
//
typedef struct _EX_RUNDOWN_WAIT_BLOCK
{
ULONG_PTR Count;
KEVENT WakeEvent;
} EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK;
//
// Executive Pushlock
//
#undef EX_PUSH_LOCK
#undef PEX_PUSH_LOCK
typedef struct _EX_PUSH_LOCK
{
union
{
struct
{
ULONG_PTR Locked:1;
ULONG_PTR Waiting:1;
ULONG_PTR Waking:1;
ULONG_PTR MultipleShared:1;
ULONG_PTR Shared:sizeof (ULONG_PTR) * 8 - 4;
};
ULONG_PTR Value;
PVOID Ptr;
};
} EX_PUSH_LOCK, *PEX_PUSH_LOCK;
//
// Executive Pushlock Wait Block
//
typedef __ALIGNED(16) struct _EX_PUSH_LOCK_WAIT_BLOCK
{
union
{
KGATE WakeGate;
KEVENT WakeEvent;
};
struct _EX_PUSH_LOCK_WAIT_BLOCK *Next;
struct _EX_PUSH_LOCK_WAIT_BLOCK *Last;
struct _EX_PUSH_LOCK_WAIT_BLOCK *Previous;
LONG ShareCount;
LONG Flags;
#if DBG
BOOLEAN Signaled;
EX_PUSH_LOCK NewValue;
EX_PUSH_LOCK OldValue;
PEX_PUSH_LOCK PushLock;
#endif
} EX_PUSH_LOCK_WAIT_BLOCK, *PEX_PUSH_LOCK_WAIT_BLOCK;
//
// Callback Object
//
typedef struct _CALLBACK_OBJECT
{
ULONG Signature;
KSPIN_LOCK Lock;
LIST_ENTRY RegisteredCallbacks;
BOOLEAN AllowMultipleCallbacks;
UCHAR reserved[3];
} CALLBACK_OBJECT, *PCALLBACK_OBJECT;
//
// Callback Handle
//
typedef struct _CALLBACK_REGISTRATION
{
LIST_ENTRY Link;
PCALLBACK_OBJECT CallbackObject;
PCALLBACK_FUNCTION CallbackFunction;
PVOID CallbackContext;
ULONG Busy;
BOOLEAN UnregisterWaiting;
} CALLBACK_REGISTRATION, *PCALLBACK_REGISTRATION;
//
// Internal Callback Object
//
typedef struct _EX_CALLBACK_ROUTINE_BLOCK
{
EX_RUNDOWN_REF RundownProtect;
PEX_CALLBACK_FUNCTION Function;
PVOID Context;
} EX_CALLBACK_ROUTINE_BLOCK, *PEX_CALLBACK_ROUTINE_BLOCK;
//
// Internal Callback Handle
//
typedef struct _EX_CALLBACK
{
EX_FAST_REF RoutineBlock;
} EX_CALLBACK, *PEX_CALLBACK;
//
// Profile Object
//
typedef struct _EPROFILE
{
PEPROCESS Process;
PVOID RangeBase;
SIZE_T RangeSize;
PVOID Buffer;
ULONG BufferSize;
ULONG BucketSize;
PKPROFILE ProfileObject;
PVOID LockedBufferAddress;
PMDL Mdl;
ULONG Segment;
KPROFILE_SOURCE ProfileSource;
KAFFINITY Affinity;
} EPROFILE, *PEPROFILE;
//
// Handle Table Structures
//
typedef struct _HANDLE_TRACE_DB_ENTRY
{
CLIENT_ID ClientId;
HANDLE Handle;
ULONG Type;
PVOID StackTrace[16];
} HANDLE_TRACE_DB_ENTRY, *PHANDLE_TRACE_DB_ENTRY;
typedef struct _HANDLE_TRACE_DEBUG_INFO
{
LONG RefCount;
ULONG TableSize;
ULONG BitMaskFlags;
FAST_MUTEX CloseCompatcionLock;
ULONG CurrentStackIndex;
HANDLE_TRACE_DB_ENTRY TraceDb[1];
} HANDLE_TRACE_DEBUG_INFO, *PHANDLE_TRACE_DEBUG_INFO;
typedef struct _HANDLE_TABLE_ENTRY_INFO
{
ULONG AuditMask;
} HANDLE_TABLE_ENTRY_INFO, *PHANDLE_TABLE_ENTRY_INFO;
typedef struct _HANDLE_TABLE_ENTRY
{
union
{
PVOID Object;
ULONG_PTR ObAttributes;
PHANDLE_TABLE_ENTRY_INFO InfoTable;
ULONG_PTR Value;
};
union
{
ULONG GrantedAccess;
struct
{
USHORT GrantedAccessIndex;
USHORT CreatorBackTraceIndex;
};
LONG NextFreeTableEntry;
};
} HANDLE_TABLE_ENTRY, *PHANDLE_TABLE_ENTRY;
typedef struct _HANDLE_TABLE
{
#if (NTDDI_VERSION >= NTDDI_WINXP)
ULONG TableCode;
#else
PHANDLE_TABLE_ENTRY **Table;
#endif
PEPROCESS QuotaProcess;
PVOID UniqueProcessId;
#if (NTDDI_VERSION >= NTDDI_WINXP)
EX_PUSH_LOCK HandleTableLock[4];
LIST_ENTRY HandleTableList;
EX_PUSH_LOCK HandleContentionEvent;
#else
ERESOURCE HandleLock;
LIST_ENTRY HandleTableList;
KEVENT HandleContentionEvent;
#endif
PHANDLE_TRACE_DEBUG_INFO DebugInfo;
LONG ExtraInfoPages;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
union
{
ULONG Flags;
UCHAR StrictFIFO:1;
};
LONG FirstFreeHandle;
PHANDLE_TABLE_ENTRY LastFreeHandleEntry;
LONG HandleCount;
ULONG NextHandleNeedingPool;
#else
ULONG FirstFree;
ULONG LastFree;
ULONG NextHandleNeedingPool;
LONG HandleCount;
union
{
ULONG Flags;
UCHAR StrictFIFO:1;
};
#endif
} HANDLE_TABLE, *PHANDLE_TABLE;
#endif
//
// Hard Error LPC Message
//
typedef struct _HARDERROR_MSG
{
PORT_MESSAGE h;
NTSTATUS Status;
LARGE_INTEGER ErrorTime;
ULONG ValidResponseOptions;
ULONG Response;
ULONG NumberOfParameters;
ULONG UnicodeStringParameterMask;
ULONG Parameters[MAXIMUM_HARDERROR_PARAMETERS];
} HARDERROR_MSG, *PHARDERROR_MSG;
//
// Information Structures for NtQueryMutant
//
typedef struct _MUTANT_BASIC_INFORMATION
{
LONG CurrentCount;
BOOLEAN OwnedByCaller;
BOOLEAN AbandonedState;
} MUTANT_BASIC_INFORMATION, *PMUTANT_BASIC_INFORMATION;
typedef struct _MUTANT_OWNER_INFORMATION
{
CLIENT_ID ClientId;
} MUTANT_OWNER_INFORMATION, *PMUTANT_OWNER_INFORMATION;
//
// Information Structures for NtQueryAtom
//
typedef struct _ATOM_BASIC_INFORMATION
{
USHORT UsageCount;
USHORT Flags;
USHORT NameLength;
WCHAR Name[1];
} ATOM_BASIC_INFORMATION, *PATOM_BASIC_INFORMATION;
typedef struct _ATOM_TABLE_INFORMATION
{
ULONG NumberOfAtoms;
USHORT Atoms[1];
} ATOM_TABLE_INFORMATION, *PATOM_TABLE_INFORMATION;
//
// Information Structures for NtQueryTimer
//
typedef struct _TIMER_BASIC_INFORMATION
{
LARGE_INTEGER TimeRemaining;
BOOLEAN SignalState;
} TIMER_BASIC_INFORMATION, *PTIMER_BASIC_INFORMATION;
//
// Information Structures for NtQuerySemaphore
//
typedef struct _SEMAPHORE_BASIC_INFORMATION
{
LONG CurrentCount;
LONG MaximumCount;
} SEMAPHORE_BASIC_INFORMATION, *PSEMAPHORE_BASIC_INFORMATION;
//
// Information Structures for NtQueryEvent
//
typedef struct _EVENT_BASIC_INFORMATION
{
EVENT_TYPE EventType;
LONG EventState;
} EVENT_BASIC_INFORMATION, *PEVENT_BASIC_INFORMATION;
//
// Information Structures for NtQuerySystemInformation
//
typedef struct _SYSTEM_BASIC_INFORMATION
{
ULONG Reserved;
ULONG TimerResolution;
ULONG PageSize;
ULONG NumberOfPhysicalPages;
ULONG LowestPhysicalPageNumber;
ULONG HighestPhysicalPageNumber;
ULONG AllocationGranularity;
ULONG_PTR MinimumUserModeAddress;
ULONG_PTR MaximumUserModeAddress;
ULONG_PTR ActiveProcessorsAffinityMask;
CCHAR NumberOfProcessors;
} SYSTEM_BASIC_INFORMATION, *PSYSTEM_BASIC_INFORMATION;
// Class 1
typedef struct _SYSTEM_PROCESSOR_INFORMATION
{
USHORT ProcessorArchitecture;
USHORT ProcessorLevel;
USHORT ProcessorRevision;
USHORT Reserved;
ULONG ProcessorFeatureBits;
} SYSTEM_PROCESSOR_INFORMATION, *PSYSTEM_PROCESSOR_INFORMATION;
// Class 2
typedef struct _SYSTEM_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleProcessTime;
LARGE_INTEGER IoReadTransferCount;
LARGE_INTEGER IoWriteTransferCount;
LARGE_INTEGER IoOtherTransferCount;
ULONG IoReadOperationCount;
ULONG IoWriteOperationCount;
ULONG IoOtherOperationCount;
ULONG AvailablePages;
ULONG CommittedPages;
ULONG CommitLimit;
ULONG PeakCommitment;
ULONG PageFaultCount;
ULONG CopyOnWriteCount;
ULONG TransitionCount;
ULONG CacheTransitionCount;
ULONG DemandZeroCount;
ULONG PageReadCount;
ULONG PageReadIoCount;
ULONG CacheReadCount;
ULONG CacheIoCount;
ULONG DirtyPagesWriteCount;
ULONG DirtyWriteIoCount;
ULONG MappedPagesWriteCount;
ULONG MappedWriteIoCount;
ULONG PagedPoolPages;
ULONG NonPagedPoolPages;
ULONG PagedPoolAllocs;
ULONG PagedPoolFrees;
ULONG NonPagedPoolAllocs;
ULONG NonPagedPoolFrees;
ULONG FreeSystemPtes;
ULONG ResidentSystemCodePage;
ULONG TotalSystemDriverPages;
ULONG TotalSystemCodePages;
ULONG NonPagedPoolLookasideHits;
ULONG PagedPoolLookasideHits;
ULONG Spare3Count;
ULONG ResidentSystemCachePage;
ULONG ResidentPagedPoolPage;
ULONG ResidentSystemDriverPage;
ULONG CcFastReadNoWait;
ULONG CcFastReadWait;
ULONG CcFastReadResourceMiss;
ULONG CcFastReadNotPossible;
ULONG CcFastMdlReadNoWait;
ULONG CcFastMdlReadWait;
ULONG CcFastMdlReadResourceMiss;
ULONG CcFastMdlReadNotPossible;
ULONG CcMapDataNoWait;
ULONG CcMapDataWait;
ULONG CcMapDataNoWaitMiss;
ULONG CcMapDataWaitMiss;
ULONG CcPinMappedDataCount;
ULONG CcPinReadNoWait;
ULONG CcPinReadWait;
ULONG CcPinReadNoWaitMiss;
ULONG CcPinReadWaitMiss;
ULONG CcCopyReadNoWait;
ULONG CcCopyReadWait;
ULONG CcCopyReadNoWaitMiss;
ULONG CcCopyReadWaitMiss;
ULONG CcMdlReadNoWait;
ULONG CcMdlReadWait;
ULONG CcMdlReadNoWaitMiss;
ULONG CcMdlReadWaitMiss;
ULONG CcReadAheadIos;
ULONG CcLazyWriteIos;
ULONG CcLazyWritePages;
ULONG CcDataFlushes;
ULONG CcDataPages;
ULONG ContextSwitches;
ULONG FirstLevelTbFills;
ULONG SecondLevelTbFills;
ULONG SystemCalls;
} SYSTEM_PERFORMANCE_INFORMATION, *PSYSTEM_PERFORMANCE_INFORMATION;
// Class 3
typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
{
LARGE_INTEGER BootTime;
LARGE_INTEGER CurrentTime;
LARGE_INTEGER TimeZoneBias;
ULONG TimeZoneId;
ULONG Reserved;
LARGE_INTEGER BootTimeBias;
LARGE_INTEGER SleepTimeBias;
} SYSTEM_TIMEOFDAY_INFORMATION, *PSYSTEM_TIMEOFDAY_INFORMATION;
// Class 4
// This class is obsolete, please use KUSER_SHARED_DATA instead
// Class 5
typedef struct _SYSTEM_THREAD_INFORMATION
{
LARGE_INTEGER KernelTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER CreateTime;
ULONG WaitTime;
PVOID StartAddress;
CLIENT_ID ClientId;
KPRIORITY Priority;
LONG BasePriority;
ULONG ContextSwitches;
ULONG ThreadState;
ULONG WaitReason;
} SYSTEM_THREAD_INFORMATION, *PSYSTEM_THREAD_INFORMATION;
typedef struct _SYSTEM_PROCESS_INFORMATION
{
ULONG NextEntryOffset;
ULONG NumberOfThreads;
LARGE_INTEGER SpareLi1;
LARGE_INTEGER SpareLi2;
LARGE_INTEGER SpareLi3;
LARGE_INTEGER CreateTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER KernelTime;
UNICODE_STRING ImageName;
KPRIORITY BasePriority;
HANDLE UniqueProcessId;
HANDLE InheritedFromUniqueProcessId;
ULONG HandleCount;
ULONG SessionId;
ULONG_PTR PageDirectoryBase;
//
// This part corresponds to VM_COUNTERS_EX.
// NOTE: *NOT* THE SAME AS VM_COUNTERS!
//
SIZE_T PeakVirtualSize;
ULONG VirtualSize;
SIZE_T PageFaultCount;
SIZE_T PeakWorkingSetSize;
SIZE_T WorkingSetSize;
SIZE_T QuotaPeakPagedPoolUsage;
SIZE_T QuotaPagedPoolUsage;
SIZE_T QuotaPeakNonPagedPoolUsage;
SIZE_T QuotaNonPagedPoolUsage;
SIZE_T PagefileUsage;
SIZE_T PeakPagefileUsage;
SIZE_T PrivatePageCount;
//
// This part corresponds to IO_COUNTERS
//
LARGE_INTEGER ReadOperationCount;
LARGE_INTEGER WriteOperationCount;
LARGE_INTEGER OtherOperationCount;
LARGE_INTEGER ReadTransferCount;
LARGE_INTEGER WriteTransferCount;
LARGE_INTEGER OtherTransferCount;
//SYSTEM_THREAD_INFORMATION TH[1];
} SYSTEM_PROCESS_INFORMATION, *PSYSTEM_PROCESS_INFORMATION;
// Class 6
typedef struct _SYSTEM_CALL_COUNT_INFORMATION
{
ULONG Length;
ULONG NumberOfTables;
} SYSTEM_CALL_COUNT_INFORMATION, *PSYSTEM_CALL_COUNT_INFORMATION;
// Class 7
typedef struct _SYSTEM_DEVICE_INFORMATION
{
ULONG NumberOfDisks;
ULONG NumberOfFloppies;
ULONG NumberOfCdRoms;
ULONG NumberOfTapes;
ULONG NumberOfSerialPorts;
ULONG NumberOfParallelPorts;
} SYSTEM_DEVICE_INFORMATION, *PSYSTEM_DEVICE_INFORMATION;
// Class 8
typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
{
LARGE_INTEGER IdleTime;
LARGE_INTEGER KernelTime;
LARGE_INTEGER UserTime;
LARGE_INTEGER DpcTime;
LARGE_INTEGER InterruptTime;
ULONG InterruptCount;
} SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION, *PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION;
// Class 9
typedef struct _SYSTEM_FLAGS_INFORMATION
{
ULONG Flags;
} SYSTEM_FLAGS_INFORMATION, *PSYSTEM_FLAGS_INFORMATION;
// Class 10
typedef struct _SYSTEM_CALL_TIME_INFORMATION
{
ULONG Length;
ULONG TotalCalls;
LARGE_INTEGER TimeOfCalls[1];
} SYSTEM_CALL_TIME_INFORMATION, *PSYSTEM_CALL_TIME_INFORMATION;
// Class 11 - See RTL_PROCESS_MODULES
// Class 12 - See RTL_PROCESS_LOCKS
// Class 13 - See RTL_PROCESS_BACKTRACES
// Class 14 - 15
typedef struct _SYSTEM_POOL_ENTRY
{
BOOLEAN Allocated;
BOOLEAN Spare0;
USHORT AllocatorBackTraceIndex;
ULONG Size;
union
{
UCHAR Tag[4];
ULONG TagUlong;
PVOID ProcessChargedQuota;
};
} SYSTEM_POOL_ENTRY, *PSYSTEM_POOL_ENTRY;
typedef struct _SYSTEM_POOL_INFORMATION
{
ULONG TotalSize;
PVOID FirstEntry;
USHORT EntryOverhead;
BOOLEAN PoolTagPresent;
BOOLEAN Spare0;
ULONG NumberOfEntries;
SYSTEM_POOL_ENTRY Entries[1];
} SYSTEM_POOL_INFORMATION, *PSYSTEM_POOL_INFORMATION;
// Class 16
typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
{
USHORT UniqueProcessId;
USHORT CreatorBackTraceIndex;
UCHAR ObjectTypeIndex;
UCHAR HandleAttributes;
USHORT HandleValue;
PVOID Object;
ULONG GrantedAccess;
} SYSTEM_HANDLE_TABLE_ENTRY_INFO, *PSYSTEM_HANDLE_TABLE_ENTRY_INFO;
typedef struct _SYSTEM_HANDLE_INFORMATION
{
ULONG NumberOfHandles;
SYSTEM_HANDLE_TABLE_ENTRY_INFO Handles[1];
} SYSTEM_HANDLE_INFORMATION, *PSYSTEM_HANDLE_INFORMATION;
// Class 17
typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
{
ULONG NextEntryOffset;
ULONG NumberOfObjects;
ULONG NumberOfHandles;
ULONG TypeIndex;
ULONG InvalidAttributes;
GENERIC_MAPPING GenericMapping;
ULONG ValidAccessMask;
ULONG PoolType;
BOOLEAN SecurityRequired;
BOOLEAN WaitableObject;
UNICODE_STRING TypeName;
} SYSTEM_OBJECTTYPE_INFORMATION, *PSYSTEM_OBJECTTYPE_INFORMATION;
typedef struct _SYSTEM_OBJECT_INFORMATION
{
ULONG NextEntryOffset;
PVOID Object;
HANDLE CreatorUniqueProcess;
USHORT CreatorBackTraceIndex;
USHORT Flags;
LONG PointerCount;
LONG HandleCount;
ULONG PagedPoolCharge;
ULONG NonPagedPoolCharge;
HANDLE ExclusiveProcessId;
PVOID SecurityDescriptor;
OBJECT_NAME_INFORMATION NameInfo;
} SYSTEM_OBJECT_INFORMATION, *PSYSTEM_OBJECT_INFORMATION;
// Class 18
typedef struct _SYSTEM_PAGEFILE_INFORMATION
{
ULONG NextEntryOffset;
ULONG TotalSize;
ULONG TotalInUse;
ULONG PeakUsage;
UNICODE_STRING PageFileName;
} SYSTEM_PAGEFILE_INFORMATION, *PSYSTEM_PAGEFILE_INFORMATION;
// Class 19
typedef struct _SYSTEM_VDM_INSTEMUL_INFO
{
ULONG SegmentNotPresent;
ULONG VdmOpcode0F;
ULONG OpcodeESPrefix;
ULONG OpcodeCSPrefix;
ULONG OpcodeSSPrefix;
ULONG OpcodeDSPrefix;
ULONG OpcodeFSPrefix;
ULONG OpcodeGSPrefix;
ULONG OpcodeOPER32Prefix;
ULONG OpcodeADDR32Prefix;
ULONG OpcodeINSB;
ULONG OpcodeINSW;
ULONG OpcodeOUTSB;
ULONG OpcodeOUTSW;
ULONG OpcodePUSHF;
ULONG OpcodePOPF;
ULONG OpcodeINTnn;
ULONG OpcodeINTO;
ULONG OpcodeIRET;
ULONG OpcodeINBimm;
ULONG OpcodeINWimm;
ULONG OpcodeOUTBimm;
ULONG OpcodeOUTWimm ;
ULONG OpcodeINB;
ULONG OpcodeINW;
ULONG OpcodeOUTB;
ULONG OpcodeOUTW;
ULONG OpcodeLOCKPrefix;
ULONG OpcodeREPNEPrefix;
ULONG OpcodeREPPrefix;
ULONG OpcodeHLT;
ULONG OpcodeCLI;
ULONG OpcodeSTI;
ULONG BopCount;
} SYSTEM_VDM_INSTEMUL_INFO, *PSYSTEM_VDM_INSTEMUL_INFO;
// Class 20 - ULONG VDMBOPINFO
// Class 21
typedef struct _SYSTEM_FILECACHE_INFORMATION
{
ULONG CurrentSize;
ULONG PeakSize;
ULONG PageFaultCount;
ULONG MinimumWorkingSet;
ULONG MaximumWorkingSet;
ULONG CurrentSizeIncludingTransitionInPages;
ULONG PeakSizeIncludingTransitionInPages;
ULONG TransitionRePurposeCount;
ULONG Flags;
} SYSTEM_FILECACHE_INFORMATION, *PSYSTEM_FILECACHE_INFORMATION;
// Class 22
typedef struct _SYSTEM_POOLTAG
{
union
{
UCHAR Tag[4];
ULONG TagUlong;
};
ULONG PagedAllocs;
ULONG PagedFrees;
ULONG PagedUsed;
ULONG NonPagedAllocs;
ULONG NonPagedFrees;
ULONG NonPagedUsed;
} SYSTEM_POOLTAG, *PSYSTEM_POOLTAG;
typedef struct _SYSTEM_POOLTAG_INFORMATION
{
ULONG Count;
SYSTEM_POOLTAG TagInfo[1];
} SYSTEM_POOLTAG_INFORMATION, *PSYSTEM_POOLTAG_INFORMATION;
// Class 23
typedef struct _SYSTEM_INTERRUPT_INFORMATION
{
ULONG ContextSwitches;
ULONG DpcCount;
ULONG DpcRate;
ULONG TimeIncrement;
ULONG DpcBypassCount;
ULONG ApcBypassCount;
} SYSTEM_INTERRUPT_INFORMATION, *PSYSTEM_INTERRUPT_INFORMATION;
// Class 24
typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
{
ULONG Spare;
ULONG DpcQueueDepth;
ULONG MinimumDpcRate;
ULONG AdjustDpcThreshold;
ULONG IdealDpcRate;
} SYSTEM_DPC_BEHAVIOR_INFORMATION, *PSYSTEM_DPC_BEHAVIOR_INFORMATION;
// Class 25
typedef struct _SYSTEM_MEMORY_INFO
{
PUCHAR StringOffset;
USHORT ValidCount;
USHORT TransitionCount;
USHORT ModifiedCount;
USHORT PageTableCount;
} SYSTEM_MEMORY_INFO, *PSYSTEM_MEMORY_INFO;
typedef struct _SYSTEM_MEMORY_INFORMATION
{
ULONG InfoSize;
ULONG StringStart;
SYSTEM_MEMORY_INFO Memory[1];
} SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
// Class 26
typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
{
UNICODE_STRING DriverName;
PVOID ImageAddress;
PVOID SectionPointer;
PVOID EntryPoint;
PIMAGE_EXPORT_DIRECTORY ExportSectionPointer;
ULONG ImageLength;
} SYSTEM_GDI_DRIVER_INFORMATION, *PSYSTEM_GDI_DRIVER_INFORMATION;
// Class 27
// Not an actually class, simply a PVOID to the ImageAddress
// Class 28
typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
{
ULONG TimeAdjustment;
ULONG TimeIncrement;
BOOLEAN Enable;
} SYSTEM_QUERY_TIME_ADJUST_INFORMATION, *PSYSTEM_QUERY_TIME_ADJUST_INFORMATION;
typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
{
ULONG TimeAdjustment;
BOOLEAN Enable;
} SYSTEM_SET_TIME_ADJUST_INFORMATION, *PSYSTEM_SET_TIME_ADJUST_INFORMATION;
// Class 29 - Same as 25
// FIXME: Class 30
// Class 31
typedef struct _SYSTEM_REF_TRACE_INFORMATION
{
UCHAR TraceEnable;
UCHAR TracePermanent;
UNICODE_STRING TraceProcessName;
UNICODE_STRING TracePoolTags;
} SYSTEM_REF_TRACE_INFORMATION, *PSYSTEM_REF_TRACE_INFORMATION;
// Class 32 - OBSOLETE
// Class 33
typedef struct _SYSTEM_EXCEPTION_INFORMATION
{
ULONG AlignmentFixupCount;
ULONG ExceptionDispatchCount;
ULONG FloatingEmulationCount;
ULONG ByteWordEmulationCount;
} SYSTEM_EXCEPTION_INFORMATION, *PSYSTEM_EXCEPTION_INFORMATION;
// Class 34
typedef struct _SYSTEM_CRASH_STATE_INFORMATION
{
ULONG ValidCrashDump;
} SYSTEM_CRASH_STATE_INFORMATION, *PSYSTEM_CRASH_STATE_INFORMATION;
// Class 35
typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
{
BOOLEAN KernelDebuggerEnabled;
BOOLEAN KernelDebuggerNotPresent;
} SYSTEM_KERNEL_DEBUGGER_INFORMATION, *PSYSTEM_KERNEL_DEBUGGER_INFORMATION;
// Class 36
typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
{
ULONG ContextSwitches;
ULONG FindAny;
ULONG FindLast;
ULONG FindIdeal;
ULONG IdleAny;
ULONG IdleCurrent;
ULONG IdleLast;
ULONG IdleIdeal;
ULONG PreemptAny;
ULONG PreemptCurrent;
ULONG PreemptLast;
ULONG SwitchToIdle;
} SYSTEM_CONTEXT_SWITCH_INFORMATION, *PSYSTEM_CONTEXT_SWITCH_INFORMATION;
// Class 37
typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
{
ULONG RegistryQuotaAllowed;
ULONG RegistryQuotaUsed;
ULONG PagedPoolSize;
} SYSTEM_REGISTRY_QUOTA_INFORMATION, *PSYSTEM_REGISTRY_QUOTA_INFORMATION;
// Class 38
// Not a structure, simply send the UNICODE_STRING
// Class 39
// Not a structure, simply send a ULONG containing the new separation
// Class 40
typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
{
ULONG BusCount;
PLUGPLAY_BUS_INSTANCE BusInstance[1];
} SYSTEM_PLUGPLAY_BUS_INFORMATION, *PSYSTEM_PLUGPLAY_BUS_INFORMATION;
// Class 41
typedef struct _SYSTEM_DOCK_INFORMATION
{
SYSTEM_DOCK_STATE DockState;
INTERFACE_TYPE DeviceBusType;
ULONG DeviceBusNumber;
ULONG SlotNumber;
} SYSTEM_DOCK_INFORMATION, *PSYSTEM_DOCK_INFORMATION;
// Class 42
typedef struct _SYSTEM_POWER_INFORMATION_NATIVE
{
BOOLEAN SystemSuspendSupported;
BOOLEAN SystemHibernateSupported;
BOOLEAN ResumeTimerSupportsSuspend;
BOOLEAN ResumeTimerSupportsHibernate;
BOOLEAN LidSupported;
BOOLEAN TurboSettingSupported;
BOOLEAN TurboMode;
BOOLEAN SystemAcOrDc;
BOOLEAN PowerDownDisabled;
LARGE_INTEGER SpindownDrives;
} SYSTEM_POWER_INFORMATION_NATIVE, *PSYSTEM_POWER_INFORMATION_NATIVE;
// Class 43
typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
{
PNP_VETO_TYPE VetoType;
UNICODE_STRING VetoDriver;
// CHAR Buffer[0];
} SYSTEM_LEGACY_DRIVER_INFORMATION, *PSYSTEM_LEGACY_DRIVER_INFORMATION;
// Class 44
//typedef struct _TIME_ZONE_INFORMATION RTL_TIME_ZONE_INFORMATION;
// Class 45
typedef struct _SYSTEM_LOOKASIDE_INFORMATION
{
USHORT CurrentDepth;
USHORT MaximumDepth;
ULONG TotalAllocates;
ULONG AllocateMisses;
ULONG TotalFrees;
ULONG FreeMisses;
ULONG Type;
ULONG Tag;
ULONG Size;
} SYSTEM_LOOKASIDE_INFORMATION, *PSYSTEM_LOOKASIDE_INFORMATION;
// Class 46
// Not a structure. Only a HANDLE for the SlipEvent;
// Class 47
// Not a structure. Only a ULONG for the SessionId;
// Class 48
// Not a structure. Only a ULONG for the SessionId;
// FIXME: Class 49
// Class 50
// Not a structure. Only a ULONG_PTR for the SystemRangeStart
// Class 51
typedef struct _SYSTEM_VERIFIER_INFORMATION
{
ULONG NextEntryOffset;
ULONG Level;
UNICODE_STRING DriverName;
ULONG RaiseIrqls;
ULONG AcquireSpinLocks;
ULONG SynchronizeExecutions;
ULONG AllocationsAttempted;
ULONG AllocationsSucceeded;
ULONG AllocationsSucceededSpecialPool;
ULONG AllocationsWithNoTag;
ULONG TrimRequests;
ULONG Trims;
ULONG AllocationsFailed;
ULONG AllocationsFailedDeliberately;
ULONG Loads;
ULONG Unloads;
ULONG UnTrackedPool;
ULONG CurrentPagedPoolAllocations;
ULONG CurrentNonPagedPoolAllocations;
ULONG PeakPagedPoolAllocations;
ULONG PeakNonPagedPoolAllocations;
ULONG PagedPoolUsageInBytes;
ULONG NonPagedPoolUsageInBytes;
ULONG PeakPagedPoolUsageInBytes;
ULONG PeakNonPagedPoolUsageInBytes;
} SYSTEM_VERIFIER_INFORMATION, *PSYSTEM_VERIFIER_INFORMATION;
// FIXME: Class 52
// Class 53
typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
{
ULONG SessionId;
ULONG SizeOfBuf;
PVOID Buffer; // Same format as in SystemProcessInformation
} SYSTEM_SESSION_PROCESS_INFORMATION, *PSYSTEM_SESSION_PROCESS_INFORMATION;
// FIXME: Class 54-97
//
// Hotpatch flags
//
#define RTL_HOTPATCH_SUPPORTED_FLAG 0x01
#define RTL_HOTPATCH_SWAP_OBJECT_NAMES 0x08 << 24
#define RTL_HOTPATCH_SYNC_RENAME_FILES 0x10 << 24
#define RTL_HOTPATCH_PATCH_USER_MODE 0x20 << 24
#define RTL_HOTPATCH_REMAP_SYSTEM_DLL 0x40 << 24
#define RTL_HOTPATCH_PATCH_KERNEL_MODE 0x80 << 24
// Class 69
typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
{
ULONG Flags;
ULONG InfoSize;
union
{
struct
{
ULONG Foo;
} CodeInfo;
struct
{
USHORT NameOffset;
USHORT NameLength;
} KernelInfo;
struct
{
USHORT NameOffset;
USHORT NameLength;
USHORT TargetNameOffset;
USHORT TargetNameLength;
UCHAR PatchingFinished;
} UserModeInfo;
struct
{
USHORT NameOffset;
USHORT NameLength;
USHORT TargetNameOffset;
USHORT TargetNameLength;
UCHAR PatchingFinished;
NTSTATUS ReturnCode;
HANDLE TargetProcess;
} InjectionInfo;
struct
{
HANDLE FileHandle1;
PIO_STATUS_BLOCK IoStatusBlock1;
PVOID RenameInformation1;
PVOID RenameInformationLength1;
HANDLE FileHandle2;
PIO_STATUS_BLOCK IoStatusBlock2;
PVOID RenameInformation2;
PVOID RenameInformationLength2;
} RenameInfo;
struct
{
HANDLE ParentDirectory;
HANDLE ObjectHandle1;
HANDLE ObjectHandle2;
} AtomicSwap;
};
} SYSTEM_HOTPATCH_CODE_INFORMATION, *PSYSTEM_HOTPATCH_CODE_INFORMATION;
//
// Class 75
//
#ifdef NTOS_MODE_USER
typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
{
ULONG ProviderSignature;
BOOLEAN Register;
PFNFTH FirmwareTableHandler;
PVOID DriverObject;
} SYSTEM_FIRMWARE_TABLE_HANDLER, *PSYSTEM_FIRMWARE_TABLE_HANDLER;
//
// Class 76
//
typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
{
ULONG ProviderSignature;
SYSTEM_FIRMWARE_TABLE_ACTION Action;
ULONG TableID;
ULONG TableBufferLength;
UCHAR TableBuffer[1];
} SYSTEM_FIRMWARE_TABLE_INFORMATION, *PSYSTEM_FIRMWARE_TABLE_INFORMATION;
//
// Class 81
//
typedef struct _SYSTEM_MEMORY_LIST_INFORMATION
{
SIZE_T ZeroPageCount;
SIZE_T FreePageCount;
SIZE_T ModifiedPageCount;
SIZE_T ModifiedNoWritePageCount;
SIZE_T BadPageCount;
SIZE_T PageCountByPriority[8];
SIZE_T RepurposedPagesByPriority[8];
} SYSTEM_MEMORY_LIST_INFORMATION, *PSYSTEM_MEMORY_LIST_INFORMATION;
#endif
#endif
================================================
FILE: ndk/halfuncs.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
halfuncs.h
Abstract:
Function definitions for the HAL.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _HALFUNCS_H
#define _HALFUNCS_H
//
// Dependencies
//
#include <umtypes.h>
#include <haltypes.h>
#include <ketypes.h>
#ifndef NTOS_MODE_USER
//
// Private HAL Callbacks
//
#define HalHandlerForBus HALPRIVATEDISPATCH->HalHandlerForBus
#define HalHandlerForConfigSpace HALPRIVATEDISPATCH->HalHandlerForConfigSpace
#define HalLocateHiberRanges HALPRIVATEDISPATCH->HalLocateHiberRanges
#define HalRegisterBusHandler HALPRIVATEDISPATCH->HalRegisterBusHandler
#define HalSetWakeEnable HALPRIVATEDISPATCH->HalSetWakeEnable
#define HalSetWakeAlarm HALPRIVATEDISPATCH->HalSetWakeAlarm
#define HalPciTranslateBusAddress HALPRIVATEDISPATCH->HalPciTranslateBusAddress
#define HalPciAssignSlotResources HALPRIVATEDISPATCH->HalPciAssignSlotResources
#define HalHaltSystem HALPRIVATEDISPATCH->HalHaltSystem
#define HalFindBusAddressTranslation HALPRIVATEDISPATCH->HalFindBusAddressTranslation
#define HalResetDisplay HALPRIVATEDISPATCH->HalResetDisplay
#define HalAllocateMapRegisters HALPRIVATEDISPATCH->HalAllocateMapRegisters
#define KdSetupPciDeviceForDebugging HALPRIVATEDISPATCH->KdSetupPciDeviceForDebugging
#define KdReleasePciDeviceforDebugging HALPRIVATEDISPATCH->KdReleasePciDeviceforDebugging
#define KdGetAcpiTablePhase0 HALPRIVATEDISPATCH->KdGetAcpiTablePhase0
#define KdCheckPowerButton HALPRIVATEDISPATCH->KdCheckPowerButton
#define HalVectorToIDTEntry HALPRIVATEDISPATCH->HalVectorToIDTEntry
#define KdMapPhysicalMemory64 HALPRIVATEDISPATCH->KdMapPhysicalMemory64
#define KdUnmapVirtualAddress HALPRIVATEDISPATCH->KdUnmapVirtualAddress
//
// The DDK steals these away from you.
//
#ifdef _MSC_VER
void __cdecl _enable(void);
void __cdecl _disable(void);
#pragma intrinsic(_enable)
#pragma intrinsic(_disable)
#endif
//
// Display Functions
//
NTHALAPI
VOID
NTAPI
HalDisplayString(
IN PCHAR String
);
//
// Initialization Functions
//
NTHALAPI
BOOLEAN
NTAPI
HalAllProcessorsStarted(
VOID
);
#ifdef _ARC_
NTHALAPI
VOID
NTAPI
HalInitializeProcessor(
ULONG ProcessorNumber,
struct _LOADER_PARAMETER_BLOCK *LoaderBlock
);
NTHALAPI
BOOLEAN
NTAPI
HalInitSystem(
ULONG BootPhase,
struct _LOADER_PARAMETER_BLOCK *LoaderBlock
);
NTHALAPI
BOOLEAN
NTAPI
HalStartNextProcessor(
IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock,
IN PKPROCESSOR_STATE ProcessorState
);
#endif
NTHALAPI
VOID
NTAPI
HalReturnToFirmware(
FIRMWARE_REENTRY Action
);
//
// CPU Routines
//
NTHALAPI
VOID
NTAPI
HalProcessorIdle(
VOID
);
//
// Interrupt Functions
//
NTHALAPI
BOOLEAN
NTAPI
HalBeginSystemInterrupt(
KIRQL Irql,
ULONG Vector,
PKIRQL OldIrql
);
NTHALAPI
BOOLEAN
NTAPI
HalDisableSystemInterrupt(
ULONG Vector,
KIRQL Irql
);
NTHALAPI
BOOLEAN
NTAPI
HalEnableSystemInterrupt(
ULONG Vector,
KIRQL Irql,
KINTERRUPT_MODE InterruptMode
);
NTHALAPI
VOID
NTAPI
HalEndSystemInterrupt(
KIRQL Irql,
ULONG Vector
);
NTHALAPI
VOID
NTAPI
HalReportResourceUsage(
VOID
);
NTHALAPI
VOID
FASTCALL
HalRequestSoftwareInterrupt(
KIRQL SoftwareInterruptRequested
);
NTHALAPI
VOID
NTAPI
HalRequestIpi(
KAFFINITY TargetSet
);
NTHALAPI
VOID
NTAPI
HalHandleNMI(
PVOID NmiInfo
);
//
// Environment Functions
//
#ifdef _ARC_
NTHALAPI
ARC_STATUS
NTAPI
HalSetEnvironmentVariable(
IN PCH Name,
IN PCH Value
);
NTHALAPI
ARC_STATUS
NTAPI
HalGetEnvironmentVariable(
IN PCH Variable,
IN USHORT Length,
OUT PCH Buffer
);
#endif
//
// Time Functions
//
NTHALAPI
BOOLEAN
NTAPI
HalQueryRealTimeClock(
IN PTIME_FIELDS RtcTime
);
NTHALAPI
BOOLEAN
NTAPI
HalSetRealTimeClock(
IN PTIME_FIELDS RtcTime
);
#endif
#endif
================================================
FILE: ndk/haltypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
haltypes.h
Abstract:
Type definitions for the HAL.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _HALTYPES_H
#define _HALTYPES_H
//
// Dependencies
//
#include <umtypes.h>
#ifndef NTOS_MODE_USER
//
// HalShutdownSystem Types
//
typedef enum _FIRMWARE_REENTRY
{
HalHaltRoutine,
HalPowerDownRoutine,
HalRestartRoutine,
HalRebootRoutine,
HalInteractiveModeRoutine,
HalMaximumRoutine
} FIRMWARE_REENTRY, *PFIRMWARE_REENTRY;
//
// HAL Private function Types
//
typedef
PBUS_HANDLER
(NTAPI *pHalHandlerForConfigSpace)(
IN BUS_DATA_TYPE ConfigSpace,
IN ULONG BusNumber
);
typedef
NTSTATUS
(NTAPI *PINSTALL_BUS_HANDLER)(
IN PBUS_HANDLER Bus
);
typedef
NTSTATUS
(NTAPI *pHalRegisterBusHandler)(
IN INTERFACE_TYPE InterfaceType,
IN BUS_DATA_TYPE ConfigSpace,
IN ULONG BusNumber,
IN INTERFACE_TYPE ParentInterfaceType,
IN ULONG ParentBusNumber,
IN ULONG ContextSize,
IN PINSTALL_BUS_HANDLER InstallCallback,
OUT PBUS_HANDLER *BusHandler
);
typedef
VOID
(NTAPI *pHalSetWakeEnable)(
IN BOOLEAN Enable
);
typedef
VOID
(NTAPI *pHalSetWakeAlarm)(
IN ULONGLONG AlartTime,
IN PTIME_FIELDS TimeFields
);
typedef
VOID
(NTAPI *pHalLocateHiberRanges)(
IN PVOID MemoryMap
);
typedef
BOOLEAN
(NTAPI *pHalAllocateMapRegisters)(
IN PADAPTER_OBJECT AdapterObject,
IN ULONG Unknown,
IN ULONG Unknown2,
PMAP_REGISTER_ENTRY Registers
);
//
// HAL Bus Handler Callback Types
//
typedef
NTSTATUS
(NTAPI *pAdjustResourceList)(
IN PBUS_HANDLER BusHandler,
IN ULONG BusNumber,
IN OUT PCM_RESOURCE_LIST Resources
);
typedef
NTSTATUS
(NTAPI *pAssignSlotResources)(
IN PBUS_HANDLER BusHandler,
IN PBUS_HANDLER RootHandler,
IN PUNICODE_STRING RegistryPath,
IN PUNICODE_STRING DriverClassName,
IN PDRIVER_OBJECT DriverObject,
IN PDEVICE_OBJECT DeviceObject,
IN ULONG SlotNumber,
IN OUT PCM_RESOURCE_LIST *AllocatedResources
);
typedef
ULONG
(NTAPI *pGetSetBusData)(
IN PBUS_HANDLER BusHandler,
IN PBUS_HANDLER RootHandler,
IN PCI_SLOT_NUMBER SlotNumber,
OUT PUCHAR Buffer,
IN ULONG Offset,
IN ULONG Length
);
typedef
ULONG
(NTAPI *pGetInterruptVector)(
IN PBUS_HANDLER BusHandler,
IN ULONG BusNumber,
IN ULONG BusInterruptLevel,
IN ULONG BusInterruptVector,
OUT PKIRQL Irql,
OUT PKAFFINITY Affinity
);
typedef
ULONG
(NTAPI *pTranslateBusAddress)(
IN PBUS_HANDLER BusHandler,
IN ULONG BusNumber,
IN PHYSICAL_ADDRESS BusAddress,
IN OUT PULONG AddressSpace,
OUT PPHYSICAL_ADDRESS TranslatedAddress
);
//
// Hal Private dispatch Table
//
#define HAL_PRIVATE_DISPATCH_VERSION 2
typedef struct _HAL_PRIVATE_DISPATCH
{
ULONG Version;
pHalHandlerForBus HalHandlerForBus;
pHalHandlerForConfigSpace HalHandlerForConfigSpace;
pHalLocateHiberRanges HalLocateHiberRanges;
pHalRegisterBusHandler HalRegisterBusHandler;
pHalSetWakeEnable HalSetWakeEnable;
pHalSetWakeAlarm HalSetWakeAlarm;
pHalTranslateBusAddress HalPciTranslateBusAddress;
pHalAssignSlotResources HalPciAssignSlotResources;
pHalHaltSystem HalHaltSystem;
pHalFindBusAddressTranslation HalFindBusAddressTranslation;
pHalResetDisplay HalResetDisplay;
pHalAllocateMapRegisters HalAllocateMapRegisters;
pKdSetupPciDeviceForDebugging KdSetupPciDeviceForDebugging;
pKdReleasePciDeviceForDebugging KdReleasePciDeviceforDebugging;
pKdGetAcpiTablePhase0 KdGetAcpiTablePhase0;
pKdCheckPowerButton KdCheckPowerButton;
pHalVectorToIDTEntry HalVectorToIDTEntry;
pKdMapPhysicalMemory64 KdMapPhysicalMemory64;
pKdUnmapVirtualAddress KdUnmapVirtualAddress;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
pKdGetPciDataByOffset KdGetPciDataByOffset;
pKdSetPciDataByOffset KdSetPciDataByOffset;
PVOID HalGetInterruptVectorOverride;
PVOID HalGetVectorInputOverride;
#endif
} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
//
// HAL Bus Handler
//
typedef struct _BUS_HANDLER
{
ULONG Version;
INTERFACE_TYPE InterfaceType;
BUS_DATA_TYPE ConfigurationType;
ULONG BusNumber;
PDEVICE_OBJECT DeviceObject;
struct _BUS_HANDLER *ParentHandler;
PVOID BusData;
ULONG DeviceControlExtensionSize;
//PSUPPORTED_RANGES BusAddresses;
ULONG Reserved[4];
pGetSetBusData GetBusData;
pGetSetBusData SetBusData;
pAdjustResourceList AdjustResourceList;
pAssignSlotResources AssignSlotResources;
pGetInterruptVector GetInterruptVector;
pTranslateBusAddress TranslateBusAddress;
} BUS_HANDLER;
//
// Kernel Exports
//
#if defined(_NTDRIVER_) || defined(_NTHAL_)
extern NTSYSAPI PHAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
#define HALPRIVATEDISPATCH ((PHAL_PRIVATE_DISPATCH)&HalPrivateDispatchTable)
#else
extern NTSYSAPI HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
#define HALPRIVATEDISPATCH (&HalPrivateDispatchTable)
#endif
//
// HAL Exports
//
#ifndef _NTHAL_
extern NTHALAPI PUCHAR *KdComPortInUse;
#endif
#endif
#endif
================================================
FILE: ndk/i386/ketypes.h
================================================
/*++ NDK Version: 0098
Copyright (c) Alex Ionescu. All rights reserved.
Header Name:
ketypes.h (X86)
Abstract:
i386 Type definitions for the Kernel services.
Author:
Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
--*/
#ifndef _I386_KETYPES_H
#define _I386_KETYPES_H
//
// Dependencies
//
//
// Machine Types
//
#define MACHINE_TYPE_ISA 0x0000
#define MACHINE_TYPE_EISA 0x0001
#define MACHINE_TYPE_MCA 0x0002
//
// X86 80386 Segment Types
//
#define I386_TASK_GATE 0x5
#define I386_TSS 0x9
#define I386_ACTIVE_TSS 0xB
#define I386_CALL_GATE 0xC
#define I386_INTERRUPT_GATE 0xE
#define I386_TRAP_GATE 0xF
//
// Selector Names
//
#define RPL_MASK 0x0003
#define MODE_MASK 0x0001
#define KGDT_R0_CODE 0x8
#define KGDT_R0_DATA 0x10
#define KGDT_R3_CODE 0x18
#define KGDT_R3_DATA 0x20
#define KGDT_TSS 0x28
#define KGDT_R0_PCR 0x30
#define KGDT_R3_TEB 0x38
#define KGDT_LDT 0x48
#define KGDT_DF_TSS 0x50
#define KGDT_NMI_TSS 0x58
//
// CR4
//
#define CR4_VME 0x1
#define CR4_PVI 0x2
#define CR4_TSD 0x4
#define CR4_DE 0x8
#define CR4_PSE 0x10
#define CR4_PAE 0x20
#define CR4_MCE 0x40
#define CR4_PGE 0x80
#define CR4_FXSR 0x200
#define CR4_XMMEXCPT 0x400
//
// EFlags
//
#define EFLAGS_CF 0x01L
#define EFLAGS_ZF 0x40L
#define EFLAGS_TF 0x100L
#define EFLAGS_INTERRUPT_MASK 0x200L
#define EFLAGS_DF 0x400L
#define EFLAGS_NESTED_TASK 0x4000L
#define EFLAGS_V86_MASK 0x20000
#define EFLAGS_ALIGN_CHECK 0x40000
#define EFLAGS_VIF 0x80000
#define EFLAGS_VIP 0x100000
#define EFLAGS_USER_SANITIZE 0x3F4DD7
#define EFLAG_SIGN 0x8000
#define EFLAG_ZERO 0x4000
//
// IPI Types
//
#define IPI_APC 1
#define IPI_DPC 2
#define IPI_FREEZE 4
#define IPI_PACKET_READY 8
#define IPI_SYNCH_REQUEST 16
//
// PRCB Flags
//
#define PRCB_MAJOR_VERSION 1
#define PRCB_BUILD_DEBUG 1
#define PRCB_BUILD_UNIPROCESSOR 2
//
// HAL Variables
//
#define INITIAL_STALL_COUNT 0x64
//
// IOPM Definitions
//
#define IO_ACCESS_MAP_NONE 0
#define IOPM_OFFSET FIELD_OFFSET(KTSS, IoMaps[0].IoMap)
#define KiComputeIopmOffset(MapNumber) \
(MapNumber == IO_ACCESS_MAP_NONE) ? \
(USHORT)(sizeof(KTSS)) : \
(USHORT)(FIELD_OFFSET(KTSS, IoMaps[MapNumber-1].IoMap))
//
// Static Kernel-Mode Address start (use MM_KSEG0_BASE for actual)
//
#define KSEG0_BASE 0x80000000
//
// Synchronization-level IRQL
//
#ifndef CONFIG_SMP
#define SYNCH_LEVEL DISPATCH_LEVEL
#else
#define SYNCH_LEVEL (IPI_LEVEL - 1)
#endif
//
// Trap Frame Definition
//
typedef struct _KTRAP_FRAME
{
ULONG DbgEbp;
ULONG DbgEip;
ULONG DbgArgMark;
ULONG DbgArgPointer;
ULONG TempSegCs;
ULONG TempEsp;
ULONG Dr0;
ULONG Dr1;
ULONG Dr2;
ULONG Dr3;
ULONG Dr6;
ULONG Dr7;
ULONG SegGs;
ULONG SegEs;
ULONG SegDs;
ULONG Edx;
ULONG Ecx;
ULONG Eax;
ULONG PreviousPreviousMode;
struct _EXCEPTION_REGISTRATION_RECORD FAR *ExceptionList;
ULONG SegFs;
ULONG Edi;
ULONG Esi;
ULONG Ebx;
ULONG Ebp;
ULONG ErrCode;
ULONG Eip;
ULONG SegCs;
ULONG EFlags;
ULONG HardwareEsp;
ULONG HardwareSegSs;
ULONG V86Es;
ULONG V86Ds;
ULONG V86Fs;
ULONG V86Gs;
} KTRAP_FRAME, *PKTRAP_FRAME;
//
// LDT Entry Definition
//
#ifndef _LDT_ENTRY_DEFINED
#define _LDT_ENTRY_DEFINED
typedef struct _LDT_ENTRY
{
USHORT LimitLow;
USHORT BaseLow;
union
{
struct
{
UCHAR BaseMid;
UCHAR Flags1;
UCHAR Flags2;
UCHAR BaseHi;
} Bytes;
struct
{
ULONG BaseMid:8;
ULONG Type:5;
ULONG Dpl:2;
ULONG Pres:1;
ULONG LimitHi:4;
ULONG Sys:1;
ULONG Reserved_0:1;
ULONG Default_Big:1;
ULONG Granularity:1;
ULONG BaseHi:8;
} Bits;
} HighWord;
} LDT_ENTRY, *PLDT_ENTRY, *LPLDT_ENTRY;
#endif
//
// GDT Entry Definition
//
typedef struct _KGDTENTRY
{
USHORT LimitLow;
USHORT BaseLow;
union
{
struct
{
UCHAR BaseMid;
UCHAR Flags1;
UCHAR Flags2;
UCHAR BaseHi;
} Bytes;
struct
{
ULONG BaseMid:8;
ULONG Type:5;
ULONG Dpl:2;
ULONG Pres:1;
ULONG LimitHi:4;
ULONG Sys:1;
ULONG Reserved_0:1;
ULONG Default_Big:1;
ULONG Granularity:1;
ULONG BaseHi:8;
} Bits;
} HighWord;
} KGDTENTRY, *PKGDTENTRY;
//
// IDT Entry Access Definition
//
typedef struct
gitextract_ic8dbz2h/ ├── .github/ │ └── workflows/ │ ├── build.yml │ └── release.yml ├── .gitignore ├── CONTRIBUTORS.md ├── LICENSE ├── README.md ├── display.c ├── file.c ├── hardware.c ├── input.c ├── install/ │ ├── add.reg │ └── remove.reg ├── keytrans.c ├── main.c ├── makefile ├── ndk/ │ ├── arch/ │ │ ├── ketypes.h │ │ └── mmtypes.h │ ├── asm.h │ ├── cctypes.h │ ├── cmfuncs.h │ ├── cmtypes.h │ ├── dbgkfuncs.h │ ├── dbgktypes.h │ ├── exfuncs.h │ ├── extypes.h │ ├── halfuncs.h │ ├── haltypes.h │ ├── i386/ │ │ ├── ketypes.h │ │ └── mmtypes.h │ ├── ifssupp.h │ ├── inbvfuncs.h │ ├── inbvtypes.h │ ├── iofuncs.h │ ├── iotypes.h │ ├── kdfuncs.h │ ├── kdtypes.h │ ├── kefuncs.h │ ├── ketypes.h │ ├── ldrfuncs.h │ ├── ldrtypes.h │ ├── lpcfuncs.h │ ├── lpctypes.h │ ├── mmfuncs.h │ ├── mmtypes.h │ ├── ntndk.h │ ├── ntnls.h │ ├── obfuncs.h │ ├── obtypes.h │ ├── pofuncs.h │ ├── potypes.h │ ├── powerpc/ │ │ ├── ketypes.h │ │ └── mmtypes.h │ ├── psfuncs.h │ ├── pstypes.h │ ├── readme.txt │ ├── rtlfuncs.h │ ├── rtltypes.h │ ├── sefuncs.h │ ├── setypes.h │ ├── umfuncs.h │ └── umtypes.h ├── ntfile.c ├── ntfile.h ├── ntreg.c ├── ntreg.h ├── precomp.h ├── process.c ├── shell.c ├── sources └── sysinfo.c
SYMBOL INDEX (663 symbols across 43 files)
FILE: display.c
function NTSTATUS (line 29) | NTSTATUS
function NTSTATUS (line 56) | NTSTATUS
function NTSTATUS (line 97) | NTSTATUS
function NTSTATUS (line 113) | NTSTATUS
FILE: file.c
function ULONG (line 25) | ULONG
function NTSTATUS (line 47) | NTSTATUS
function VOID (line 74) | VOID RtlCliDumpFileInfo(PFILE_BOTH_DIR_INFORMATION DirInfo)
function NTSTATUS (line 166) | NTSTATUS
FILE: hardware.c
function NTSTATUS (line 17) | NTSTATUS
function NTSTATUS (line 35) | NTSTATUS
function NTSTATUS (line 58) | NTSTATUS
function NTSTATUS (line 140) | NTSTATUS
function NTSTATUS (line 178) | NTSTATUS
FILE: input.c
function NTSTATUS (line 44) | NTSTATUS
function NTSTATUS (line 111) | NTSTATUS
function CHAR (line 153) | CHAR RtlCliGetChar(IN HANDLE hDriver)
function PCHAR (line 185) | PCHAR
FILE: keytrans.c
type SCANTOASCII (line 11) | typedef struct _SCANTOASCII
function IntUpdateControlKeyState (line 80) | static void IntUpdateControlKeyState(LPDWORD State, PKEYBOARD_INPUT_DATA...
function UCHAR (line 131) | static UCHAR IntAsciiFromInput(PKEYBOARD_INPUT_DATA InputData, DWORD Key...
function IntTranslateKey (line 151) | void IntTranslateKey(PKEYBOARD_INPUT_DATA InputData, KBD_RECORD *kbd_rec)
FILE: main.c
function VOID (line 41) | VOID RtlClipProcessMessage(PCHAR Command)
function VOID (line 368) | VOID RtlClipDisplayPrompt(VOID)
function NTSTATUS (line 385) | NTSTATUS
FILE: ndk/cctypes.h
type VACB (line 41) | typedef struct _VACB
type PRIVATE_CACHE_MAP_FLAGS (line 56) | typedef struct _PRIVATE_CACHE_MAP_FLAGS
type PRIVATE_CACHE_MAP (line 64) | typedef struct _PRIVATE_CACHE_MAP
type SHARED_CACHE_MAP (line 89) | typedef struct _SHARED_CACHE_MAP
FILE: ndk/cmtypes.h
type CM_SHARE_DISPOSITION (line 68) | typedef enum _CM_SHARE_DISPOSITION
type KEY_INFORMATION_CLASS (line 126) | typedef enum _KEY_INFORMATION_CLASS
type KEY_VALUE_INFORMATION_CLASS (line 136) | typedef enum _KEY_VALUE_INFORMATION_CLASS
type KEY_SET_INFORMATION_CLASS (line 145) | typedef enum _KEY_SET_INFORMATION_CLASS
type PLUGPLAY_CONTROL_CLASS (line 157) | typedef enum _PLUGPLAY_CONTROL_CLASS
type PLUGPLAY_BUS_CLASS (line 167) | typedef enum _PLUGPLAY_BUS_CLASS
type PLUGPLAY_VIRTUAL_BUS_TYPE (line 177) | typedef enum _PLUGPLAY_VIRTUAL_BUS_TYPE
type PLUGPLAY_EVENT_CATEGORY (line 186) | typedef enum _PLUGPLAY_EVENT_CATEGORY
type KEY_WRITE_TIME_INFORMATION (line 205) | typedef struct _KEY_WRITE_TIME_INFORMATION
type KEY_USER_FLAGS_INFORMATION (line 210) | typedef struct _KEY_USER_FLAGS_INFORMATION
type KEY_FULL_INFORMATION (line 215) | typedef struct _KEY_FULL_INFORMATION
type KEY_NAME_INFORMATION (line 230) | typedef struct _KEY_NAME_INFORMATION
type KEY_NODE_INFORMATION (line 236) | typedef struct _KEY_NODE_INFORMATION
type KEY_VALUE_ENTRY (line 246) | typedef struct _KEY_VALUE_ENTRY
type KEY_VALUE_PARTIAL_INFORMATION (line 254) | typedef struct _KEY_VALUE_PARTIAL_INFORMATION
type KEY_VALUE_BASIC_INFORMATION (line 262) | typedef struct _KEY_VALUE_BASIC_INFORMATION
type KEY_VALUE_FULL_INFORMATION (line 270) | typedef struct _KEY_VALUE_FULL_INFORMATION
type KEY_BASIC_INFORMATION (line 280) | typedef struct _KEY_BASIC_INFORMATION
type PLUGPLAY_EVENT_BLOCK (line 293) | typedef struct _PLUGPLAY_EVENT_BLOCK
type PLUGPLAY_CONTROL_PROPERTY_DATA (line 347) | typedef struct _PLUGPLAY_CONTROL_PROPERTY_DATA
type PLUGPLAY_CONTROL_RELATED_DEVICE_DATA (line 356) | typedef struct _PLUGPLAY_CONTROL_RELATED_DEVICE_DATA
type PLUGPLAY_CONTROL_STATUS_DATA (line 365) | typedef struct _PLUGPLAY_CONTOL_STATUS_DATA
type PLUGPLAY_CONTROL_DEPTH_DATA (line 374) | typedef struct _PLUGPLAY_CONTROL_DEPTH_DATA
type PLUGPLAY_CONTROL_RESET_DEVICE_DATA (line 381) | typedef struct _PLUGPLAY_CONTROL_RESET_DEVICE_DATA
type PLUGPLAY_BUS_TYPE (line 389) | typedef struct _PLUGPLAY_BUS_TYPE
type PLUGPLAY_BUS_INSTANCE (line 402) | typedef struct _PLUGPLAY_BUS_INSTANCE
type CM_PARTIAL_RESOURCE_DESCRIPTOR (line 415) | typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR
type CM_PARTIAL_RESOURCE_LIST (line 468) | typedef struct _CM_PARTIAL_RESOURCE_LIST
type CM_FULL_RESOURCE_DESCRIPTOR (line 479) | typedef struct _CM_FULL_RESOURCE_DESCRIPTOR
type CM_RESOURCE_LIST (line 486) | typedef struct _CM_RESOURCE_LIST
type CM_ROM_BLOCK (line 495) | typedef struct _CM_ROM_BLOCK
type CM_INT13_DRIVE_PARAMETER (line 504) | typedef struct _CM_INT13_DRIVE_PARAMETER
type CM_DISK_GEOMETRY_DEVICE_DATA (line 513) | typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA
FILE: ndk/dbgktypes.h
type DEBUGOBJECTINFOCLASS (line 39) | typedef enum _DEBUGOBJECTINFOCLASS
type DBGKM_APINUMBER (line 48) | typedef enum _DBGKM_APINUMBER
type DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION (line 64) | typedef struct _DEBUG_OBJECT_KILL_PROCESS_ON_EXIT_INFORMATION
type DEBUG_OBJECT (line 74) | typedef struct _DEBUG_OBJECT
type DBG_STATE (line 95) | typedef enum _DBG_STATE
type DBGKM_EXCEPTION (line 113) | typedef struct _DBGKM_EXCEPTION
type DBGKM_CREATE_THREAD (line 119) | typedef struct _DBGKM_CREATE_THREAD
type DBGKM_CREATE_PROCESS (line 125) | typedef struct _DBGKM_CREATE_PROCESS
type DBGKM_EXIT_THREAD (line 135) | typedef struct _DBGKM_EXIT_THREAD
type DBGKM_EXIT_PROCESS (line 140) | typedef struct _DBGKM_EXIT_PROCESS
type DBGKM_LOAD_DLL (line 145) | typedef struct _DBGKM_LOAD_DLL
type DBGKM_UNLOAD_DLL (line 154) | typedef struct _DBGKM_UNLOAD_DLL
type DBGUI_WAIT_STATE_CHANGE (line 162) | typedef struct _DBGUI_WAIT_STATE_CHANGE
type DBGKM_MSG (line 190) | typedef struct _DBGKM_MSG
type DEBUG_EVENT (line 212) | typedef struct _DEBUG_EVENT
FILE: ndk/exfuncs.h
type _EVENT_TRACE_HEADER (line 32) | struct _EVENT_TRACE_HEADER
FILE: ndk/extypes.h
type USHORT (line 54) | typedef USHORT LANGID, *PLANGID;
type USHORT (line 55) | typedef USHORT RTL_ATOM, *PRTL_ATOM;
type SHUTDOWN_ACTION (line 162) | typedef enum _SHUTDOWN_ACTION
type HARDERROR_RESPONSE_OPTION (line 172) | typedef enum _HARDERROR_RESPONSE_OPTION
type HARDERROR_RESPONSE (line 183) | typedef enum _HARDERROR_RESPONSE
type SYSTEM_INFORMATION_CLASS (line 201) | typedef enum _SYSTEM_INFORMATION_CLASS
type MUTANT_INFORMATION_CLASS (line 307) | typedef enum _MUTANT_INFORMATION_CLASS
type ATOM_INFORMATION_CLASS (line 316) | typedef enum _ATOM_INFORMATION_CLASS
type TIMER_INFORMATION_CLASS (line 325) | typedef enum _TIMER_INFORMATION_CLASS
type SEMAPHORE_INFORMATION_CLASS (line 333) | typedef enum _SEMAPHORE_INFORMATION_CLASS
type EVENT_INFORMATION_CLASS (line 341) | typedef enum _EVENT_INFORMATION_CLASS
type SYSTEM_FIRMWARE_TABLE_ACTION (line 351) | typedef enum _SYSTEM_FIRMWARE_TABLE_ACTION
type _SYSTEM_FIRMWARE_TABLE_INFORMATION (line 360) | struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
type NTSTATUS (line 361) | typedef
type _HANDLE_TABLE_ENTRY (line 372) | struct _HANDLE_TABLE_ENTRY
type ERESOURCE_XP (line 383) | typedef struct _ERESOURCE_XP
type EX_QUEUE_WORKER_INFO (line 406) | typedef struct _EX_QUEUE_WORKER_INFO
type EX_WORK_QUEUE (line 414) | typedef struct _EX_WORK_QUEUE
type EX_FAST_REF (line 427) | typedef struct _EX_FAST_REF
type EX_RUNDOWN_REF_CACHE_AWARE (line 440) | typedef struct _EX_RUNDOWN_REF_CACHE_AWARE
type EX_RUNDOWN_WAIT_BLOCK (line 451) | typedef struct _EX_RUNDOWN_WAIT_BLOCK
type EX_PUSH_LOCK (line 462) | typedef struct _EX_PUSH_LOCK
type EX_PUSH_LOCK_WAIT_BLOCK (line 482) | typedef __ALIGNED(16) struct _EX_PUSH_LOCK_WAIT_BLOCK
type CALLBACK_OBJECT (line 505) | typedef struct _CALLBACK_OBJECT
type CALLBACK_REGISTRATION (line 517) | typedef struct _CALLBACK_REGISTRATION
type EX_CALLBACK_ROUTINE_BLOCK (line 530) | typedef struct _EX_CALLBACK_ROUTINE_BLOCK
type EX_CALLBACK (line 540) | typedef struct _EX_CALLBACK
type EPROFILE (line 548) | typedef struct _EPROFILE
type HANDLE_TRACE_DB_ENTRY (line 567) | typedef struct _HANDLE_TRACE_DB_ENTRY
type HANDLE_TRACE_DEBUG_INFO (line 575) | typedef struct _HANDLE_TRACE_DEBUG_INFO
type HANDLE_TABLE_ENTRY_INFO (line 585) | typedef struct _HANDLE_TABLE_ENTRY_INFO
type HANDLE_TABLE_ENTRY (line 590) | typedef struct _HANDLE_TABLE_ENTRY
type HANDLE_TABLE (line 611) | typedef struct _HANDLE_TABLE
type HARDERROR_MSG (line 659) | typedef struct _HARDERROR_MSG
type MUTANT_BASIC_INFORMATION (line 674) | typedef struct _MUTANT_BASIC_INFORMATION
type MUTANT_OWNER_INFORMATION (line 681) | typedef struct _MUTANT_OWNER_INFORMATION
type ATOM_BASIC_INFORMATION (line 689) | typedef struct _ATOM_BASIC_INFORMATION
type ATOM_TABLE_INFORMATION (line 697) | typedef struct _ATOM_TABLE_INFORMATION
type TIMER_BASIC_INFORMATION (line 706) | typedef struct _TIMER_BASIC_INFORMATION
type SEMAPHORE_BASIC_INFORMATION (line 715) | typedef struct _SEMAPHORE_BASIC_INFORMATION
type EVENT_BASIC_INFORMATION (line 724) | typedef struct _EVENT_BASIC_INFORMATION
type SYSTEM_BASIC_INFORMATION (line 733) | typedef struct _SYSTEM_BASIC_INFORMATION
type SYSTEM_PROCESSOR_INFORMATION (line 749) | typedef struct _SYSTEM_PROCESSOR_INFORMATION
type SYSTEM_PERFORMANCE_INFORMATION (line 759) | typedef struct _SYSTEM_PERFORMANCE_INFORMATION
type SYSTEM_TIMEOFDAY_INFORMATION (line 838) | typedef struct _SYSTEM_TIMEOFDAY_INFORMATION
type SYSTEM_THREAD_INFORMATION (line 853) | typedef struct _SYSTEM_THREAD_INFORMATION
type SYSTEM_PROCESS_INFORMATION (line 868) | typedef struct _SYSTEM_PROCESS_INFORMATION
type SYSTEM_CALL_COUNT_INFORMATION (line 917) | typedef struct _SYSTEM_CALL_COUNT_INFORMATION
type SYSTEM_DEVICE_INFORMATION (line 924) | typedef struct _SYSTEM_DEVICE_INFORMATION
type SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION (line 935) | typedef struct _SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION
type SYSTEM_FLAGS_INFORMATION (line 946) | typedef struct _SYSTEM_FLAGS_INFORMATION
type SYSTEM_CALL_TIME_INFORMATION (line 952) | typedef struct _SYSTEM_CALL_TIME_INFORMATION
type SYSTEM_POOL_ENTRY (line 966) | typedef struct _SYSTEM_POOL_ENTRY
type SYSTEM_POOL_INFORMATION (line 980) | typedef struct _SYSTEM_POOL_INFORMATION
type SYSTEM_HANDLE_TABLE_ENTRY_INFO (line 992) | typedef struct _SYSTEM_HANDLE_TABLE_ENTRY_INFO
type SYSTEM_HANDLE_INFORMATION (line 1003) | typedef struct _SYSTEM_HANDLE_INFORMATION
type SYSTEM_OBJECTTYPE_INFORMATION (line 1010) | typedef struct _SYSTEM_OBJECTTYPE_INFORMATION
type SYSTEM_OBJECT_INFORMATION (line 1025) | typedef struct _SYSTEM_OBJECT_INFORMATION
type SYSTEM_PAGEFILE_INFORMATION (line 1042) | typedef struct _SYSTEM_PAGEFILE_INFORMATION
type SYSTEM_VDM_INSTEMUL_INFO (line 1052) | typedef struct _SYSTEM_VDM_INSTEMUL_INFO
type SYSTEM_FILECACHE_INFORMATION (line 1093) | typedef struct _SYSTEM_FILECACHE_INFORMATION
type SYSTEM_POOLTAG (line 1107) | typedef struct _SYSTEM_POOLTAG
type SYSTEM_POOLTAG_INFORMATION (line 1121) | typedef struct _SYSTEM_POOLTAG_INFORMATION
type SYSTEM_INTERRUPT_INFORMATION (line 1128) | typedef struct _SYSTEM_INTERRUPT_INFORMATION
type SYSTEM_DPC_BEHAVIOR_INFORMATION (line 1139) | typedef struct _SYSTEM_DPC_BEHAVIOR_INFORMATION
type SYSTEM_MEMORY_INFO (line 1149) | typedef struct _SYSTEM_MEMORY_INFO
type SYSTEM_MEMORY_INFORMATION (line 1158) | typedef struct _SYSTEM_MEMORY_INFORMATION
type SYSTEM_GDI_DRIVER_INFORMATION (line 1166) | typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
type SYSTEM_QUERY_TIME_ADJUST_INFORMATION (line 1180) | typedef struct _SYSTEM_QUERY_TIME_ADJUST_INFORMATION
type SYSTEM_SET_TIME_ADJUST_INFORMATION (line 1187) | typedef struct _SYSTEM_SET_TIME_ADJUST_INFORMATION
type SYSTEM_REF_TRACE_INFORMATION (line 1198) | typedef struct _SYSTEM_REF_TRACE_INFORMATION
type SYSTEM_EXCEPTION_INFORMATION (line 1209) | typedef struct _SYSTEM_EXCEPTION_INFORMATION
type SYSTEM_CRASH_STATE_INFORMATION (line 1218) | typedef struct _SYSTEM_CRASH_STATE_INFORMATION
type SYSTEM_KERNEL_DEBUGGER_INFORMATION (line 1224) | typedef struct _SYSTEM_KERNEL_DEBUGGER_INFORMATION
type SYSTEM_CONTEXT_SWITCH_INFORMATION (line 1231) | typedef struct _SYSTEM_CONTEXT_SWITCH_INFORMATION
type SYSTEM_REGISTRY_QUOTA_INFORMATION (line 1248) | typedef struct _SYSTEM_REGISTRY_QUOTA_INFORMATION
type SYSTEM_PLUGPLAY_BUS_INFORMATION (line 1262) | typedef struct _SYSTEM_PLUGPLAY_BUS_INFORMATION
type SYSTEM_DOCK_INFORMATION (line 1269) | typedef struct _SYSTEM_DOCK_INFORMATION
type SYSTEM_POWER_INFORMATION_NATIVE (line 1278) | typedef struct _SYSTEM_POWER_INFORMATION_NATIVE
type SYSTEM_LEGACY_DRIVER_INFORMATION (line 1293) | typedef struct _SYSTEM_LEGACY_DRIVER_INFORMATION
type SYSTEM_LOOKASIDE_INFORMATION (line 1304) | typedef struct _SYSTEM_LOOKASIDE_INFORMATION
type SYSTEM_VERIFIER_INFORMATION (line 1332) | typedef struct _SYSTEM_VERIFIER_INFORMATION
type SYSTEM_SESSION_PROCESS_INFORMATION (line 1364) | typedef struct _SYSTEM_SESSION_PROCESS_INFORMATION
type SYSTEM_HOTPATCH_CODE_INFORMATION (line 1385) | typedef struct _SYSTEM_HOTPATCH_CODE_INFORMATION
type SYSTEM_FIRMWARE_TABLE_HANDLER (line 1442) | typedef struct _SYSTEM_FIRMWARE_TABLE_HANDLER
type SYSTEM_FIRMWARE_TABLE_INFORMATION (line 1453) | typedef struct _SYSTEM_FIRMWARE_TABLE_INFORMATION
type SYSTEM_MEMORY_LIST_INFORMATION (line 1465) | typedef struct _SYSTEM_MEMORY_LIST_INFORMATION
FILE: ndk/halfuncs.h
type _LOADER_PARAMETER_BLOCK (line 90) | struct _LOADER_PARAMETER_BLOCK
type _LOADER_PARAMETER_BLOCK (line 98) | struct _LOADER_PARAMETER_BLOCK
FILE: ndk/haltypes.h
type FIRMWARE_REENTRY (line 32) | typedef enum _FIRMWARE_REENTRY
type HAL_PRIVATE_DISPATCH (line 159) | typedef struct _HAL_PRIVATE_DISPATCH
type BUS_HANDLER (line 192) | typedef struct _BUS_HANDLER
FILE: ndk/i386/ketypes.h
type KTRAP_FRAME (line 138) | typedef struct _KTRAP_FRAME
type LDT_ENTRY (line 182) | typedef struct _LDT_ENTRY
type KGDTENTRY (line 215) | typedef struct _KGDTENTRY
type KIDT_ACCESS (line 247) | typedef struct _KIDT_ACCESS
type KIDTENTRY (line 266) | typedef struct _KIDTENTRY
type KDESCRIPTOR (line 274) | typedef struct _DESCRIPTOR
function _KPRCB (line 286) | _KPRCB *
type FNSAVE_FORMAT (line 295) | typedef struct _FNSAVE_FORMAT
type FXSAVE_FORMAT (line 307) | typedef struct _FXSAVE_FORMAT
type FX_SAVE_AREA (line 325) | typedef struct _FX_SAVE_AREA
type KSPECIAL_REGISTERS (line 339) | typedef struct _KSPECIAL_REGISTERS
type KPROCESSOR_STATE (line 361) | typedef struct _KPROCESSOR_STATE
type KPRCB (line 371) | typedef struct _KPRCB
type KIPCR (line 617) | typedef struct _KIPCR
type KIIO_ACCESS_MAP (line 669) | typedef struct _KiIoAccessMap
type KTSS (line 675) | typedef struct _KTSS
type KEXCEPTION_FRAME (line 717) | typedef struct _KEXCEPTION_FRAME KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
FILE: ndk/i386/mmtypes.h
type HARDWARE_PTE_X86 (line 53) | typedef struct _HARDWARE_PTE_X86
type MMPTE_SOFTWARE (line 70) | typedef struct _MMPTE_SOFTWARE
type MMPTE_TRANSITION (line 80) | typedef struct _MMPTE_TRANSITION
type MMPTE_PROTOTYPE (line 93) | typedef struct _MMPTE_PROTOTYPE
type MMPTE_SUBSECTION (line 103) | typedef struct _MMPTE_SUBSECTION
type MMPTE_LIST (line 113) | typedef struct _MMPTE_LIST
type MMPTE_HARDWARE (line 125) | typedef struct _MMPTE_HARDWARE
type MMPTE_HARDWARE (line 144) | typedef struct _MMPTE_HARDWARE
FILE: ndk/ifssupp.h
type TOKEN_TYPE (line 24) | typedef enum _TOKEN_TYPE
type PVOID (line 30) | typedef PVOID PRTL_HEAP_PARAMETERS;
type PVOID (line 31) | typedef PVOID PFS_FILTER_CALLBACKS;
type USHORT (line 32) | typedef USHORT SECURITY_DESCRIPTOR_CONTROL, *PSECURITY_DESCRIPTOR_CONTROL;
type RTL_SPLAY_LINKS (line 34) | typedef struct _RTL_SPLAY_LINKS
type RTL_GENERIC_TABLE (line 41) | typedef struct _RTL_GENERIC_TABLE RTL_GENERIC_TABLE, *PRTL_GENERIC_TABLE;
type ULONG (line 42) | typedef ULONG TABLE_SEARCH_RESULT;
type PORT_MESSAGE (line 56) | typedef struct _PORT_MESSAGE
type PORT_VIEW (line 89) | typedef struct _PORT_VIEW
type REMOTE_PORT_VIEW (line 99) | typedef struct _REMOTE_PORT_VIEW
type KAPC_STATE (line 106) | typedef struct _KAPC_STATE
type KQUEUE (line 115) | typedef struct _KQUEUE
type ACE_HEADER (line 124) | typedef struct _ACE_HEADER
type RTL_GENERIC_COMPARE_RESULTS (line 131) | typedef enum _RTL_GENERIC_COMPARE_RESULTS
type SID_IDENTIFIER_AUTHORITY (line 138) | typedef struct _SID_IDENTIFIER_AUTHORITY
type SID_AND_ATTRIBUTES (line 143) | typedef struct _SID_AND_ATTRIBUTES
type TOKEN_SOURCE (line 149) | typedef struct _TOKEN_SOURCE
type TOKEN_CONTROL (line 155) | typedef struct _TOKEN_CONTROL
type SECURITY_CLIENT_CONTEXT (line 163) | typedef struct _SECURITY_CLIENT_CONTEXT
type SECURITY_DESCRIPTOR_RELATIVE (line 173) | typedef struct _SECURITY_DESCRIPTOR_RELATIVE
type TOKEN_GROUPS (line 184) | typedef struct _TOKEN_GROUPS
type TOKEN_PRIVILEGES (line 190) | typedef struct _TOKEN_PRIVILEGES
type TOKEN_USER (line 196) | typedef struct _TOKEN_USER
type TOKEN_INFORMATION_CLASS (line 201) | typedef enum _TOKEN_INFORMATION_CLASS
type TOKEN_OWNER (line 232) | typedef struct _TOKEN_OWNER
type TOKEN_PRIMARY_GROUP (line 237) | typedef struct _TOKEN_PRIMARY_GROUP
type TOKEN_DEFAULT_DACL (line 242) | typedef struct _TOKEN_DEFAULT_DACL
FILE: ndk/inbvtypes.h
type INBV_DISPLAY_STATE (line 31) | typedef enum _INBV_DISPLAY_STATE
FILE: ndk/iotypes.h
type IO_COMPLETION_INFORMATION_CLASS (line 207) | typedef enum _IO_COMPLETION_INFORMATION_CLASS
type INTERFACE_TYPE (line 217) | typedef enum _INTERFACE_TYPE
type BUS_DATA_TYPE (line 239) | typedef enum _BUS_DATA_TYPE
type FILE_INFORMATION_CLASS (line 260) | typedef enum _FILE_INFORMATION_CLASS
type FS_INFORMATION_CLASS (line 318) | typedef enum _FSINFOCLASS
type PNP_DEVNODE_STATE (line 337) | typedef enum _PNP_DEVNODE_STATE
type IO_STATUS_BLOCK (line 368) | typedef struct _IO_STATUS_BLOCK
type FILE_BASIC_INFORMATION (line 381) | typedef struct _FILE_BASIC_INFORMATION
type FILE_STANDARD_INFORMATION (line 390) | typedef struct _FILE_STANDARD_INFORMATION
type FILE_STREAM_INFORMATION (line 399) | typedef struct _FILE_STREAM_INFORMATION
type FILE_NETWORK_OPEN_INFORMATION (line 408) | typedef struct _FILE_NETWORK_OPEN_INFORMATION
type FILE_EA_INFORMATION (line 419) | typedef struct _FILE_EA_INFORMATION
type FILE_COMPRESSION_INFORMATION (line 424) | typedef struct _FILE_COMPRESSION_INFORMATION
type FILE_POSITION_INFORMATION (line 434) | typedef struct _FILE_POSITION_INFORMATION
type FILE_DISPOSITION_INFORMATION (line 439) | typedef struct _FILE_DISPOSITION_INFORMATION
type FILE_FULL_EA_INFORMATION (line 444) | typedef struct _FILE_FULL_EA_INFORMATION
type FILE_QUOTA_INFORMATION (line 453) | typedef struct _FILE_QUOTA_INFORMATION
type FILE_INTERNAL_INFORMATION (line 464) | typedef struct _FILE_INTERNAL_INFORMATION
type FILE_RENAME_INFORMATION (line 469) | typedef struct _FILE_RENAME_INFORMATION
type FILE_PIPE_INFORMATION (line 477) | typedef struct _FILE_PIPE_INFORMATION
type FILE_PIPE_LOCAL_INFORMATION (line 483) | typedef struct _FILE_PIPE_LOCAL_INFORMATION
type FILE_PIPE_REMOTE_INFORMATION (line 497) | typedef struct _FILE_PIPE_REMOTE_INFORMATION
type FILE_MAILSLOT_QUERY_INFORMATION (line 503) | typedef struct _FILE_MAILSLOT_QUERY_INFORMATION
type FILE_MAILSLOT_SET_INFORMATION (line 512) | typedef struct _FILE_MAILSLOT_SET_INFORMATION
type FILE_BOTH_DIR_INFORMATION (line 517) | typedef struct _FILE_BOTH_DIR_INFORMATION
type FILE_COMPLETION_INFORMATION (line 535) | typedef struct _FILE_COMPLETION_INFORMATION
type FILE_LINK_INFORMATION (line 541) | typedef struct _FILE_LINK_INFORMATION
type FILE_NAME_INFORMATION (line 549) | typedef struct _FILE_NAME_INFORMATION
type FILE_ALLOCATION_INFORMATION (line 555) | typedef struct _FILE_ALLOCATION_INFORMATION
type FILE_END_OF_FILE_INFORMATION (line 560) | typedef struct _FILE_END_OF_FILE_INFORMATION
type FILE_VALID_DATA_LENGTH_INFORMATION (line 565) | typedef struct _FILE_VALID_DATA_LENGTH_INFORMATION
type FILE_DIRECTORY_INFORMATION (line 570) | typedef struct _FILE_DIRECTORY_INFORMATION
type FILE_IO_COMPLETION_INFORMATION (line 585) | typedef struct _FILE_IO_COMPLETION_INFORMATION
type FILE_FS_DEVICE_INFORMATION (line 595) | typedef struct _FILE_FS_DEVICE_INFORMATION
type FILE_FS_ATTRIBUTE_INFORMATION (line 601) | typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
type FILE_FS_SIZE_INFORMATION (line 609) | typedef struct _FILE_FS_SIZE_INFORMATION
type FILE_FS_FULL_SIZE_INFORMATION (line 617) | typedef struct _FILE_FS_FULL_SIZE_INFORMATION
type FILE_FS_LABEL_INFORMATION (line 626) | typedef struct _FILE_FS_LABEL_INFORMATION
type FILE_FS_VOLUME_INFORMATION (line 632) | typedef struct _FILE_FS_VOLUME_INFORMATION
type FILE_PIPE_WAIT_FOR_BUFFER (line 644) | typedef struct _FILE_PIPE_WAIT_FOR_BUFFER
type FILE_PIPE_PEEK_BUFFER (line 652) | typedef struct _FILE_PIPE_PEEK_BUFFER
type IO_ERROR_LOG_PACKET (line 664) | typedef struct _IO_ERROR_LOG_PACKET
type IO_ERROR_LOG_MESSAGE (line 681) | typedef struct _IO_ERROR_LOG_MESSAGE
type IO_COMPLETION_BASIC_INFORMATION (line 696) | typedef struct _IO_COMPLETION_BASIC_INFORMATION
type MAILSLOT_CREATE_PARAMETERS (line 704) | typedef struct _MAILSLOT_CREATE_PARAMETERS
type NAMED_PIPE_CREATE_PARAMETERS (line 712) | typedef struct _NAMED_PIPE_CREATE_PARAMETERS
type IO_TIMER (line 729) | typedef struct _IO_TIMER
type IO_CLIENT_EXTENSION (line 742) | typedef struct _IO_CLIENT_EXTENSION
type DEVICE_NODE (line 751) | typedef struct _DEVICE_NODE
type PI_RESOURCE_ARBITER_ENTRY (line 817) | typedef struct _PI_RESOURCE_ARBITER_ENTRY
type EXTENDED_DEVOBJ_EXTENSION (line 834) | typedef struct _EXTENDED_DEVOBJ_EXTENSION
type EXTENDED_DRIVER_EXTENSION (line 853) | typedef struct _EXTENDED_DRIVER_EXTENSION
type EXTENDED_IO_STACK_LOCATION (line 869) | typedef struct _EXTENDED_IO_STACK_LOCATION
type FILE_PATH (line 1116) | typedef struct _FILE_PATH
type BOOT_OPTIONS (line 1127) | typedef struct _BOOT_OPTIONS
type BOOT_ENTRY (line 1140) | typedef struct _BOOT_ENTRY
type EFI_DRIVER_ENTRY (line 1155) | typedef struct _EFI_DRIVER_ENTRY
FILE: ndk/kdtypes.h
type SYSDBG_COMMAND (line 60) | typedef enum _SYSDBG_COMMAND
type SYSDBG_PHYSICAL (line 104) | typedef struct _SYSDBG_PHYSICAL
type SYSDBG_VIRTUAL (line 111) | typedef struct _SYSDBG_VIRTUAL
type SYSDBG_CONTROL_SPACE (line 118) | typedef struct _SYSDBG_CONTROL_SPACE
type SYSDBG_IO_SPACE (line 126) | typedef struct _SYSDBG_IO_SPACE
type SYSDBG_BUS_DATA (line 136) | typedef struct _SYSDBG_BUS_DATA
type SYSDBG_MSR (line 146) | typedef struct _SYSDBG_MSR
type SYSDBG_TRIAGE_DUMP (line 152) | typedef struct _SYSDBG_TRIAGE_DUMP
type KD_SYMBOLS_INFO (line 168) | typedef struct _KD_SYMBOLS_INFO
FILE: ndk/ketypes.h
type CCHAR (line 131) | typedef CCHAR KPROCESSOR_MODE;
type EVENT_TYPE (line 151) | typedef enum _EVENT_TYPE
type TIMER_TYPE (line 160) | typedef enum _TIMER_TYPE
type WAIT_TYPE (line 169) | typedef enum _WAIT_TYPE
type MODE (line 178) | typedef enum _MODE
type KWAIT_REASON (line 188) | typedef enum _KWAIT_REASON
type KPROFILE_SOURCE (line 230) | typedef enum _KPROFILE_SOURCE
type NT_PRODUCT_TYPE (line 262) | typedef enum _NT_PRODUCT_TYPE
type ALTERNATIVE_ARCHITECTURE_TYPE (line 269) | typedef enum _ALTERNATIVE_ARCHITECTURE_TYPE
type KTHREAD_STATE (line 281) | typedef enum _KTHREAD_STATE
type KOBJECTS (line 299) | typedef enum _KOBJECTS
type ADJUST_REASON (line 332) | typedef enum _ADJUST_REASON
type KCONTINUE_STATUS (line 342) | typedef enum _KCONTINUE_STATUS
type KPROCESS_STATE (line 353) | typedef enum _KPROCESS_STATE
type VDMSERVICECLASS (line 365) | typedef enum _VDMSERVICECLASS
type KSYSTEM_TIME (line 409) | typedef struct _KSYSTEM_TIME
type KUSER_SHARED_DATA (line 419) | typedef struct _KUSER_SHARED_DATA
type VDMVIRTUALICA (line 495) | typedef struct _VdmVirtualIca
type VDMICAUSERDATA (line 511) | typedef struct _VdmIcaUserData
type VDM_INITIALIZE_DATA (line 526) | typedef struct _VDM_INITIALIZE_DATA
type KAPC_ENVIRONMENT (line 547) | typedef enum _KAPC_ENVIRONMENT
type PROCESSOR_CACHE_TYPE (line 558) | typedef enum _PROCESSOR_CACHE_TYPE
type KDPC_DATA (line 569) | typedef struct _KDPC_DATA
type PP_LOOKASIDE_LIST (line 580) | typedef struct _PP_LOOKASIDE_LIST
type CACHE_DESCRIPTOR (line 589) | typedef struct _CACHE_DESCRIPTOR
type KNODE (line 607) | typedef struct _KNODE
type KPROFILE (line 625) | typedef struct _KPROFILE
type KINTERRUPT (line 644) | typedef struct _KINTERRUPT
type KEVENT_PAIR (line 681) | typedef struct _KEVENT_PAIR
type KEXECUTE_OPTIONS (line 692) | typedef struct _KEXECUTE_OPTIONS
type KTHREAD (line 706) | typedef struct _KTHREAD
type KPROCESS (line 961) | typedef struct _KPROCESS
type KSERVICE_TABLE_DESCRIPTOR (line 1023) | typedef struct _KSERVICE_TABLE_DESCRIPTOR
type _LOADER_PARAMETER_BLOCK (line 1037) | struct _LOADER_PARAMETER_BLOCK
FILE: ndk/ldrtypes.h
type PEB_LDR_DATA (line 85) | typedef struct _PEB_LDR_DATA
type LDR_DATA_TABLE_ENTRY (line 99) | typedef struct _LDR_DATA_TABLE_ENTRY
type LOAD_IMPORTS (line 130) | typedef struct _LOAD_IMPORTS
type LDR_RESOURCE_INFO (line 139) | typedef struct _LDR_RESOURCE_INFO
type LDR_DLL_LOADED_NOTIFICATION_DATA (line 149) | typedef struct _LDR_DLL_LOADED_NOTIFICATION_DATA
type VOID (line 158) | typedef VOID
type LDR_DLL_LOADED_NOTIFICATION_ENTRY (line 164) | typedef struct _LDR_DLL_LOADED_NOTIFICATION_ENTRY
type ALT_RESOURCE_MODULE (line 173) | typedef struct _ALT_RESOURCE_MODULE
FILE: ndk/lpctypes.h
type LPC_TYPE (line 61) | typedef enum _LPC_TYPE
type PORT_INFORMATION_CLASS (line 81) | typedef enum _PORT_INFORMATION_CLASS
type PORT_MESSAGE (line 106) | typedef struct _PORT_MESSAGE
type PORT_VIEW (line 142) | typedef struct _PORT_VIEW
type REMOTE_PORT_VIEW (line 152) | typedef struct _REMOTE_PORT_VIEW
type LPCP_MESSAGE (line 162) | typedef struct _LPCP_MESSAGE
type LPCP_CONNECTION_MESSAGE (line 168) | typedef struct _LPCP_CONNECTION_MESSAGE
type LPCP_NONPAGED_PORT_QUEUE (line 178) | typedef struct _LPCP_NONPAGED_PORT_QUEUE
type LPCP_PORT_QUEUE (line 184) | typedef struct _LPCP_PORT_QUEUE
type LPCP_PORT_OBJECT (line 194) | typedef struct _LPCP_PORT_OBJECT
type LPCP_MESSAGE (line 219) | typedef struct _LPCP_MESSAGE
type LPCP_CONNECTION_MESSAGE (line 236) | typedef struct _LPCP_CONNECTION_MESSAGE
type CLIENT_DIED_MSG (line 249) | typedef struct _CLIENT_DIED_MSG
FILE: ndk/mmfuncs.h
type _EPROCESS (line 63) | struct _EPROCESS
FILE: ndk/mmtypes.h
type SECTION_INHERIT (line 95) | typedef enum _SECTION_INHERIT
type POOL_TYPE (line 104) | typedef enum _POOL_TYPE
type MMLISTS (line 127) | typedef enum _MMLISTS
type PP_NPAGED_LOOKASIDE_NUMBER (line 142) | typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
type MEMORY_INFORMATION_CLASS (line 157) | typedef enum _MEMORY_INFORMATION_CLASS
type SECTION_INFORMATION_CLASS (line 168) | typedef enum _SECTION_INFORMATION_CLASS
type VM_COUNTERS (line 179) | typedef struct _VM_COUNTERS
type VM_COUNTERS_EX (line 194) | typedef struct _VM_COUNTERS_EX
type MEMORY_FRAME_INFORMATION (line 214) | typedef struct _MEMORY_FRAME_INFORMATION
type FILEOFFSET_INFORMATION (line 225) | typedef struct _FILEOFFSET_INFORMATION
type PAGEDIR_INFORMATION (line 232) | typedef struct _PAGEDIR_INFORMATION
type UNIQUE_PROCESS_INFORMATION (line 239) | typedef struct _UNIQUE_PROCESS_INFORMATION
type MMPFN_IDENTITY (line 249) | typedef struct _MMPFN_IDENTITY
type MEMORY_WORKING_SET_LIST (line 276) | typedef struct _MEMORY_WORKING_SET_LIST
type MEMORY_SECTION_NAME (line 285) | typedef struct
type SECTION_BASIC_INFORMATION (line 294) | typedef struct _SECTION_BASIC_INFORMATION
type SECTION_IMAGE_INFORMATION (line 301) | typedef struct _SECTION_IMAGE_INFORMATION
type MMPTE (line 354) | typedef struct _MMPTE
type MMEXTEND_INFO (line 372) | typedef struct _MMEXTEND_INFO
type SEGMENT_FLAGS (line 381) | typedef struct _SEGMENT_FLAGS
type SEGMENT (line 389) | typedef struct _SEGMENT
type EVENT_COUNTER (line 418) | typedef struct _EVENT_COUNTER
type MMSECTION_FLAGS (line 428) | typedef struct _MMSECTION_FLAGS
type MMSUBSECTION_FLAGS (line 464) | typedef struct _MMSUBSECTION_FLAGS
type MMSUBSECTION_FLAGS2 (line 476) | typedef struct _MMSUBSECTION_FLAGS2
type CONTROL_AREA (line 486) | typedef struct _CONTROL_AREA
type LARGE_CONTROL_AREA (line 508) | typedef struct _LARGE_CONTROL_AREA
type SUBSECTION (line 536) | typedef struct _SUBSECTION
type MSUBSECTION (line 552) | typedef struct _MSUBSECTION
type SEGMENT_OBJECT (line 578) | typedef struct _SEGMENT_OBJECT
type SECTION_OBJECT (line 595) | typedef struct _SECTION_OBJECT
type ADDRESS_RANGE (line 607) | typedef struct _ADDRESS_RANGE
type MMADDRESS_NODE (line 619) | typedef struct _MMADDRESS_NODE
type MM_AVL_TABLE (line 635) | typedef struct _MM_AVL_TABLE
type SECTION (line 648) | typedef struct _SECTION
type MMWSLENTRY (line 664) | typedef struct _MMWSLENTRY
type MMWSLE (line 676) | typedef struct _MMWSLE
type MMWSLE_HASH (line 686) | typedef struct _MMWSLE_HASH
type MMWSL (line 692) | typedef struct _MMWSL
type MMSUPPORT_FLAGS (line 715) | typedef struct _MMSUPPORT_FLAGS
type MMSUPPORT (line 734) | typedef struct _MMSUPPORT
type MEMORY_BASIC_INFORMATION (line 782) | typedef struct _MEMORY_BASIC_INFORMATION
type MM_DRIVER_VERIFIER_DATA (line 796) | typedef struct _MM_DRIVER_VERIFIER_DATA
type DRIVER_SPECIFIED_VERIFIER_THUNKS (line 830) | typedef struct _DRIVER_SPECIFIED_VERIFIER_THUNKS
FILE: ndk/ntnls.h
type CPTABLEINFO (line 31) | typedef struct _CPTABLEINFO {
type NLSTABLEINFO (line 46) | typedef struct _NLSTABLEINFO {
FILE: ndk/obtypes.h
type OBJECT_INFORMATION_CLASS (line 75) | typedef enum _OBJECT_INFORMATION_CLASS
type OBJECT_INFORMATION_CLASS (line 89) | typedef enum _OBJECT_INFORMATION_CLASS
type OB_OPEN_REASON (line 141) | typedef enum _OB_OPEN_REASON
type OB_DUMP_CONTROL (line 176) | typedef struct _OB_DUMP_CONTROL
type OBJECT_NAME_INFORMATION (line 265) | typedef struct _OBJECT_NAME_INFORMATION
type OBJECT_HANDLE_ATTRIBUTE_INFORMATION (line 272) | typedef struct _OBJECT_HANDLE_ATTRIBUTE_INFORMATION
type OBJECT_DIRECTORY_INFORMATION (line 278) | typedef struct _OBJECT_DIRECTORY_INFORMATION
type OBJECT_TYPE_INFORMATION (line 287) | typedef struct _OBJECT_TYPE_INFORMATION
type OBJECT_BASIC_INFORMATION (line 314) | typedef struct _OBJECT_BASIC_INFORMATION
type OBJECT_CREATE_INFORMATION (line 331) | typedef struct _OBJECT_CREATE_INFORMATION
type OBJECT_TYPE_INITIALIZER (line 348) | typedef struct _OBJECT_TYPE_INITIALIZER
type OBJECT_TYPE (line 375) | typedef struct _OBJECT_TYPE
type OBJECT_DIRECTORY_ENTRY (line 394) | typedef struct _OBJECT_DIRECTORY_ENTRY
type OBJECT_DIRECTORY (line 403) | typedef struct _OBJECT_DIRECTORY
type OBJECT_HEADER_NAME_INFO (line 426) | typedef struct _OBJECT_HEADER_NAME_INFO
type OBJECT_HANDLE_COUNT_ENTRY (line 435) | typedef struct _OBJECT_HANDLE_COUNT_ENTRY
type OBJECT_HANDLE_COUNT_DATABASE (line 441) | typedef struct _OBJECT_HANDLE_COUNT_DATABASE
type OBJECT_HEADER_HANDLE_INFO (line 447) | typedef struct _OBJECT_HEADER_HANDLE_INFO
type OBJECT_HEADER_CREATOR_INFO (line 456) | typedef struct _OBJECT_HEADER_CREATOR_INFO
type OBJECT_HEADER_QUOTA_INFO (line 464) | typedef struct _OBJECT_HEADER_QUOTA_INFO
type OBJECT_HEADER (line 475) | typedef struct _OBJECT_HEADER
type OBP_LOOKUP_CONTEXT (line 500) | typedef struct _OBP_LOOKUP_CONTEXT
type DEVICE_MAP (line 513) | typedef struct _DEVICE_MAP
type OBJECT_SYMBOLIC_LINK (line 525) | typedef struct _OBJECT_SYMBOLIC_LINK
FILE: ndk/potypes.h
type SYSTEM_DOCK_STATE (line 33) | typedef enum _SYSTEM_DOCK_STATE
type PROCESSOR_POWER_STATE (line 45) | typedef struct _PROCESSOR_POWER_STATE
type PO_DEVICE_NOTIFY (line 96) | typedef struct _PO_DEVICE_NOTIFY
FILE: ndk/powerpc/ketypes.h
type DOUBLE (line 45) | typedef double DOUBLE;
type FX_SAVE_AREA (line 47) | typedef struct _FX_SAVE_AREA {
type FXSAVE_FORMAT (line 51) | typedef struct _FXSAVE_FORMAT
type LDT_ENTRY (line 56) | typedef struct _LDT_ENTRY {
type KTRAP_FRAME (line 93) | typedef struct _KTRAP_FRAME
type KGDTENTRY (line 149) | typedef struct _KGDTENTRY
type KIDTENTRY (line 181) | typedef struct _KIDTENTRY
type KDESCRIPTOR (line 189) | typedef struct _DESCRIPTOR
type KSPECIAL_REGISTERS (line 199) | typedef struct _KSPECIAL_REGISTERS
type KPROCESSOR_STATE (line 251) | typedef struct _KPROCESSOR_STATE
type KPRCB (line 260) | typedef struct _KPRCB
type KIPCR (line 506) | typedef struct _KIPCR
type KTSS (line 598) | typedef struct _KTSS {
type KEXCEPTION_FRAME (line 604) | typedef struct _KEXCEPTION_FRAME
function _KPRCB (line 647) | _KPRCB *
FILE: ndk/powerpc/mmtypes.h
type MMPTE_HARDWARE (line 32) | typedef unsigned long long MMPTE_HARDWARE;
type MMPTE_SOFTWARE (line 33) | typedef unsigned long long MMPTE_SOFTWARE;
type MMPTE_PROTOTYPE (line 34) | typedef unsigned long long MMPTE_PROTOTYPE;
type MMPTE_SUBSECTION (line 35) | typedef unsigned long long MMPTE_SUBSECTION;
type MMPTE_TRANSITION (line 36) | typedef unsigned long long MMPTE_TRANSITION;
type MMPTE_LIST (line 37) | typedef unsigned long long MMPTE_LIST;
type HARDWARE_PTE_PPC (line 42) | typedef struct _HARDWARE_PTE_PPC
FILE: ndk/psfuncs.h
type ULONG (line 210) | typedef ULONG APPHELPCACHESERVICECLASS;
function FORCEINLINE (line 296) | FORCEINLINE
type _TEB (line 316) | struct _TEB
FILE: ndk/pstypes.h
type PROCESSINFOCLASS (line 253) | typedef enum _PROCESSINFOCLASS
type THREADINFOCLASS (line 299) | typedef enum _THREADINFOCLASS
type PSPROCESSPRIORITYMODE (line 334) | typedef enum _PSPROCESSPRIORITYMODE
type JOBOBJECTINFOCLASS (line 341) | typedef enum _JOBOBJECTINFOCLASS
type PSPOWEREVENTTYPE (line 359) | typedef enum _PSPOWEREVENTTYPE
type POWERSTATETASK (line 379) | typedef enum _POWERSTATETASK
type PSW32JOBCALLOUTTYPE (line 402) | typedef enum _PSW32JOBCALLOUTTYPE
type PSW32THREADCALLOUTTYPE (line 412) | typedef enum _PSW32THREADCALLOUTTYPE
type _W32THREAD (line 422) | struct _W32THREAD
type _W32PROCESS (line 423) | struct _W32PROCESS
type _WIN32_POWEREVENT_PARAMETERS (line 425) | struct _WIN32_POWEREVENT_PARAMETERS
type _WIN32_POWERSTATE_PARAMETERS (line 426) | struct _WIN32_POWERSTATE_PARAMETERS
type _WIN32_JOBCALLOUT_PARAMETERS (line 427) | struct _WIN32_JOBCALLOUT_PARAMETERS
type _WIN32_OPENMETHOD_PARAMETERS (line 428) | struct _WIN32_OPENMETHOD_PARAMETERS
type _WIN32_OKAYTOCLOSEMETHOD_PARAMETERS (line 429) | struct _WIN32_OKAYTOCLOSEMETHOD_PARAMETERS
type _WIN32_CLOSEMETHOD_PARAMETERS (line 430) | struct _WIN32_CLOSEMETHOD_PARAMETERS
type _WIN32_DELETEMETHOD_PARAMETERS (line 431) | struct _WIN32_DELETEMETHOD_PARAMETERS
type _WIN32_PARSEMETHOD_PARAMETERS (line 432) | struct _WIN32_PARSEMETHOD_PARAMETERS
type DESCRIPTOR_TABLE_ENTRY (line 539) | typedef struct _DESCRIPTOR_TABLE_ENTRY
type PEB_FREE_BLOCK (line 556) | typedef struct _PEB_FREE_BLOCK
type PEB (line 565) | typedef struct _PEB
type GDI_TEB_BATCH (line 700) | typedef struct _GDI_TEB_BATCH
type INITIAL_TEB (line 710) | typedef struct _INITIAL_TEB
type TEB_ACTIVE_FRAME_CONTEXT (line 722) | typedef struct _TEB_ACTIVE_FRAME_CONTEXT
type TEB_ACTIVE_FRAME (line 728) | typedef struct _TEB_ACTIVE_FRAME
type TEB (line 738) | typedef struct _TEB
type PROCESS_BASIC_INFORMATION (line 881) | typedef struct _PROCESS_BASIC_INFORMATION
type PROCESS_ACCESS_TOKEN (line 891) | typedef struct _PROCESS_ACCESS_TOKEN
type PROCESS_DEVICEMAP_INFORMATION (line 897) | typedef struct _PROCESS_DEVICEMAP_INFORMATION
type KERNEL_USER_TIMES (line 913) | typedef struct _KERNEL_USER_TIMES
type PROCESS_SESSION_INFORMATION (line 921) | typedef struct _PROCESS_SESSION_INFORMATION
type PROCESS_PRIORITY_CLASS (line 928) | typedef struct _PROCESS_PRIORITY_CLASS
type THREAD_BASIC_INFORMATION (line 937) | typedef struct _THREAD_BASIC_INFORMATION
type JOB_SET_ARRAY (line 952) | typedef struct _JOB_SET_ARRAY
type EPROCESS_QUOTA_ENTRY (line 962) | typedef struct _EPROCESS_QUOTA_ENTRY
type EPROCESS_QUOTA_BLOCK (line 970) | typedef struct _EPROCESS_QUOTA_BLOCK
type PAGEFAULT_HISTORY (line 981) | typedef struct _PAGEFAULT_HISTORY
type PS_IMPERSONATION_INFORMATION (line 993) | typedef struct _PS_IMPERSONATION_INFORMATION
type TERMINATION_PORT (line 1004) | typedef struct _TERMINATION_PORT
type PSP_RATE_APC (line 1013) | typedef struct _PSP_RATE_APC
type ETHREAD (line 1027) | typedef struct _ETHREAD
type EPROCESS (line 1187) | typedef struct _EPROCESS
type PS_JOB_TOKEN_FILTER (line 1384) | typedef struct _PS_JOB_TOKEN_FILTER
type EJOB (line 1400) | typedef struct _EJOB
type WIN32_POWEREVENT_PARAMETERS (line 1459) | typedef struct _WIN32_POWEREVENT_PARAMETERS
type WIN32_POWERSTATE_PARAMETERS (line 1465) | typedef struct _WIN32_POWERSTATE_PARAMETERS
type WIN32_JOBCALLOUT_PARAMETERS (line 1474) | typedef struct _WIN32_JOBCALLOUT_PARAMETERS
type WIN32_OPENMETHOD_PARAMETERS (line 1481) | typedef struct _WIN32_OPENMETHOD_PARAMETERS
type WIN32_OKAYTOCLOSEMETHOD_PARAMETERS (line 1490) | typedef struct _WIN32_OKAYTOCLOSEMETHOD_PARAMETERS
type WIN32_CLOSEMETHOD_PARAMETERS (line 1498) | typedef struct _WIN32_CLOSEMETHOD_PARAMETERS
type WIN32_DELETEMETHOD_PARAMETERS (line 1507) | typedef struct _WIN32_DELETEMETHOD_PARAMETERS
type WIN32_PARSEMETHOD_PARAMETERS (line 1512) | typedef struct _WIN32_PARSEMETHOD_PARAMETERS
type WIN32_CALLOUTS_FPNS (line 1526) | typedef struct _WIN32_CALLOUTS_FPNS
FILE: ndk/rtlfuncs.h
function FORCEINLINE (line 41) | FORCEINLINE
function FORCEINLINE (line 50) | FORCEINLINE
function FORCEINLINE (line 65) | FORCEINLINE
function BOOLEAN (line 80) | BOOLEAN
function FORCEINLINE (line 89) | FORCEINLINE
function FORCEINLINE (line 104) | FORCEINLINE
function FORCEINLINE (line 115) | FORCEINLINE
function FORCEINLINE (line 130) | FORCEINLINE
function FORCEINLINE (line 145) | FORCEINLINE
function FORCEINLINE (line 163) | FORCEINLINE
function NTAPI_INLINE (line 181) | NTAPI_INLINE
function LARGE_INTEGER (line 2888) | static __inline
function LARGE_INTEGER (line 2901) | static __inline
function ULONG (line 2915) | static __inline
function LARGE_INTEGER (line 2934) | static __inline
FILE: ndk/rtltypes.h
type TABLE_SEARCH_RESULT (line 336) | typedef enum _TABLE_SEARCH_RESULT
type RTL_GENERIC_COMPARE_RESULTS (line 344) | typedef enum _RTL_GENERIC_COMPARE_RESULTS
type ACL_INFORMATION_CLASS (line 356) | typedef enum _ACL_INFORMATION_CLASS
type RTL_PATH_TYPE (line 367) | typedef enum _RTL_PATH_TYPE
type NTSTATUS (line 448) | typedef NTSTATUS
type _RTL_AVL_TABLE (line 471) | struct _RTL_AVL_TABLE
type _RTL_GENERIC_TABLE (line 472) | struct _RTL_GENERIC_TABLE
type _RTL_RANGE (line 473) | struct _RTL_RANGE
type COMPRESSED_DATA_INFO (line 474) | typedef struct _COMPRESSED_DATA_INFO COMPRESSED_DATA_INFO, *PCOMPRESSED_...
type _RTL_RANGE (line 557) | struct _RTL_RANGE
type OSVERSIONINFOW (line 573) | typedef OSVERSIONINFOW RTL_OSVERSIONINFOW;
type LPOSVERSIONINFOW (line 574) | typedef LPOSVERSIONINFOW PRTL_OSVERSIONINFOW;
type OSVERSIONINFOEXW (line 575) | typedef OSVERSIONINFOEXW RTL_OSVERSIONINFOEXW;
type LPOSVERSIONINFOEXW (line 576) | typedef LPOSVERSIONINFOEXW PRTL_OSVERSIONINFOEXW;
type ACL_REVISION_INFORMATION (line 581) | typedef ACL_REVISION_INFORMATION *PACL_REVISION_INFORMATION;
type ACL_SIZE_INFORMATION (line 582) | typedef ACL_SIZE_INFORMATION *PACL_SIZE_INFORMATION;
type RTL_HEAP_PARAMETERS (line 588) | typedef struct _RTL_HEAP_PARAMETERS
type RTL_BITMAP (line 606) | typedef struct _RTL_BITMAP
type RTL_BITMAP_RUN (line 612) | typedef struct _RTL_BITMAP_RUN
type GENERATE_NAME_CONTEXT (line 621) | typedef struct _GENERATE_NAME_CONTEXT
type RTL_SPLAY_LINKS (line 635) | typedef struct _RTL_SPLAY_LINKS
type RTL_BALANCED_LINKS (line 642) | typedef struct _RTL_BALANCED_LINKS
type RTL_GENERIC_TABLE (line 654) | typedef struct _RTL_GENERIC_TABLE
type RTL_AVL_TABLE (line 667) | typedef struct _RTL_AVL_TABLE
type RTL_QUERY_REGISTRY_TABLE (line 685) | typedef struct _RTL_QUERY_REGISTRY_TABLE
type UNICODE_PREFIX_TABLE_ENTRY (line 699) | typedef struct _UNICODE_PREFIX_TABLE_ENTRY
type UNICODE_PREFIX_TABLE (line 709) | typedef struct _UNICODE_PREFIX_TABLE
type TIME_FIELDS (line 720) | typedef struct _TIME_FIELDS
type PVOID (line 735) | typedef PVOID PACTIVATION_CONTEXT;
type RTL_ACTIVATION_CONTEXT_STACK_FRAME (line 740) | typedef struct _RTL_ACTIVATION_CONTEXT_STACK_FRAME
type RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED (line 748) | typedef struct _RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTE...
type ACE (line 765) | typedef struct _ACE
type RTL_PROCESS_MODULE_INFORMATION (line 774) | typedef struct _RTL_PROCESS_MODULE_INFORMATION
type RTL_PROCESS_MODULES (line 788) | typedef struct _RTL_PROCESS_MODULES
type RTL_PROCESS_MODULE_INFORMATION_EX (line 794) | typedef struct _RTL_PROCESS_MODULE_INFORMATION_EX
type RTL_HEAP_TAG_INFO (line 803) | typedef struct _RTL_HEAP_TAG_INFO
type RTL_HEAP_USAGE_ENTRY (line 810) | typedef struct _RTL_HEAP_USAGE_ENTRY
type RTL_HEAP_USAGE (line 815) | typedef struct _RTL_HEAP_USAGE
type RTL_HEAP_INFORMATION (line 828) | typedef struct _RTL_HEAP_INFORMATION
type RTL_PROCESS_HEAPS (line 845) | typedef struct _RTL_PROCESS_HEAPS
type RTL_PROCESS_LOCK_INFORMATION (line 851) | typedef struct _RTL_PROCESS_LOCK_INFORMATION
type RTL_PROCESS_LOCKS (line 865) | typedef struct _RTL_PROCESS_LOCKS
type RTL_PROCESS_BACKTRACE_INFORMATION (line 871) | typedef struct _RTL_PROCESS_BACKTRACE_INFORMATION
type RTL_PROCESS_BACKTRACES (line 880) | typedef struct _RTL_PROCESS_BACKTRACES
type RTL_PROCESS_VERIFIER_OPTIONS (line 889) | typedef struct _RTL_PROCESS_VERIFIER_OPTIONS
type RTL_DEBUG_INFORMATION (line 899) | typedef struct _RTL_DEBUG_INFORMATION
type RTL_UNLOAD_EVENT_TRACE (line 933) | typedef struct _RTL_UNLOAD_EVENT_TRACE
type RTL_HANDLE_TABLE_ENTRY (line 946) | typedef struct _RTL_HANDLE_TABLE_ENTRY
type RTL_HANDLE_TABLE (line 952) | typedef struct _RTL_HANDLE_TABLE
type EXCEPTION_REGISTRATION_RECORD (line 966) | typedef struct _EXCEPTION_REGISTRATION_RECORD
type CURDIR (line 975) | typedef struct _CURDIR
type RTL_DRIVE_LETTER_CURDIR (line 981) | typedef struct RTL_DRIVE_LETTER_CURDIR
type RTL_ACQUIRE_STATE (line 992) | typedef struct _RTL_ACQUIRE_STATE
type RTL_CRITICAL_SECTION_DEBUG (line 1007) | typedef struct _RTL_CRITICAL_SECTION_DEBUG
type RTL_CRITICAL_SECTION (line 1018) | typedef struct _RTL_CRITICAL_SECTION
type RTL_RANGE_LIST (line 1033) | typedef struct _RTL_RANGE_LIST
type RTL_RANGE (line 1041) | typedef struct _RTL_RANGE
type RTL_RANGE_LIST_ITERATOR (line 1051) | typedef struct _RANGE_LIST_ITERATOR
type RTL_RESOURCE (line 1062) | typedef struct _RTL_RESOURCE
type RTL_MESSAGE_RESOURCE_ENTRY (line 1078) | typedef struct _RTL_MESSAGE_RESOURCE_ENTRY
type RTL_MESSAGE_RESOURCE_BLOCK (line 1085) | typedef struct _RTL_MESSAGE_RESOURCE_BLOCK
type RTL_MESSAGE_RESOURCE_DATA (line 1092) | typedef struct _RTL_MESSAGE_RESOURCE_DATA
type RTL_USER_PROCESS_PARAMETERS (line 1101) | typedef struct _RTL_USER_PROCESS_PARAMETERS
type RTL_USER_PROCESS_INFORMATION (line 1133) | typedef struct _RTL_USER_PROCESS_INFORMATION
type RTL_ATOM_TABLE_ENTRY (line 1145) | typedef struct _RTL_ATOM_TABLE_ENTRY
type RTL_ATOM_TABLE (line 1156) | typedef struct _RTL_ATOM_TABLE
type SYSTEMTIME (line 1183) | typedef struct _SYSTEMTIME
type TIME_ZONE_INFORMATION (line 1195) | typedef struct _TIME_ZONE_INFORMATION
type LPTIME_ZONE_INFORMATION (line 1210) | typedef LPTIME_ZONE_INFORMATION PRTL_TIME_ZONE_INFORMATION;
type RTL_PATCH_HEADER (line 1215) | typedef struct _RTL_PATCH_HEADER
type NLS_FILE_HEADER (line 1233) | typedef struct _NLS_FILE_HEADER
type RTL_STACK_TRACE_ENTRY (line 1249) | typedef struct _RTL_STACK_TRACE_ENTRY
type STACK_TRACE_DATABASE (line 1258) | typedef struct _STACK_TRACE_DATABASE
type MESSAGE_RESOURCE_ENTRY (line 1268) | typedef struct _MESSAGE_RESOURCE_ENTRY
type MESSAGE_RESOURCE_BLOCK (line 1275) | typedef struct _MESSAGE_RESOURCE_BLOCK
type MESSAGE_RESOURCE_DATA (line 1282) | typedef struct _MESSAGE_RESOURCE_DATA
FILE: ndk/setypes.h
type SEP_AUDIT_POLICY_CATEGORIES (line 92) | typedef struct _SEP_AUDIT_POLICY_CATEGORIES
type SEP_AUDIT_POLICY_OVERLAY (line 105) | typedef struct _SEP_AUDIT_POLICY_OVERLAY
type SEP_AUDIT_POLICY (line 111) | typedef struct _SEP_AUDIT_POLICY
type SE_AUDIT_PROCESS_CREATION_INFO (line 121) | typedef struct _SE_AUDIT_PROCESS_CREATION_INFO
type TOKEN (line 129) | typedef struct _TOKEN
type AUX_DATA (line 163) | typedef struct _AUX_DATA
FILE: ndk/umfuncs.h
type _CSR_API_MESSAGE (line 31) | struct _CSR_API_MESSAGE
type _CSR_CAPTURE_BUFFER (line 32) | struct _CSR_CAPTURE_BUFFER
type _CSR_CAPTURE_BUFFER (line 47) | struct _CSR_CAPTURE_BUFFER
type _CSR_CAPTURE_BUFFER (line 55) | struct _CSR_CAPTURE_BUFFER
type _CSR_API_MESSAGE (line 74) | struct _CSR_API_MESSAGE
type _CSR_CAPTURE_BUFFER (line 75) | struct _CSR_CAPTURE_BUFFER
type _CSR_CAPTURE_BUFFER (line 89) | struct _CSR_CAPTURE_BUFFER
FILE: ndk/umtypes.h
type CONST (line 116) | typedef CONST int CINT;
type CONST (line 117) | typedef CONST char *PCSZ;
type ULONG (line 118) | typedef ULONG CLONG;
type CSHORT (line 119) | typedef short CSHORT;
type CSHORT (line 120) | typedef CSHORT *PCSHORT;
type LARGE_INTEGER (line 121) | typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
type LONG (line 122) | typedef LONG KPRIORITY;
type LONG (line 123) | typedef LONG NTSTATUS, *PNTSTATUS;
type UNICODE_STRING (line 130) | typedef struct _UNICODE_STRING
type STRING (line 137) | typedef struct _STRING
type CSTRING (line 144) | typedef struct _CSTRING
type OBJECT_ATTRIBUTES (line 153) | typedef struct _OBJECT_ATTRIBUTES
type CLIENT_ID (line 166) | typedef struct _CLIENT_ID
type UNICODE_STRING (line 172) | typedef const UNICODE_STRING* PCUNICODE_STRING;
type STRING (line 173) | typedef STRING ANSI_STRING;
type PSTRING (line 174) | typedef PSTRING PANSI_STRING;
type STRING (line 175) | typedef STRING OEM_STRING;
type PSTRING (line 176) | typedef PSTRING POEM_STRING;
type CONST (line 177) | typedef CONST STRING* PCOEM_STRING;
type STRING (line 178) | typedef STRING CANSI_STRING;
type PSTRING (line 179) | typedef PSTRING PCANSI_STRING;
FILE: ntfile.c
function BOOLEAN (line 12) | BOOLEAN NtFileOpenDirectory(HANDLE *phRetFile, WCHAR *pwszFileName, BOOL...
function BOOLEAN (line 64) | BOOLEAN NtFileOpenFile(HANDLE *phRetFile, WCHAR *pwszFileName, BOOLEAN b...
function BOOLEAN (line 115) | BOOLEAN NtFileWriteFile(HANDLE hFile, LPVOID lpData, DWORD dwBufferSize,...
function BOOLEAN (line 136) | BOOLEAN NtFileCopyFile(WCHAR *pszSrc, WCHAR *pszDst)
function BOOLEAN (line 208) | BOOLEAN NtFileReadFile(HANDLE hFile, LPVOID pOutBuffer, DWORD dwOutBuffe...
function BOOLEAN (line 228) | BOOLEAN NtFileGetFilePosition(HANDLE hFile, LONGLONG *pRetCurrentPosition)
function BOOLEAN (line 251) | BOOLEAN NtFileGetFileSize(HANDLE hFile, LONGLONG *pRetFileSize)
function BOOLEAN (line 273) | BOOLEAN NtFileSeekFile(HANDLE hFile, LONGLONG lAmount)
function BOOLEAN (line 292) | BOOLEAN NtFileCloseFile(HANDLE hFile)
function BOOLEAN (line 307) | BOOLEAN NtFileDeleteFile(PCWSTR filename)
function BOOLEAN (line 331) | BOOLEAN NtFileCreateDirectory(PCWSTR dirname)
function BOOLEAN (line 378) | BOOLEAN NtFileMoveFile(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFi...
FILE: ntreg.c
function WCHAR (line 12) | WCHAR *NtRegGetRootPath(H_KEY hkRoot)
function BOOLEAN (line 34) | BOOLEAN
function BOOLEAN (line 75) | BOOLEAN
function BOOLEAN (line 96) | BOOLEAN
function BOOLEAN (line 106) | BOOLEAN
function BOOLEAN (line 123) | BOOLEAN
function BOOLEAN (line 166) | BOOLEAN
function NtEnumKey (line 181) | void NtEnumKey(HANDLE hKey)
FILE: ntreg.h
type ULONG (line 17) | typedef ULONG H_KEY;
FILE: precomp.h
type CON_DEVICE_TYPE (line 24) | typedef enum _CON_DEVICE_TYPE
type KBD_RECORD (line 109) | typedef struct _KBD_RECORD
FILE: process.c
function NTSTATUS (line 21) | NTSTATUS CreateNativeProcess(IN PCWSTR file_name, IN PCWSTR cmd_line, OU...
FILE: shell.c
function BOOL (line 23) | BOOL GetFullPath(IN PCSTR filename, OUT PWSTR out, IN BOOL add_slash)
function CHAR (line 72) | CHAR **StringToArguments(CHAR *string, UINT *argc)
function ULONG (line 136) | ULONG GetFileAttributesNt(PCWSTR filename)
function BOOL (line 156) | BOOL FolderExists(PCWSTR foldername)
function BOOL (line 184) | BOOL FileExists(PCWSTR filename)
function BOOLEAN (line 200) | BOOLEAN DisplayString(WCHAR *pwszData)
function BOOLEAN (line 215) | BOOLEAN SetUnicodeString(UNICODE_STRING *pustrRet, WCHAR *pwszData)
function HANDLE (line 229) | HANDLE InitHeapMemory(void)
function BOOLEAN (line 242) | BOOLEAN DeinitHeapMemory(HANDLE hHeap)
function PVOID (line 253) | PVOID kmalloc(HANDLE hHeap, int nSize)
function BOOLEAN (line 261) | BOOLEAN kfree(HANDLE hHeap, PVOID pMemory)
function BOOLEAN (line 268) | BOOLEAN AppendString(WCHAR *pszInput, WCHAR *pszAppend)
function UINT (line 298) | UINT GetStringLength(WCHAR *pszInput)
FILE: sysinfo.c
function NTSTATUS (line 11) | NTSTATUS
function NTSTATUS (line 21) | NTSTATUS
function NTSTATUS (line 31) | NTSTATUS
function NTSTATUS (line 41) | NTSTATUS
function NTSTATUS (line 105) | NTSTATUS
function NTSTATUS (line 166) | NTSTATUS
Condensed preview — 70 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (653K chars).
[
{
"path": ".github/workflows/build.yml",
"chars": 2358,
"preview": "name: Build with WDK 7.1.0\n\non: \n workflow_dispatch:\n workflow_call:\n\njobs:\n build:\n name: Build\n runs-on: wind"
},
{
"path": ".github/workflows/release.yml",
"chars": 2015,
"preview": "name: Release\n\non:\n push:\n tags:\n - 'v*'\n\njobs:\n build:\n uses: ./.github/workflows/build.yml\n \n relea"
},
{
"path": ".gitignore",
"chars": 64,
"preview": ".vscode\n*.log\nobjfre_wxp_x86\nobjfre_win7_amd64\n*.err\n*.wrn\n*.cmd"
},
{
"path": "CONTRIBUTORS.md",
"chars": 150,
"preview": "- Alex Ionescu (the original creator)\n- amdf\n- ReactOS Team (keyboard translation code parts)\n- Dmitri Arkhangelski (cod"
},
{
"path": "LICENSE",
"chars": 26526,
"preview": " GNU LESSER GENERAL PUBLIC LICENSE\n Version 2.1, February 1999\n\n Copyright (C) 19"
},
{
"path": "README.md",
"chars": 822,
"preview": "# NativeShell\nCommand line interface for Windows Native Mode.\nIt can perform some basic operations with Windows files an"
},
{
"path": "display.c",
"chars": 3079,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "file.c",
"chars": 8758,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "hardware.c",
"chars": 6352,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "input.c",
"chars": 6431,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "install/add.reg",
"chars": 228,
"preview": "REGEDIT4\n\n[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager]\n\"BootExecute\"=hex(7):61,75,74,6f,63,68,6"
},
{
"path": "install/remove.reg",
"chars": 168,
"preview": "REGEDIT4\n\n[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager]\n\"BootExecute\"=hex(7):61,75,74,6f,63,68,6"
},
{
"path": "keytrans.c",
"chars": 3774,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "main.c",
"chars": 11582,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "makefile",
"chars": 260,
"preview": "#\n# DO NOT EDIT THIS FILE!!! Edit .\\sources. if you want to add a new source\n# file to this component. This file merel"
},
{
"path": "ndk/arch/ketypes.h",
"chars": 512,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ketypes.h (ARCH)\n\nAbstract:"
},
{
"path": "ndk/arch/mmtypes.h",
"chars": 539,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n mmtypes.h (ARCH)\n\nAbstract:"
},
{
"path": "ndk/asm.h",
"chars": 24503,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n asm.h\n\nAbstract:\n\n ASM O"
},
{
"path": "ndk/cctypes.h",
"chars": 2893,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n cctypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/cmfuncs.h",
"chars": 9494,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n cmfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/cmtypes.h",
"chars": 12249,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n cmtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/dbgkfuncs.h",
"chars": 2287,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n dbgkfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/dbgktypes.h",
"chars": 4721,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n dbgktypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/exfuncs.h",
"chars": 15957,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n exfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/extypes.h",
"chars": 36499,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n extypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/halfuncs.h",
"chars": 4026,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n halfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/haltypes.h",
"chars": 5131,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n haltypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/i386/ketypes.h",
"chars": 16310,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ketypes.h (X86)\n\nAbstract:\n"
},
{
"path": "ndk/i386/mmtypes.h",
"chars": 3320,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n mmtypes.h (X86)\n\nAbstract:\n"
},
{
"path": "ndk/ifssupp.h",
"chars": 5330,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ifssupp.h\n\nAbstract:\n\n N"
},
{
"path": "ndk/inbvfuncs.h",
"chars": 1437,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n inbvfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/inbvtypes.h",
"chars": 750,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n inbvtypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/iofuncs.h",
"chars": 19800,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n iofuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/iotypes.h",
"chars": 34915,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n iotypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/kdfuncs.h",
"chars": 1547,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n kdfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/kdtypes.h",
"chars": 4036,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n kdtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/kefuncs.h",
"chars": 10016,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n kefuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/ketypes.h",
"chars": 22809,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n lpctypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/ldrfuncs.h",
"chars": 1736,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ldrfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/ldrtypes.h",
"chars": 4688,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ldrtypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/lpcfuncs.h",
"chars": 7010,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n lpcfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/lpctypes.h",
"chars": 5607,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n lpctypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/mmfuncs.h",
"chars": 8626,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n mmfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/mmtypes.h",
"chars": 20142,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n mmtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/ntndk.h",
"chars": 2881,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ntndk.h\n\nAbstract:\n\n Mas"
},
{
"path": "ndk/ntnls.h",
"chars": 1528,
"preview": "/*++\n\nCopyright (c) Microsoft Corporation. All rights reserved.\n\nModule Name:\n\n ntnls.h\n\nAbstract:\n\n NLS file for"
},
{
"path": "ndk/obfuncs.h",
"chars": 9010,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n obtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/obtypes.h",
"chars": 13793,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n obtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/pofuncs.h",
"chars": 1393,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n pofuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/potypes.h",
"chars": 2304,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n potypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/powerpc/ketypes.h",
"chars": 14485,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n ketypes.h (PPC)\n\nAbstract:\n"
},
{
"path": "ndk/powerpc/mmtypes.h",
"chars": 1238,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n mmtypes.h (PPC)\n\nAbstract:\n"
},
{
"path": "ndk/psfuncs.h",
"chars": 11795,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n psfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/pstypes.h",
"chars": 40814,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n pstypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/readme.txt",
"chars": 8244,
"preview": "Native Development Kit README\n NDK 1.00\n-----------------------------\n\n0. PREAMBLE\n\n0.1 COPYRIGHT\n\nThe NDK is Cop"
},
{
"path": "ndk/rtlfuncs.h",
"chars": 49724,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n rtlfuncs.h\n\nAbstract:\n\n "
},
{
"path": "ndk/rtltypes.h",
"chars": 34119,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n rtltypes.h\n\nAbstract:\n\n "
},
{
"path": "ndk/sefuncs.h",
"chars": 10094,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n sefuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/setypes.h",
"chars": 6208,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n setypes.h\n\nAbstract:\n\n T"
},
{
"path": "ndk/umfuncs.h",
"chars": 4244,
"preview": "/*++ NDK Version: 0098\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n umfuncs.h\n\nAbstract:\n\n F"
},
{
"path": "ndk/umtypes.h",
"chars": 3760,
"preview": "/*++ NDK Version: 0095\n\nCopyright (c) Alex Ionescu. All rights reserved.\n\nHeader Name:\n\n umtypes.h\n\nAbstract:\n\n T"
},
{
"path": "ntfile.c",
"chars": 11907,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "ntfile.h",
"chars": 990,
"preview": "\n#ifndef NATIVEFILE_FUNCTIONS_H\n#define NATIVEFILE_FUNCTIONS_H 1\n\n#include <ntndk.h>\n\nBOOLEAN NtFileOpenFile(HANDLE *phR"
},
{
"path": "ntreg.c",
"chars": 5538,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "ntreg.h",
"chars": 1060,
"preview": "\n#ifndef NATIVEREGISTRY_FUNCTIONS_H\n#define NATIVEREGISTRY_FUNCTIONS_H 1\n\n#include <ntndk.h>\n\n#define HKEY_CLASSES_ROOT "
},
{
"path": "precomp.h",
"chars": 3598,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "process.c",
"chars": 3302,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "shell.c",
"chars": 7210,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
},
{
"path": "sources",
"chars": 431,
"preview": "TARGETNAME=native\nTARGETTYPE=PROGRAM\nUMTYPE=nt\n\nMINWIN_SDK_LIB_PATH=$(SDK_LIB_PATH)\nINCLUDES=$(DDK_INC_PATH);./ndk\n\nSOUR"
},
{
"path": "sysinfo.c",
"chars": 12962,
"preview": "/**\n * PROJECT: Native Shell\n * COPYRIGHT: LGPL; See LICENSE in the top level directory\n * FILE: "
}
]
About this extraction
This page contains the full source code of the amdf/NativeShell GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 70 files (607.5 KB), approximately 157.9k tokens, and a symbol index with 663 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.