Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2008 .net Form Socket Send problem

Status
Not open for further replies.

paul51

Programmer
May 19, 2000
38
US
Hello,

I am writing my first socket program in VC++, ,.net 2008.
I am able to create a socket, but I am not able to use the Send command properly.

unsigned char Tx_Packets[]= { 0x70,0xa1,0x00,0x00 };
int Tx_Length = 4;
new_socket->Send(Tx_Packets,Tx_Length,SocketFlags::None);

error C2664: 'int System::Net::Sockets::Socket::Send(cli::array<Type,dimension> ^,int,System::Net::Sockets::SocketFlags)' : cannot convert parameter 1 from 'unsigned char [4]' to 'cli::array<Type,dimension> ^'

Does anyone know how to properly format the array?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top