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

Memory Access Error while using ddutil

Started by Zdman Dec 31, 2004 at 12:54 AM 1 replies 400+ views
Original Post
Zdman
Zdman
this is the line that's being called my_sprite.lpDDS = my_sprite.lpCD->GetDDrawSurface(); but pretty much my_sprite.lpCD->GetDDrawSurface() is the error this is the function in a public section of a class LPDIRECTDRAWSURFACE7 GetDDrawSurface() { return m_pdds; } m_pdds is a private directdraw object in the class CSurface and i'm trying to use it in the class CDisplay. Maybe I'm doing this incorrectly, advice is greatly appreciated.
trevaaar
trevaaar
If you're getting a memory access violation running that then lpCD must not be pointing at a valid CSurface object.
Zdman
Zdman
Thx. I called the function to create it but forgot to put a check if it failed or not. When I did this I found out that it was failing. That solved that problem so off I go to the drawing boards to figure out why it's failing. Thx again.

Topic Locked

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

Sign in to reply to this topic.