Distinct offers Network Monitor, the ONLY natural language Protocol Analyzer, ONC RPC for C++, .NET and Java, and IntelliTerm, the fastest Terminal Emulator for TN3270, TN5250 and VT420 on the market.

Distict - Support - FAQ

Products Downloads Sales Support About us
Knowledge Base Ask Cody Resources



        
 
Do you have any C++ sample code to illustrate how to send binary data?
Here it is:

//
// BEGIN SENDB.CPP
// This code segment ilustrates how to
// SEND binary data (structure) using
// the SendB Method.
//
{
struct tmp {
char command, phyline;
short projnum;
char uid[20];
} sud;

sud.command = 1;
sud.phyline = 0;
sud.projnum = 0;
strcpy (sud.uid, "supervisor");
long bytes = sizeof(sud);

VARIANT x;
x.parray = (SAFEARRAY *) calloc (1, sizeof (SAFEARRAY));
x.parray->pvData = &sud;
m_socket.SendB(x, bytes);
free (x.parray);
}
//
// END SENDB.CPP
//






  02/04/2012   Legal notices | PRIVACY Policy |