Friday, January 9, 2009

How to create a native application in C

First, read this article. So, you will only need a Windows DDK (Driver Development Kit).
After that, you need to create 2 files in your working directory:
makefile
!INCLUDE $(NTMAKEENV)\makefile.def

and
sources
TARGETNAME=myprog
TARGETPATH=OBJ
TARGETTYPE=PROGRAM
SOURCES=myprog.c



Now create your myprog.c file and don't forget to use only Native API's. When you're done, run the checked/free windows ddk command prompt, go to your working folder and type the following command:

build

If everything was ok, you should have a new folder (like objchk_wxp_x86, objfree_wxp_x86, etc) with an exe in it. Btw, don't forget that you can't run it like a normal windows app!

Enjoy :)

- Expertsec.com

No comments: