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!
2 Replies - 237 Views - Last Post: 29 January 2013 - 06:36 AM
#1
C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)
Posted 29 January 2013 - 02:19 AM
Replies To: C# RDP ActiveX Control (Cannot Instanstiate Advanced Settings)
#2
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:
In C#, if you try to do a cast, a QueryInterface() is usually attempted:
Or if you want to be explicit about what is happening, call Marshal.QueryInterface().
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().
#3
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
Thanks Again
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|