locked
C# program to share screen using RDPCOMAPILIB.dll

    Question

  • Hi!!

    i'm getting this error when i try to share screen from my notebook connected to the router using wifi n my pc by ethernet

    "System.ArgumentException: Value does not fall within the expected range.

       at RDPCOMAPILib.IRDPSRAPIViewer.Connect(String bstrConnectionString, String bstrName, String bstrPassword)

       at AxRDPCOMAPILib.AxRDPViewer.Connect(String bstrConnectionString, String bstrName, String bstrPassword)"

    this error comes each time i try to connect it

    axRDPviewer.connect(Connstring,"user1", "");

    I cant get this corrected...

     

    It works perfect when i do it on my pc

    but aint working when try to share my notebook screen...

     

    the Connstring is being sent by Tcp message(Send and receive)...

     

    Can u tell me where is the source of the problem... How can i take care of this???

    Wednesday, January 19, 2011 6:14 PM

Answers

  • Hi Ayan,

    I performed some tests at my lab.  Two Windows 7 systems, one for host and one for viewer.   The viewer is connecting by Wifi.   The share desktop apps work fine.   Could you please tell us what Windows version are you using on the host and viewer systems? 

    BTW, when I copy/paste the connection string value from the host to the viewer, if we change the value even a single word, I can repro the error message : Value does not fall within the expected range.  So, could you please double check whether the connection string is the same between the host and the viewer? 

    Good day!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 24, 2011 3:15 AM
    Moderator
  • I sorted out the problem.. The problem was the message... the way i was getting the message was having error.. i saw it n then modified my code to have the message delivered correctly...

     

    Now the problem is solved...

     

    Now issues with the tutorial or any other mean.. it was my faulty programing...

     

    Thanks for the guide...

    Friday, February 04, 2011 8:17 AM

All replies

  • Somebody Plz help me.. I cant find any kind of mistake... wats the error causing factor...
    Friday, January 21, 2011 4:11 AM
  • Hi,

    Here is a very helpful blog about this topic for your references, http://daron.yondem.com/PermaLink.aspx?guid=d8bbab27-169d-43d4-aea7-494845891789

    Could you please make your scenario and the repro steps be more detailed?  Also, if you can provide us with some sample codes, it would be much helpful for us to troubleshoot the issue.

    Have a nice weekend!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 21, 2011 2:07 PM
    Moderator
  • the code in the tutorial and that in my project is same... the difference is that the invitation message in the tutorial is being copied and then send to the viewer by user interaction. while in my project it is automated.. the invitation is sent to the viewer by tcp/ip message... the issue is not there when its done on the same pc.. i encounter this problem when i work on lan... when my host is on one system and viewer is on another system connected by LAN (Wifi/ethernet)... Do u still need the codes...

     

    my project is in c#...

     

    Thank u for the tutorial.... I guess i need some more help...

    Thank u...

    Ayan

    Friday, January 21, 2011 7:21 PM
  • Hi Ayan,

    I performed some tests at my lab.  Two Windows 7 systems, one for host and one for viewer.   The viewer is connecting by Wifi.   The share desktop apps work fine.   Could you please tell us what Windows version are you using on the host and viewer systems? 

    BTW, when I copy/paste the connection string value from the host to the viewer, if we change the value even a single word, I can repro the error message : Value does not fall within the expected range.  So, could you please double check whether the connection string is the same between the host and the viewer? 

    Good day!

    Thanks


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, January 24, 2011 3:15 AM
    Moderator
  • I sorted out the problem.. The problem was the message... the way i was getting the message was having error.. i saw it n then modified my code to have the message delivered correctly...

     

    Now the problem is solved...

     

    Now issues with the tutorial or any other mean.. it was my faulty programing...

     

    Thanks for the guide...

    Friday, February 04, 2011 8:17 AM
  • I am glad to hear the problem is solved.   :)

    Have a nice day!


    Michael Sun [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 07, 2011 1:09 AM
    Moderator
  • I am trying to "share a single document" just like netmeeting "Share Program", where only one document should be shared at a time to "viewer".

    If any other "window" popup over the "document" at the "sharer" end  then that part should be made "Opaque" at the "Viewer" end (in AxRDPViewer control).

    If the "document" is minimized at the "Sharer" end whole "AxRDPViewer" should be opaque at the "Viewer" end.

    Can you please me out in knowing any is there is any method or property in AxRDPViewer to do this.

    Or can u suggest any logic which is people. I needed to do exactly how it is done in "Onwan Net Meeting" option "Share Program".

    Thanks in advance.

    Thursday, June 28, 2012 11:49 AM