Skip to main content
gamedev.net
🔒 Locked

DirectX Hook creating/destroying objects

Started by madiyaan Jan 23, 2007 at 4:01 PM 1 replies 1.7k views
Original Post
madiyaan
madiyaan
Hello, Please refer to the retired topic which you can find below: [link] http://www.gamedev.net/community/forums/topic.asp?topic_id=359794&PageSize=25&WhichPage=1 [/link] I'm using this to write text to the hijacked program's directX screen. Only problem is, when the program closes the device, I don't think it calls the Release function of the device. Result: My font object isn't Release()'d. So it maintains an reference to the DirectX device object, which causes the screen to "hang" (i.e. nothing changes on the screen while I can still see a mouse cursor). At least that's what I suspect is going on, since there is no refresh on the screen and no CPU usage either. (I suspect since the font object isn't destroyed, it addref's the directX device object when I call: D3DXCreateFont( gD3dDevice, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arial"), &m_font ); and this isn't balanced by a Release() call since the Release() of the DirectX device isn't called by the Hijacked app). Any ideas on how to resolve this? I hope I'm clear as English isn't my first language.
a h31p1355 n00b
madiyaan
madiyaan
Bumping this topic.

Bump 1/3.
a h31p1355 n00b
don
don
Can you run the app (without your hook) under the debug runtime and see if it detects these leaked resources?

That would at least verify your theory.

Topic Locked

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

Sign in to reply to this topic.