Native NT Toolkit
#1
Posted 20 January 2008 - 12:59 AM
As a continuation of my "Hello" thread, here's the first drop of my "Native NT Toolkit" -- the NDK, or Native Development Kit.
The NDK has been used by ReactOS for more than two years now, as well as by all the tools which I'm developping. The whole point is to provide a set of "as-official-as-you-can-get" headers which supplement the WDK when developing applications which use the Native API. You can find more information in the "readme.txt" file in the NDK directory, as well as on the ReactOS Wiki.
Basically, the point of the NDK, in short:
1) Allow you to write 100% native applications without needing windows.h. Allow you to write Win32 applications which use Native APIs. Allow you to write kernel-mode drivers which peer into internal structures, or use undocumented kernel APIs.
2) Provide a *single* and *correct* set of headers for *all* community members who need access to Native API. Too many people get it wrong, or get it right but had to spend 2 months duplicating effort that someone may already have been made.
There's still a lot of work to be done in two areas:
1) Versionning. Since ReactOS has a stable goal of Windows Server 2003 SP1, and my apps are mostly for Vista, those are the two versions which have been the most tested (especially the former). The NDK supports versionning, but not all structures have XP versions, much less 2000 versions.
2) 64-bit support. Since ReactOS is only 32-bit, there wasn't a lot of work done for 64-bit support, except for cross-compiling my Vista programs. Therefore, many fields/parameters which are marked "ULONG" may actually be SIZE_T or ULONG_PTR.
I strongly urge and recommend anyone writing native applications to use the NDK instead of their own header files and please let me know any issues you encounter. As far as naming and structure format goes, the ones in the NDK are the official Microsoft-internal names (which were obtained either from symbols or strings inside binaries) --not guesses. So they supercede information found on other websites, if contradictory (of course, if you have a really good argument against a field name, feel free to drop me a note -- everyone makes mistakes).
Information on proper use of the NDK is found in the readme and ReactOS Wiki.
Next up, I plan to release the NDL, a library which handles most of the hard operations that native mode applications need to worry about, such as console input and output, process/thread routines and file i/o. The NDL will grow as required, since it's a fairly new project.
This will be followed by the latest NCLI, a simple command-line shell which will have basic commands similar to DOS. The current "lp", "lm" and "devtree" commands will become separate programs that the NCLI will be able to execute. NCLI itself will be very small, depending on the NDL for most input/output functionality, and only handling actual shell-specific processing. The hope is to isolate as much "common" functionality into the NDL as possibe, without putting too much into it.
As more people migrate towards the NDL/NDK, it should increase the quality of these two projects, as well as any current/future projects that use native APIs/structures (The Native Regedit comes to mind).
All is GPL, with a commercial license option.
Link: http://native-nt-too.../svn/trunk/ndk/ for the SVN, http://code.google.c...ive-nt-toolkit/ for the project homepage (including a direct .zip download)
All comments appreciated!
#2
Posted 20 January 2008 - 01:18 AM
#3
Posted 20 January 2008 - 01:41 AM
#4
Posted 20 January 2008 - 02:03 AM
And Welcome to Boot-Land Alex Ionescu!
#5
Posted 20 January 2008 - 04:26 PM
I only changed the 'sources' includes:
#INCLUDES=\ # $(DDK_INC_PATH); \ # .\Include\ddk\inc; \ # .\Include\sdk\inc INCLUDES=\ $(DDK_INC_PATH); \ .\Include\ndk;
BUILD on XP SP2 host >> error free
Test of the exe: runs as previously.
Great
Peter
#6
Posted 27 January 2008 - 02:27 PM
In mmtypes.h, '_SECTION_IMAGE_INFORMATION'
change
ImageFileSIze
to
ImageFileSize
Peter
#7
Posted 28 January 2008 - 01:12 AM
Mind filling that out as an "issue"/bug report on the NDK site please? I'd like to try out that functionality for keep track of such bugs.
#8
Posted 28 January 2008 - 06:05 PM
maybe you can use the attached function as a debug tool in your project.
It is really not high level ingenious, but needs some time to be created.
It converts the NTSTATUS value into a string.
To activate it, you must #define STATUS
In my pscMenu project, I use it (sample):
NTSTATUS startApp( ..... ..... Status = NtCreateSection(&hSection, SECTION_ALL_ACCESS, &ObjectAttributes, 0, PAGE_EXECUTE, SEC_IMAGE, hFile); printStatus("startApp NtCreateSection", Status);
Peter
ntstatuslog.zip 12.86KB 1512 downloads
#9
Posted 17 February 2008 - 10:40 PM
I'll add it as soon as I get some time, the last couple of weeks have become very busy again!
Hopefully by Mid-March I'll have a new version out including the first release of the NDL library. In the mean time, I will try to publicize the NDK more so that improvements and fixes can continue
I haven't checked these forums in some time, so if anyone was having issues with the NDK, let me know!
Alex,
maybe you can use the attached function as a debug tool in your project.
It is really not high level ingenious, but needs some time to be created.
It converts the NTSTATUS value into a string.
To activate it, you must #define STATUS
In my pscMenu project, I use it (sample):NTSTATUS startApp( ..... ..... Status = NtCreateSection(&hSection, SECTION_ALL_ACCESS, &ObjectAttributes, 0, PAGE_EXECUTE, SEC_IMAGE, hFile); printStatus("startApp NtCreateSection", Status);
Peter
ntstatuslog.zip 12.86KB 1512 downloads
#10
Posted 29 April 2008 - 04:21 AM
Pleased to announce there's a new release of http://undocumented.ntinternals.net/
documenting most NTAPI "undocumented" functions and structures.
#11
Posted 04 October 2012 - 05:18 PM
#12
Posted 01 June 2017 - 03:05 PM
Hi all,
I want to program a native executable. Maybe with native-nt-toolkit : https://code.google....ive-nt-toolkit/
But the project is down ? It is juste possible to download NDK.zip where is NDL.zip ? and SAMPLE ?
Where can i download a full version ? or a similar tool kit ?
Thanks !!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users