Jump to content











Photo
* * * * * 1 votes

Native NT Toolkit


  • Please log in to reply
11 replies to this topic

#1 Alex Ionescu

Alex Ionescu

    Newbie

  • Members
  • 14 posts
  •  
    Canada

Posted 20 January 2008 - 12:59 AM

Hi all,

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 AeroXP

AeroXP

    Frequent Member

  • Advanced user
  • 177 posts
  • Location:0000:7c00
  • Interests:Motorola 68000 Assembler, PCs, Betas, Boot Disks, x86 Assembler
  •  
    United States

Posted 20 January 2008 - 01:18 AM

Finally! :thumbsup:

#3 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4138 posts

Posted 20 January 2008 - 01:41 AM

Im sure when Nuno, comes back from his studies he will be very greatfull for youre contribution.

#4 thunn

thunn

    Silver Member

  • .script developer
  • 531 posts
  • Location:Brooklyn, New York
  • Interests:computers<br />mechanics<br />distortion<br /><br />
  •  
    United States

Posted 20 January 2008 - 02:03 AM

How wonderfull, thanks for providing these tools to the community!

And Welcome to Boot-Land Alex Ionescu!
:thumbsup:

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 20 January 2008 - 04:26 PM

I got the headers and copied them into the bootMenu project.

I only changed the 'sources' includes:
#INCLUDES=\

#		$&#40;DDK_INC_PATH&#41;; \

#		.\Include\ddk\inc; \

#		.\Include\sdk\inc



INCLUDES=\

		$&#40;DDK_INC_PATH&#41;; \

		.\Include\ndk;

BUILD on XP SP2 host >> error free
Test of the exe: runs as previously.

Great :thumbsup:

Peter

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 27 January 2008 - 02:27 PM

Small suggestion:

In mmtypes.h, '_SECTION_IMAGE_INFORMATION'
change
ImageFileSIze
to
ImageFileSize

Peter

#7 Alex Ionescu

Alex Ionescu

    Newbie

  • Members
  • 14 posts
  •  
    Canada

Posted 28 January 2008 - 01:12 AM

Awesome psc, thanks!

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 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12688 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 28 January 2008 - 06:05 PM

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.
ntstatus.gif
To activate it, you must #define STATUS

In my pscMenu project, I use it (sample):
NTSTATUS startApp&#40; .....

 .....

	 Status = NtCreateSection&#40;&hSection, SECTION_ALL_ACCESS, &ObjectAttributes, 0, PAGE_EXECUTE, SEC_IMAGE, hFile&#41;;

	  printStatus&#40;&#34;startApp NtCreateSection&#34;, Status&#41;;

Peter

Attached File  ntstatuslog.zip   12.86KB   1076 downloads

#9 Alex Ionescu

Alex Ionescu

    Newbie

  • Members
  • 14 posts
  •  
    Canada

Posted 17 February 2008 - 10:40 PM

Thanks Peter,

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.
ntstatus.gif
To activate it, you must #define STATUS

In my pscMenu project, I use it (sample):

NTSTATUS startApp&#40; .....

 .....

	 Status = NtCreateSection&#40;&hSection, SECTION_ALL_ACCESS, &ObjectAttributes, 0, PAGE_EXECUTE, SEC_IMAGE, hFile&#41;;

	  printStatus&#40;&#34;startApp NtCreateSection&#34;, Status&#41;;

Peter

Attached File  ntstatuslog.zip   12.86KB   1076 downloads



#10 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10448 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 29 April 2008 - 04:21 AM

Here's something that might interest as well:

Pleased to announce there's a new release of http://undocumented.ntinternals.net/
documenting most NTAPI "undocumented" functions and structures.


:lol:

#11 c0rt3x

c0rt3x

    Newbie

  • Deactivated
  • 25 posts
  •  
    Germany

Posted 04 October 2012 - 05:18 PM

Cool!!

#12 lynch4fr

lynch4fr
  • Members
  • 2 posts
  •  
    France

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