Hi Chris
i dont know much about your error, but i know a method which has worked for me:
first you should have a main.c file. which has to have a function like this:
#include <windows.h>
#include <basetyps.h>
#include <windowsx.h>
#include <initguid.h>
#include <dbt.h>
// todo : some headers
int WINAPI
WinMain (
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow
)
{
//todo
}
then you should have two files to build the project:
1. "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
2. "sources"
TARGETNAME=TODO
TARGETTYPE=PROGRAM
USE_MSVCRT=1
UMTYPE=windows
UMENTRY=winmain
UMBASE=0x1000000
_NT_TARGET_VERSION = 0x0501
TARGETLIBS=\
$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\gdi32.lib \
$(SDK_LIB_PATH)\comctl32.lib \
$(SDK_LIB_PATH)\cfgmgr32.lib \
$(SDK_LIB_PATH)\setupapi.lib
#INCLUDES=C:\WinDDK\6000\inc;..\inc;..\..\inc
SOURCES=main.c
Then you can use "make" or "build" commands to build the project
I think it should work
Regards
Erfan Azarkhish