Remote Desktop Application Example-VBForums
Page 1 of 2 12 LastLast
Results 1 to 40 of 55

Thread: Remote Desktop Application Example

Hybrid View

  1. #1

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Remote Desktop Application Example

    Hello everyone..
    Here,this is a remote desktop kind of software...It isnt veryy effective..but,I think its not bad for my 1st beginner program on this field in vb.net.
    I have used the readymade classes for sending files and messages provided by UNolibs.Net

    Using this program,the desktop can be viewed,mouse can be controlled...Keyboard keystrokes cannot be controlled as of now...will be implemented soon.
    As for speed,it is not very efficient right now.

    A very important Note:This program needs 2 computers to work..It cannot be tested on a single computer.A drawback with this program is that It will not work under different subnets.

    Special Thanks to
    UNolibs.Net
    for their functions and classes to sendfiles and messages.This is included in the following attachment too
    SCREENSHOT OF REMOTE DESKTOP CLIENT


    SCREENSHOT OF REMOTE DESKTOP SERVER
    Last edited by uniquegodwin; Jul 16th, 2006 at 04:06 AM. Reason: recompiled the server code
    Godwin

    Help someone else with what someone helped you!

  2. #2
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,116

    Re: Remote Desktop Application Example

    Maybe you could attach the files in .zip format as I think more members have winzip then winrar.
    I only have winzip.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  3. #3
    New Member
    Join Date
    Oct 2008
    Location
    pakistan
    Posts
    1

    Re: Remote Desktop Application Example

    Quote Originally Posted by RobDog888
    Maybe you could attach the files in .zip format as I think more members have winzip then winrar.
    I only have winzip.
    1:i found error in client class the code is client.Send(buffer, wd, Sockets.SocketFlags.None)
    2: in server class error is wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
    if anyone have solution of these problem plz contact me

  4. #4

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    oh..
    Ok,Ill do that soon..
    Im just working on submitting another code in few minutes Ill change the rar into zip right after that Robby.
    Godwin

    Help someone else with what someone helped you!

  5. #5
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,116

    Re: Remote Desktop Application Example

    I just looked at the link and it looks interesting. No sockets needed.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  6. #6

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    yeah,Im a fan of his code... Its really great coding
    Godwin

    Help someone else with what someone helped you!

  7. #7

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    I changed it to Zip now.I hope no one has problems downloading and extracting it anymore
    Godwin

    Help someone else with what someone helped you!

  8. #8

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    hmmm...I guess not many people out here like a remote desktop
    Godwin

    Help someone else with what someone helped you!

  9. #9

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Heyyyy,THREE ppl have downloaded and seen so far...
    Thank You guys soo happyyy
    Please dont forget to post your comments too ...Be free to say anything bad or good...All for Good
    Godwin

    Help someone else with what someone helped you!

  10. #10
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Remote Desktop Application Example

    Hey! great code u have here! very nice and cOOLLL!!!! : wave:
    when will u release ur next version of this? especially the viewing of the screen seems slow but i think i little coding of your should do!!! im gonna wait for it!!!

  11. #11
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Exclamation Re: Remote Desktop Application Example

    many thanks for this sample,

    i was just asking if i can add a new form in the client side to view the server side, can you please help me

  12. #12

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Thank you tovb...
    You're really encouraging..
    Yes I will do the next version very soon..I think I need to convert the picture into bytes and then convert it back..
    If you have any ideas,you're welcomed..
    And next version will also give you the power to send keyboard events...In this version,only mouse events are working
    Godwin

    Help someone else with what someone helped you!

  13. #13
    Junior Member
    Join Date
    Oct 2005
    Posts
    16

    Re: Remote Desktop Application Example

    wow, that would be great!!! im really looking forward to that new version of ur program. i can't wait!...ok! if i have any ideas, i'll post it in here!! i think creating this kind of program is kind of cool and say.. an achievement as for my part..hehehe. gud luck!

  14. #14
    New Member
    Join Date
    Nov 2005
    Posts
    4

    Re: Remote Desktop Application Example

    hi
    i'm really exited from your project
    you are realy a professional programmer ;
    this program is final project of my university term;
    can you help me, how do you write this code,
    & what are your resources for writing this program?

    & i'll be too glad , if i can see new version of your software soon.
    good luck

  15. #15

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Hi Sba..
    Thanks for all the encouraging stuff so happy..
    I did get help from third party tools like unolibs.net too as mentioned on top..
    Go through the code ...
    If theres some specific thing you need help with,Ill be glad to help...its your turn to make an attempt on your project before asking help so that youll find the specific place where you need help.
    Wish you success
    Godwin

    Help someone else with what someone helped you!

  16. #16

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Hi lightmoon...
    Im not sure what you mean...
    well,adding a new form causes no problem for me...
    And I wonder why u need a new form? Theres already a new form to view the server side.
    I dont understand what you mean ...can you tell me little more detailed and clearly if possible? Thanks for trying this out..contact me through this forum for any help
    Godwin

    Help someone else with what someone helped you!

  17. #17
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Exclamation Re: Remote Desktop Application Example

    hi there

    maybe i didnt explain it so well, wish that this time i will.

    your program has two sides, first one can control the second one, and i name the controlled side as client, and the side who do control and who can view the other by Server.

    what im asking that how can i add new form on the client side" who is monitored by the other side" in which the client can view the server side also, i mean view its screen.

    in simple word, i want both sides to have a form that they can view the other through it.

    i was working on it, but really i couldnt make it better than this, i have many errors while trying to do it, so can you please post me a newer verson of it contain this, or to tell me how to do this??

    many thanks bro

  18. #18

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Hi lightmoon,
    I will definitely help u in anyway I can...
    I cant right now immediatly get a newer version...but I will after a while
    but,I will do all necessary help so you can make it yourself ..You could post the better version too

    ok,the main concept ive used to do this is that...I use the sendmessage function to send command to the other computer and i check that command there...
    for example...i can send the message "viewscreen" and when the other computer recieves it,i set it to send a picture of the screen.
    please tell me what errors you are facing...I will help you out
    Godwin

    Help someone else with what someone helped you!

  19. #19
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Exclamation Re: Remote Desktop Application Example

    many thanks for replay,

    i got everything now ok, but the point is sometimes i got IOException on the side i add the new form on it to view the other side screen.

    also if you remember that part, i got "error 5, use another file name" in message box.

    wish that you will help me in this and many thanks for you.

    waiting your answer

  20. #20
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Exclamation Re: Remote Desktop Application Example

    the main error i have now, and i think it cause all the problems that in the client class, i have IOexception, which is "Unable to open file", i tried to comment the throw statment, but also i have null reference in the following line, i think you can remember it, its a part of Client class code

    Dim buffer(PacketSize - 1) As Byte
    wd = fileStream.Read(buffer, 0, PacketSize)

    in this line i have the exception, can you please tell me, what is the reference may has null value??

    another thing, the other side view almost of the time one or two screen shots of my side, and then this exception occures.

    can you please help me in this??

  21. #21

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Hey..
    Dont change anything in those server client class files...I didnt make them..I got them from unolibs...
    http://www.codeproject.com/useritems/UnoLibsNet_V2.asp

    And there is a small problem with the efficiency of my program...It is slow...and especially if you want it to work both sides at the same time,Its going to be more slow.
    It captures the screen image and stores it on the c:\ on the other computer...
    As soon as the file gets transferred,it requests for the next frame..
    This happens continously...thats how this thing works So,if you use both sides at the same time,it would perform very badly I think
    Godwin

    Help someone else with what someone helped you!

  22. #22

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    I need to use serialization or something to make it work better I guess Ive used a childs method now.
    Godwin

    Help someone else with what someone helped you!

  23. #23
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Remote Desktop Application Example

    You'd have to check which byte has been changed, and only send the changed bytes. That's how W2K's Terminal Server is. It is super fast for most things.

  24. #24
    Junior Member
    Join Date
    Dec 2005
    Posts
    26

    Exclamation Re: Remote Desktop Application Example

    hi,

    wish you help me in this part, cause i need your help here so hard.

    what i was looking forward is to make server broadcast his screen for multi clients,i mean that server will display its screen on two clients monitor's or more, but at least im testing the applicatino on two clients.

    i tried to send them the two files in same two messages,

    clsc.SendMessage(arr(0).ToString, 1234, "readyforcap")
    clsc.SendMessage(arr(1).ToString, 1234, "readyforcap")

    clsc.SendFiles(arr(0).ToString, 1234, dw.FileNames)
    clsc.SendFiles(arr(1).ToString, 1234, dw.FileNames)

    the arr array contains the clients IP's which i will broadcast my screen to.

    this caused many exceptions for me, the first one said "Stack Empty", and many other, most of them in the function " SendFilesTS()".

    can you please help me in this, and tell me how can i solve this??

    many thanks

  25. #25

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    i got everything now ok, but the point is sometimes i got IOException on the side i add the new form on it to view the other side screen.
    Did you use the event handler which listens for the message? Did you declare a new instance of the class for listening??
    Godwin

    Help someone else with what someone helped you!

  26. #26

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    sendfilesTS???
    Ill just reply u soon buddy...Im in my office right now...in a hurry..Ill get back soon
    Godwin

    Help someone else with what someone helped you!

  27. #27
    Member
    Join Date
    Jan 2006
    Posts
    55

    Re: Remote Desktop Application Example

    this is great nice work i think this is extremely good for your first try.

  28. #28

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Thanks Marc
    Godwin

    Help someone else with what someone helped you!

  29. #29
    Frenzied Member
    Join Date
    Jan 2006
    Posts
    1,863

    Re: Remote Desktop Application Example

    Hi,
    It's really one the best Application i have seen................do you have any idea about how to go for Keylogger thing........

    Regards,
    Ritesh

  30. #30

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Hi,
    Its very simple to make a keylogger if you use an API
    Godwin

    Help someone else with what someone helped you!

  31. #31

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    But I guess vbforums will not support u making such stuff
    Godwin

    Help someone else with what someone helped you!

  32. #32
    Hyperactive Member anna7's Avatar
    Join Date
    Sep 2005
    Location
    Catalonia
    Posts
    481

    Exclamation Re: Remote Desktop Application Example

    I executed the application "remote desktop server " and now I have problems when I start the pc.

    it shows me the window for debugger this application. it has installed something to me in the start??


    ERROR:

    'svchost.exe': se cargó 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll', no se pueden cargar símbolos.
    'svchost.exe': se cargó 'C:\Archivos de programa\svchost.exe', no se pueden cargar símbolos.
    'svchost.exe': se cargó 'c:\windows\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll' , no se pueden cargar símbolos.
    'svchost.exe': se cargó 'c:\windows\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', no se pueden cargar símbolos.
    'svchost.exe': se cargó 'c:\windows\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', no se pueden cargar símbolos.
    'svchost.exe': se cargó 'c:\windows\assembly\gac\microsoft.visualbasic\7.0.5000.0__b03f5f7f11d50a3a\microsoft.visualbasic.dl l', no se pueden cargar símbolos.
    'svchost.exe': se cargó 'c:\windows\assembly\gac\mscorlib.resources\1.0.5000.0_es_b77a5c561934e089\mscorlib.resources.dll', no se pueden cargar símbolos.
    Excepción no controlada del tipo 'System.TypeInitializationException' en svchost.exe

    Información adicional: Se inició una excepción en el inicializador de tipo de "System.Net.Sockets.Socket"
    Some help?
    Last edited by anna7; Jul 14th, 2006 at 06:27 AM.

  33. #33

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    You have problems when you start your pc?
    I will check the code again Anna,please keep me updated if you still have some problem...
    Godwin

    Help someone else with what someone helped you!

  34. #34
    Hyperactive Member anna7's Avatar
    Join Date
    Sep 2005
    Location
    Catalonia
    Posts
    481

    Re: Remote Desktop Application Example

    Yes I still have problems.

    I don't know if it has to see something, but since I tried this code appears this message "You're under attack" when start the pc also, and I cannot eliminate it.



    regards,

    Anna

  35. #35

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    I have recompiled the server code also..If possible,contact me on any IM ..Ill help you online...
    Btw,yes you're right...there was an executable called svchost.exe..I really dont know how it got in there...I've fully freshly recompiled the code and uploaded.
    If you have more problems,try contacting me online.
    Thanks
    Godwin

    Help someone else with what someone helped you!

  36. #36
    Hyperactive Member anna7's Avatar
    Join Date
    Sep 2005
    Location
    Catalonia
    Posts
    481

    Resolved Re: Remote Desktop Application Example

    I have solved the problem. Ultimately I found the copy of the file , what "svchost.exe" had create it. This one was the responsible of all the problems and the message: "You're under attack"

    I deactivated this service and delete the file that it had created.


    regards,

    Anna

  37. #37

    Thread Starter
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    693

    Re: Remote Desktop Application Example

    Awesome!! :-)
    Godwin

    Help someone else with what someone helped you!

  38. #38
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Remote Desktop Application Example

    thx for this code I own U
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  39. #39
    Hyperactive Member demon.KILER's Avatar
    Join Date
    Jul 2006
    Location
    I cannot remember !?
    Posts
    408

    Re: Remote Desktop Application Example

    but I have this error and I cannot see any thing wrong with that line

    VB Code:
    1. wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
    Error 42 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 192 22 WindowsApplication2



    VB Code:
    1. wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)

    Error 41 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 189 18 WindowsApplication2

    VB Code:
    1. client.Send(buffer, wd, Sockets.SocketFlags.None)

    Error 3 Overload resolution failed because no accessible 'Send' can be called without a narrowing conversion:
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Send(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ClientClass.vb 79 13 WindowsApplication2
    VS 2005 .....Framework SDK 3.0

    "Its mostly the brave one who choose to not fight"

  40. #40
    New Member
    Join Date
    Nov 2008
    Posts
    1

    Re: Remote Desktop Application Example

    Quote Originally Posted by demon.KILER
    but I have this error and I cannot see any thing wrong with that line

    VB Code:
    1. wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)
    Error 42 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 192 22 WindowsApplication2



    VB Code:
    1. wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)

    Error 41 Overload resolution failed because no accessible 'Receive' can be called without a narrowing conversion:
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Receive(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Receive(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ServerClass.vb 189 18 WindowsApplication2

    VB Code:
    1. client.Send(buffer, wd, Sockets.SocketFlags.None)

    Error 3 Overload resolution failed because no accessible 'Send' can be called without a narrowing conversion:
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'buffers' narrows from '1-dimensional array of Byte' to 'System.Collections.Generic.IList(Of System.ArraySegment(Of Byte))'.
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'socketFlags' narrows from 'Long' to 'System.Net.Sockets.SocketFlags'.
    'Public Function Send(buffers As System.Collections.Generic.IList(Of System.ArraySegment(Of Byte)), socketFlags As System.Net.Sockets.SocketFlags, ByRef errorCode As System.Net.Sockets.SocketError) As Integer': Argument matching parameter 'errorCode' narrows from 'System.Net.Sockets.SocketFlags' to 'System.Net.Sockets.SocketError'.
    'Public Function Send(buffer() As Byte, size As Integer, socketFlags As System.Net.Sockets.SocketFlags) As Integer': Argument matching parameter 'size' narrows from 'Long' to 'Integer'. C:\Documents and Settings\TEMP\Desktop\Remote Desktop Server\Remote Desktop Server\ClientClass.vb 79 13 WindowsApplication2
    I have the same problem.

    And I use visual studio 2008

    What could i change them to?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.