2 Replies - 1249 Views - Last Post: 29 January 2013 - 06:36 AM Rate Topic: -----

#1 zlifanar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 29-January 13

C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)

Posted 29 January 2013 - 02:19 AM

Hi All,

I don't usually post in forums since I almost always find a solution on google somewhere. However this time I'm at a complete loss. So here's the problem:

I have created a program (C#) that allows you to have multiple instances of remote desktop connections to various different servers, selectable by tabs at the top. So far so good. Everything works as it should. HOWEVER, I want to use the advanced settings to set various different things. Unfortunately, the only place I can find any documentation on this is here

Unfortunately, I am not able to understand what it says about obtaining an instance of this interface, and have never used interfaces before. I have looked into interfaces to try and sort it out, but still no joy. Anyone got any ideas?

Cheers!

Is This A Good Question/Topic? 0
  • +

Replies To: C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)

#2 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3551
  • View blog
  • Posts: 10,999
  • Joined: 05-May 12

Re: C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)

Posted 29 January 2013 - 06:20 AM

The second sentence on the page you linked to says it all:

Quote

To obtain an instance of this interface, use the IMsTscAx::AdvancedSettings property to obtain an IMsTscAdvancedSettings interface pointer. Then call QueryInterface on the IMsTscAdvancedSettings pointer, passing IID_IMsRdpClientAdvancedSettings.


In C#, if you try to do a cast, a QueryInterface() is usually attempted:
IFoo foo = (IFoo) obj;



Or if you want to be explicit about what is happening, call Marshal.QueryInterface().
Was This Post Helpful? 2
  • +
  • -

#3 zlifanar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 17
  • Joined: 29-January 13

Re: C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)

Posted 29 January 2013 - 06:36 AM

Thanks for that! Helped a lot. I was getting confused as to what was implementing the IMsTscAX interface, which was the actual ActiveX Control (AxMsTscAxNotSafeForScripting).

Thanks Again :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1