Skip to main content
gamedev.net
🔒 Locked

Base constructor problem.

Started by mrmrcoleman Jan 30, 2004 at 6:44 AM 3 replies 550+ views
Original Post
mrmrcoleman
mrmrcoleman
Hello, I have implemented a video render filter based on the CBaseVideoRenderer interface. However when I compile I get the following runtime error: TEXTURE3D9 caused an exception 03H in module KERNEL32.DLL at 0167:bff768a1. Registers: EAX=00000000 CS=0167 EIP=bff768a1 EFLGS=00000202 EBX=005a0000 SS=016f ESP=007af454 EBP=007af45c ECX=00000001 DS=016f ESI=007af458 FS=4f27 EDX=00415b70 ES=016f EDI=007afc80 GS=0000 Bytes at CS:EIP: c3 cc cc 55 8b ec 56 57 68 c0 94 fc bf e8 01 d9 Stack dump: 004169dd 007afc94 007afc80 00416190 00456d40 00456d68 0000007d 00000000 007afc94 cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc cccccccc I have narrowed this down to when the constructor for the CBaseVideoRenderer is called when the CTextureRenderer constructor is called as follows:
CTextureRenderer::CTextureRenderer( LPUNKNOWN pUnk, HRESULT phr ) 
                                  : CBaseVideoRenderer(__uuidof(CLSID_TextureRenderer), 
                                    NAME("Texture Renderer"), pUnk, phr) 
{ 
    // Store and AddRef the texture for our use. 

    ASSERT(phr); 
    if (phr) 
        *phr = S_OK; 
}
I cant understand this problem as I seem to have followed what was done in the samples. If it helps the GUID is defined as: struct __declspec(uuid("{71771540-2017-11cf-ae26-0020afd79767}")) CLSID_TextureRenderer; Thank you in advance. Mark Coleman
SiCrane
SiCrane
I don''t even want to know how you got this to compile.... You should never try to derefernce a HRESULT variable. What you probably wanted to do is pass a HRESULT pointer to the constructor, and dereference that. Or better yet, why not try a reference?
mrmrcoleman
mrmrcoleman
I dont think that is the problem as I pasted that section straight out of the SDK!! I think that there is a problem with the call to the base class as the problem still occurs when the code in the constrcutor body is removed?!
SiCrane
SiCrane
If you think that''s the problem why not post the source to the base class constructor?
mrmrcoleman
mrmrcoleman
I am afraid that I cant do that because the base constructor is supplied in the SDK as part of a library. Hmm, I think I may be royally screwed. Nevermind.

Topic Locked

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

Sign in to reply to this topic.