how to obtain CLSID of WeatherSystem Service COM Component

mer
Posts: 24
Joined: Fri Aug 31, 2018 10:52 am

how to obtain CLSID of WeatherSystem Service COM Component

Postby mer » Tue Sep 25, 2018 11:21 am

Hello,
I was just told that I would need CLSID of the COM object implementing the WeatherSystem and WeatherStation interfaces in order to instantiate this object outside of the plugin.

My search yielded only IIDs and SID. Should I look elsewhere for CLSID and if I don't find it, does it mean that the WeatherService can't be invoked from an application outside of P3d that communicates with it?

Thank you

mer
Posts: 24
Joined: Fri Aug 31, 2018 10:52 am

Re: how to obtain CLSID of WeatherSystem Service COM Component

Postby mer » Tue Sep 25, 2018 12:40 pm

Also, why does the documentation page refer to them as classes while the header files declare them as interfaces? Does that mean their IIDs are actually their CLSIDs?

Clifton Crane
Lockheed Martin
Posts: 877
Joined: Tue Sep 25, 2012 2:34 pm

Re: how to obtain CLSID of WeatherSystem Service COM Component

Postby Clifton Crane » Wed Sep 26, 2018 3:21 pm

Hello mer,

You can use the IPdk service's QueryService function to gain access to the IWeatherSystem service using both the SID and IID.
Clifton Crane
Prepar3D® Software Engineer

mer
Posts: 24
Joined: Fri Aug 31, 2018 10:52 am

Re: how to obtain CLSID of WeatherSystem Service COM Component

Postby mer » Thu Sep 27, 2018 4:49 am

Thank you Clifton Crane

My intent is to create a COM weather object as has been done in SimpleCar/SimpleAeroplane/Radar Altimeter examples. If I can create a COM object which has access to the WeatherSystem Services, I can access it from a C# client console application. I am not able to invoke QueryServices from such a console application right now so I thought the way to do so is create a COM object.

Could you please help me?

Thank you


Return to “Software Development Kit (SDK) Questions”

Who is online

Users browsing this forum: No registered users and 3 guests