ParallelGraphics Forums
SDK
You are here: [Forums]::[General]::[SDK]

Registration 
Registration
Forgot your password?

Help 
Help
Support

Quick search 

Subscribe to newsletters 

Install Cortona VRML Client for FREE!
Outline 3D
Try RobinZone!
email:  password:
   General - SDK

Subject: Re: [VC++] QueryService IID_I3DViewService4 issue
Sender: nalex@parallelgraphics.com 26.06.07 18:32
Hi everybody,
I'm trying to get the ServiceProvider on the Cortona SDK to manipulate cameras. I use this code (suggested in the official doc, Cortona SDK 4.1):
--
IServiceProvider* servprov;
IDispatch* pEngine = m_wndCortona.GetEngine();
if (SUCCEEDED(pEngine->QueryInterface(IID_IServiceProvider, reinterpret_cast<void**>(&servprov))))
{
/* servprov is always NULL */
I3DViewService4* service3d;
if (SUCCEEDED(servprov->QueryService(IID_I3DViewService4, IID_I3DViewService4, reinterpret_cast<void**>(&service3d))))
        {
            _POS pos;
            service3d->GetCameraPos(&pos);
            service3d->Release();
        }
        servprov->Release();
    }
pEngine->Release();
--

What can I do?

If I understand you correctly, QueryInterface for IID_IServiceProvider succeeds but method returns NULL instead of valid interface pointer?

 


[VC++] QueryService IID_I3DViewService4 issue / Andrea B / 26.06.07 12:35
     Re: [VC++] QueryService IID_I3DViewService4 issue / nalex@parallelgraphics.com / 26.06.07 18:32
         Re: [VC++] QueryService IID_I3DViewService4 issue / Andrea B / 27.06.07 03:42
             Re: [VC++] QueryService IID_I3DViewService4 issue / nalex@parallelgraphics.com / 27.06.07 04:37
                 Re: [VC++] QueryService IID_I3DViewService4 issue / Andrea B / 27.06.07 05:00
                     Re: [VC++] QueryService IID_I3DViewService4 issue / nalex@parallelgraphics.com / 27.06.07 06:34

Messages in thread: 6


© 1998-2007 ParallelGraphics. All rights reserved. Terms of use.