Page 1 of 1

I cant get the IDISManagerV450.

Posted: Wed Aug 28, 2019 9:59 am
by reyad__007
I cant get the IDISManagerV450.ex:
CComPtr<IBaseObjectV400> spUserObject;
CComPtr<IDISManagerV450> spDISManager;
HRESULT hr;
hr = PdkServices::GetSimObjectManager()->GetUserObject(&spUserObject);
if (hr == S_OK)
{
hr = spUserObject->QueryService(SID_DISManager,IID_IDISManagerV450, (void**)& spDISManager);
}
Regards
Reyad

Re: I cant get the IDISManagerV450.

Posted: Wed Aug 28, 2019 5:04 pm
by BenBaron
Hi Reyad,

I assume you have P3D Professional Plus? As it states *Professional Plus Only* in the SDK.

All the best, Benny

Re: I cant get the IDISManagerV450.

Posted: Wed Aug 28, 2019 7:22 pm
by Clifton Crane
Hi Reyed,

The IDISManagerV450 interface is a PDK service. You will want to QueryService the PDK instead of the IBaseObject interface.

Re: I cant get the IDISManagerV450.

Posted: Mon Oct 21, 2019 2:51 pm
by MicMac44
Is there a quick example of setting up the OnReceive() and OnSend() callbacks in the IPduCallbackV440 class?

Re: I cant get the IDISManagerV450.

Posted: Thu Oct 24, 2019 5:25 pm
by MicMac44

Code: Select all

PdkServices::Init(pPdk); CComPtr<IDISManagerV450> spDISManager; HRESULT hr; hr = PdkServices::GetPdk()->QueryService(SID_DISManager, IID_IDISManagerV450, (void**)& spDISManager);
Is this how you should be grabbing it? I'm still getting failures on the QueryService call.

Re: I cant get the IDISManagerV450.

Posted: Fri Oct 25, 2019 1:52 pm
by Clifton Crane
Hi MicMac44,

It looks like there is an issue with QueryService for the IDISManagerV450 interface. Instead, please try querying for the IDISManagerV440 interface using the IID_IDISManagerV440 guid.

If you need functionality from the V450 interface that is not available in the V440 interface, you should be able to safely cast to IDISManagerV450 as long as you are running P3D version 4.5. If your plugin needs to support P3D versions prior to v4.5, you can use SimConnect to retrieve the application version before performing any cast to the IDISManagerV450 interface.

Thanks for the report. Sorry for any inconvenience.

Re: I cant get the IDISManagerV450.

Posted: Fri Oct 25, 2019 6:30 pm
by MicMac44
Clifton,

Thanks for the response! I rolled it back to IDISManagerV440 and it's working smoothly now.