** Ignore the previous email, sorry, accidently pressed ctrl S, and sent it
before I finished writing it..
Hi,
I am writing a IOCP clientand server application, in which the server
application will only be ran on XP,2000 etc, and the client application will
also be ran on XP,2000 etc.
The client and server application both share the same header file which
includes:
typedef struct{
double MinVolt,MaxVolt;
double MinRead,MaxRead;
double FullMin,FullMax;
}AnalogueScalingStruct;
typedef struct{
char StationName[42];
int Days,Hours,Minutes;
int HeartBeat;
BOOL TEOMEnable[8];
char Station[8][10];
char Channel[8][10];
char Register[8][10];
char Units[8][22];
BOOL AnEnable[8];
int AnType[8];
char AnUnits[8][22];
AnalogueScalingStruct AnScale[8];
int InType[4];
BOOL InEnable[4];
char InUnits[4][22];
}StationSetup;
The client application fills the StationSetup structure and send it to the
server application using the sizeof function as follows:
StationSetup Setup;
.. Setup gets filled here..
ToServer((PBYTE)&Setup,sizeof(StationSetup) ); // just send the whole
structure to the server.
The above function simply copies the structure in CopyMemory(..) function
and sends it.
The server simply does a :
LPPER_HANDLE_DATA Overlapped,const char *Data
memcpy((void *)Overlapped->m_Hardware,(void *)Data,sizeof(StationSetup));
As I only use a memcpy(..) to copy the structure accross instead of each
individual items, will this cause a problem server runs on Win2000, and
client runs on a XP 64 bit,or XP?
thanks
Neil
_______________________________________________
msvc mailing list
[email protected]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for
subscription changes, and list archive.