Click here to Skip to main content
15,885,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there!

I need to take differents types of data, like:

int n = 12; //plus
short int n1 = 255; //plus
unsigned char b = 4; //plus
unsigned short w = 1600;
std::string str = "SR_protocol";


put all togheter in a CComSafeArray<BYTE>, and convert it to send in a COM object (OPC), like:

CComSafeArray<BYTE> saByteArray;
CComVariant varArrayWrapper(saByteArray);
VARIANT *vSendMSG = NULL;
varArrayWrapper.Detach(vSendMSG);


But I don't know how to do it.. help me please
Posted
Updated 3-Feb-10 10:54am
v2

1 solution

format it as XML and send the whole struct as a string ?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900