views:

307

answers:

1

Hi

I wanna send an unsigned char * over the Socket whereas the RSockt.Send has the following signature:

IMPORT_C void Send(const TDesC8 &aDesc, TUint someFlags, TRequestStatus &aStatus);

I tried to do it the following way but that gives me an error message:

Socket.Send( TPtrC8 ptr((TUint8*)charvariable), 0, iStatus);

Error #254: Type name is not allowed.

Any other suggestions?

Thanks

+2  A: 

You were close but you cannot declare a variable within an expression. Here's how:

Socket.Send(TPtrC8((TUint8*)charvariable), 0, iStatus);

Note that this assumes the unsigned char * data is zero terminated.

laalto