Access violation reading location 0xfeeeff0a

This is a discussion on Access violation reading location 0xfeeeff0a within the C++ Programming forums, part of the General Programming Boards category; Hello,
I'm new in this forum and the c++ world, I come from the java world and I have some ...

Access violation reading location 0xfeeeff0a

Hello,

I'm new in this forum and the c++ world, I come from the java world and I have some difficulties getting used to the way things work here but I'm learning.
I bought the Beginning game programming third edition book and learning directx with it, for now it is quite simple but I still have the "newbies errors"...
I hope you can help me with this one :
I'm creating a little class to help me manage the inputs (keyboard, mouse, controllers) but when I want to use the method that get the mouse position or keyboard keys I got this error :

Start commenting out code unless you have only the minimum amount of code that causes the problem. Then post that here. Then people will be more willing to help you.
Also, input is an InputHelper, which is not a pointer. Therefore, it is faulty to initialize it to NULL.
Another problem is that you are calling input's destructor manually. Do not do this! The destructor should be called by the compiler, and the compiler only!

Have you tried stepping through InputHelper::InputHelper in a debugger?
You are testing everything for success which is a great start, but you aren't taking any action in case any of the DirectInput functions fail so you might be crashing because you are trying to use pointers to invalid objects.

Since you come from Java world, you will find shared pointers very friendly, especially com_ptr, which is essential in native DirectX developement. Shared pointers take role of Java's references. Have a look at: CComPtr Class (ATL)
I saw some people saying you can use boost's shared_ptr to do the same thing, but personally I find it better to use a dedicated class (which is by the way trivial to implement in case of interfaces).