Results 1 to 5 of 5

Thread: Remote Desktop

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    10

    Thumbs up Remote Desktop

    hi
    I got data transfer project via tcp/ip. but its give some error..anybody help me to clear that errors..
    client.Send(buffer, wd, Sockets.SocketFlags.None)
    Error:
    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'.

    wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)

    Error:
    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'.

    wd = Client.Receive(buffer, PacketSize, Sockets.SocketFlags.None)

    Error:
    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'.

    this coding i download from this link
    http://www.codeproject.com/KB/vb/UnoLibsNet_V2.aspx

    how to clear this error or give ur thought to manage this error...

  2. #2
    Learning .Net danasegarane's Avatar
    Join Date
    Aug 2004
    Location
    VBForums
    Posts
    5,853

    Move to VB.Net Forum

    Move to VB.Net Forum
    Please mark you thread resolved using the Thread Tools as shown

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Remote Desktop

    Moved To VB.NET

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Remote Desktop

    Read the code, documentation or just use Intellisense to see what the types are for the parameters of those methods and make sure your arguments are the correct types. If a conversion or cast is required then perform it. If you're not quite sure exactly how then tell us, what types are the method parameters and what types are your arguments?
    Last edited by jmcilhinney; Feb 5th, 2009 at 08:12 AM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  5. #5

    Thread Starter
    New Member
    Join Date
    Feb 2009
    Posts
    10

    Re: Remote Desktop

    hi all

    i'm not quite good in vb.net...just basic things only i know..this s first time i start to do client server connection using tcp/ip... i searched in google to got this coding.. if i run this coding its says those errors ... if u don't mind u download this coding and try it and then u answer that errors.. i hope u'll help me..

    http://www.codeproject.com/KB/vb/UnoLibsNet_V2.aspx

Posting Permissions

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



Click Here to Expand Forum to Full Width