I cant get the IDISManagerV450.

SDK supports Prepar3D’s philosophy of an open development architecture and encourages third parties to bring new innovations with improved add-ons and training content.
Post Reply
reyad__007
Posts: 5
Joined: Mon Oct 22, 2018 3:17 am

I cant get the IDISManagerV450.

Post 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
BenBaron
Posts: 80
Joined: Fri Jan 16, 2015 7:51 am

Re: I cant get the IDISManagerV450.

Post by BenBaron »

Hi Reyad,

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

All the best, Benny
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: I cant get the IDISManagerV450.

Post by Clifton Crane »

Hi Reyed,

The IDISManagerV450 interface is a PDK service. You will want to QueryService the PDK instead of the IBaseObject interface.
Clifton Crane
Prepar3D® Software Engineer Sr.
MicMac44
Posts: 25
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Post by MicMac44 »

Is there a quick example of setting up the OnReceive() and OnSend() callbacks in the IPduCallbackV440 class?
MicMac44
Posts: 25
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Post 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.
Clifton Crane
Lockheed Martin
Posts: 1207
Joined: Tue Sep 25, 2012 2:34 pm

Re: I cant get the IDISManagerV450.

Post 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.
Clifton Crane
Prepar3D® Software Engineer Sr.
MicMac44
Posts: 25
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Post by MicMac44 »

Clifton,

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