Access violation Message

Started by
3 comments, last by Jazonxyz 16 years, 11 months ago
I am tring to compile a game I am making but I keep on getting a message box after compiling it on Visual C++ 6.0 . The message reads: Unhandled exeption in Game.exe (D3D9.DLL): 0xC0000005: Access violation. What does this mean? How can I fix it?
Advertisement
This means you are trying to access memory that doesn't belong to you. The most common culprit is dereferencing a NULL pointer. You should be able to drop into the debugger or step through your program at/up to the crash to see exactly what's going on.

Also, VC++ 6.0 is shit. Get 2005 Express Edition, it's free.
I already have express editions 2005 but some commands don't really work like
when I type in:

hWnd = CreateWindow("Main","Title",100,100,...);

the compiler says that I cannot parameter 1 and 2 into some sort of format.
By default vs 2005 sets projects to use unicode character strings instead of multi-byte strings. You need to add L to the beginning of your string to make is unicode ie:

hWnd = CreateWindow(L"Main",L"Title",100,100,...);

Or you can use _T macro to change this based on the setting. So _T("Main") would work as well.

hWnd = CreateWindow(_T("Main"),_T("Title"),100,100,...);

Third option is to go into the project properties and set the string type to multibyte.
Thanks! here is a treat for you:

<("<) <('')> (>")>

That's the Kirby dance.

This topic is closed to new replies.

Advertisement