Skip to main content
GameDev.net gamedev.net
🔒 Locked

Access problem [Solved]

Started by NorskFirefox Jun 17, 2007 at 5:09 PM 1 replies 400+ views
Original Post
NorskFirefox
NorskFirefox
Greetings from Norway :) Hello, I've bought the book "Beginning game programming 2nd edit." by Jonathan S. Harbour and I'm now on chapter 10. (If anyone has read the book ;)) But I've got an access problem. I get this error message when running the program (It does compile without any errors)
Quote:
Access violation reading location 0x00000000
Sources: dxinput.cpp - http://rafb.net/p/LwYTuw58.html game.cpp - http://rafb.net/p/vlbXC244.html game.h - http://rafb.net/p/RBVrSG59.html dxinput.h - http://rafb.net/p/RGG9wd15.html winmain.cpp - http://rafb.net/p/DKzvug13.html dxaudio.h - http://rafb.net/p/D2TuRD13.html dxgraphics.h - http://rafb.net/p/IMU4Wi49.html dxaudio.h - http://rafb.net/p/eUFKgm80.html dxgraphics.cpp - http://rafb.net/p/Bu5fOA84.html Other files: dxutil.h - http://rafb.net/p/K9510053.html dsutil.h - http://rafb.net/p/ScWEDq28.html dsutil.cpp - http://rafb.net/p/ef1CNn52.html Compiler/Editor: Microsoft Visual C++ 2005 express edition Anyone that can test and check it? Had same problem when started to use DirectAudio, so I used the framework from the CD in this chapter cause I thought it might work better. If you need more info, please tell ;) Image of the program after compiling: http://img267.imageshack.us/my.php?image=20070618002505rj8.png [Edited by - NorskFirefox on June 18, 2007 5:42:21 AM]
Zipster
Zipster
If I had to guess, I would say it's crashing because dimouse is NULL. From what I can gather from the call stack and related files, you need to call Init_DirectInput before Game_Init.
NorskFirefox
NorskFirefox
Greetings from Norway :)

Thank you :D

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.