I cant get the IDISManagerV450.

reyad__007
Posts: 5
Joined: Mon Oct 22, 2018 3:17 am

I cant get the IDISManagerV450.

Postby reyad__007 » Wed Aug 28, 2019 9:59 am

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: 73
Joined: Fri Jan 16, 2015 7:51 am

Re: I cant get the IDISManagerV450.

Postby BenBaron » Wed Aug 28, 2019 5:04 pm

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: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: I cant get the IDISManagerV450.

Postby Clifton Crane » Wed Aug 28, 2019 7:22 pm

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: 21
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Postby MicMac44 » Mon Oct 21, 2019 2:51 pm

Is there a quick example of setting up the OnReceive() and OnSend() callbacks in the IPduCallbackV440 class?

MicMac44
Posts: 21
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Postby MicMac44 » Thu Oct 24, 2019 5:25 pm

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: 997
Joined: Tue Sep 25, 2012 2:34 pm

Re: I cant get the IDISManagerV450.

Postby Clifton Crane » Fri Oct 25, 2019 1:52 pm

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: 21
Joined: Fri Feb 15, 2019 5:48 pm

Re: I cant get the IDISManagerV450.

Postby MicMac44 » Fri Oct 25, 2019 6:30 pm

Clifton,

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


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 12 guests