Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Driver compiling error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Wed Jul 16, 2008 9:59 pm    Post subject: Driver compiling error Reply with quote

I'm starting driver programming and to start off I read noz3001's "Hello World!" tutorial. Anyway I made a folder in my C: drive and named it Drivers which holds: DriverMain.cpp, MAKEFILE, SOURCES, and a Release folder. Here are my errors:

Quote:


C:\WinDDK\6001.18001>cd ..

C:\WinDDK>cd ..

C:\>cd Drivers

C:\Drivers>build
path contains nonexistant d:\fpc\2.0.4\bin\i386-win32, removing
BUILD: Compile and Link for x86
BUILD: Computing Include file dependencies:
BUILD: Start time: Wed Jul 16 20:13:47 2008
BUILD: Examining c:\drivers directory for files to compile.
BUILD: Saving c:\winddk\6001.18001\build.dat...
BUILD: Compiling and Linking c:\drivers directory
_NT_TARGET_VERSION SET TO WINXP
errors in directory c:\drivers
c:\winddk\6001.18001\bin\makefile.new(2641) : error U1050: Your sources. file mu
st define the SOURCES macro.
errors in directory c:\drivers
nmake.exe /nologo BUILDMSG=Stop. -i BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDI
R_RELATIVE_TO_BASEDIR= failed - rc = 2

BUILD: Finish time: Wed Jul 16 20:13:50 2008
BUILD: Done

0 files compiled - 2 Warnings - 2 Errors

C:\Drivers>


And here's my code:

DriverMain.cpp:

Code:

#include <ntddk.h>

NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath) {
   DbgPrint("Hello World!");
   pDriverObject->DriverUnload;
   return STATUS_SUCCESS;
}


MAKEFILE:

Code:

!INCLUDE $(NTMAKEENV)\makefile.def


SOURCES:

Code:

TARGETNAME=oib111_Driver

TARGETPATH=Release

TARGETTYPE=DRIVER

TARGETSOURCE=DriverMain.cpp

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Jul 16, 2008 10:10 pm    Post subject: Reply with quote

My Sources usually look like this:
Code:
TARGETNAME=Name
TARGETPATH=obj
TARGETTYPE=DRIVER
SOURCES=main.c

_________________
Back to top
View user's profile Send private message
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Wed Jul 16, 2008 10:53 pm    Post subject: Reply with quote

Hmm, link to this tutorial? Very Happy Interested in learning this also Very Happy
Back to top
View user's profile Send private message AIM Address MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Wed Jul 16, 2008 11:38 pm    Post subject: Reply with quote

lurc wrote:
My Sources usually look like this:
Code:
TARGETNAME=Name
TARGETPATH=obj
TARGETTYPE=DRIVER
SOURCES=main.c


Just wondering because his was actually DriverMain.c. Do drivers have to be programmed in C, or at least the source be a .c file (its an odd question I know)?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Thu Jul 17, 2008 12:47 am    Post subject: Reply with quote

oib111 wrote:
Just wondering because his was actually DriverMain.c. Do drivers have to be programmed in C, or at least the source be a .c file (its an odd question I know)?


There are ways to program a driver in C++ or ASM, but it is widely accepted that drivers should be programmed in C.
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 8:40 am    Post subject: Reply with quote

Well, even if I save this as a .c file it doesn't do anything. I still get the errors.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Thu Jul 17, 2008 9:20 am    Post subject: Reply with quote

Code:

TARGETNAME=oib111_Driver

TARGETPATH=Release

TARGETTYPE=DRIVER

TARGETSOURCE=DriverMain.cpp


Should be:

Code:

TARGETNAME=oib111_Driver

TARGETPATH=Release

TARGETTYPE=DRIVER

SOURCES=DriverMain.cpp
Back to top
View user's profile Send private message AIM Address MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 9:24 am    Post subject: Reply with quote

That helped, but still.

Quote:


C:\WinDDK\6001.18001>cd ..

C:\WinDDK>cd ..

C:\>cd Drivers

C:\Drivers>build
path contains nonexistant d:\fpc\2.0.4\bin\i386-win32, removing
BUILD: Compile and Link for x86
BUILD: Loading c:\winddk\6001.18001\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Thu Jul 17 07:42:40 2008
BUILD: Examining c:\drivers directory for files to compile.
BUILD: Saving c:\winddk\6001.18001\build.dat...
BUILD: Compiling and Linking c:\drivers directory
_NT_TARGET_VERSION SET TO WINXP
BUILD: Finish time: Thu Jul 17 07:42:41 2008
BUILD: Done

0 files compiled - 1 Warning

C:\Drivers>

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Thu Jul 17, 2008 9:45 am    Post subject: Reply with quote

oib111 wrote:
That helped, but still.

Quote:


C:\WinDDK\6001.18001>cd ..

C:\WinDDK>cd ..

C:\>cd Drivers

C:\Drivers>build
path contains nonexistant d:\fpc\2.0.4\bin\i386-win32, removing
BUILD: Compile and Link for x86
BUILD: Loading c:\winddk\6001.18001\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Start time: Thu Jul 17 07:42:40 2008
BUILD: Examining c:\drivers directory for files to compile.
BUILD: Saving c:\winddk\6001.18001\build.dat...
BUILD: Compiling and Linking c:\drivers directory
_NT_TARGET_VERSION SET TO WINXP
BUILD: Finish time: Thu Jul 17 07:42:41 2008
BUILD: Done

0 files compiled - 1 Warning

C:\Drivers>


Use
Code:

build -c
Back to top
View user's profile Send private message AIM Address MSN Messenger
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Jul 17, 2008 9:54 am    Post subject: Reply with quote

Thank you! It worked! Btw, jackyll here's a link to the driver programming tutorial I'm about to read. I've read bits and pieces, and it's a good tutorial. Lots of explaining, helped me understand more about how programs work.

http://www.codeproject.com/KB/system/driverdev.aspx

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
jackyyll
Expert Cheater
Reputation: 0

Joined: 28 Jan 2008
Posts: 143
Location: here

PostPosted: Thu Jul 17, 2008 9:57 am    Post subject: Reply with quote

oib111 wrote:
Thank you! It worked! Btw, jackyll here's a link to the driver programming tutorial I'm about to read. I've read bits and pieces, and it's a good tutorial. Lots of explaining, helped me understand more about how programs work.

http://www.codeproject.com/KB/system/driverdev.aspx


Cool. Thanks for the link, will have to read over this some time.
Back to top
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites