Groups > Symbian > Symbian general discussion > Re: assign unsigned char pointer with HBufC8




Re: assign unsigned char pointer with HBufC8

Re: assign unsigned char pointer with HBufC8
Fri, 27 Oct 2006 13:51:59 +020
"Yuri Bulava" <Yuri.Bulava@mainconcept.ru> wrote in message 
news:ACkpG$Z%23GHA.2096@UKCOL01WWEB01.symbian.intra...
> hi all,
>
> how can i assign valid pointer with HBufC8 *pBuff (or TBuf8, or TDes8), 
> wich does't have been allocated before.
>
> i have interface method GetBuffer(CONSUMERINFO *pInfo);
> wich give to me valid pointer (unsigned char * , was allocated in 
> application), now i need to use this valid pointer inside my DLL, but 
> RSocket class in Recv method want TDes8 descriptor... and that's why i 
> need to fine a way to assign my TDes8 descriptor with valid unsigned char*

> pointer.

Easiest to do this would be by putting the unsigned char* and the 
bufferlenght in a TPtr8.


-- 
Sander van der Wal
www.mBrainSoftware.com 

Post Reply
assign unsigned char pointer with HBufC8
Fri, 27 Oct 2006 15:10:27 +070
hi all,

how can i assign valid pointer with HBufC8 *pBuff (or TBuf8, or TDes8), 
wich does't have been allocated before.

i have interface method GetBuffer(CONSUMERINFO *pInfo);
wich give to me valid pointer (unsigned char * , was allocated in 
application), now i need to use this valid pointer inside my DLL, but 
RSocket class in Recv method want TDes8 descriptor... and that's why i 
need to fine a way to assign my TDes8 descriptor with valid unsigned 
char* pointer.

-- 
Post Reply
Re: assign unsigned char pointer with HBufC8
Mon, 30 Oct 2006 10:12:47 +060
Sander van der Wal wrote:
> "Yuri Bulava" <Yuri.Bulava@mainconcept.ru> wrote in message

> news:ACkpG$Z%23GHA.2096@UKCOL01WWEB01.symbian.intra...
> 
>>hi all,
>>
>>how can i assign valid pointer with HBufC8 *pBuff (or TBuf8, or TDes8),

>>wich does't have been allocated before.
>>
>>i have interface method GetBuffer(CONSUMERINFO *pInfo);
>>wich give to me valid pointer (unsigned char * , was allocated in 
>>application), now i need to use this valid pointer inside my DLL, but 
>>RSocket class in Recv method want TDes8 descriptor... and that's why i 
>>need to fine a way to assign my TDes8 descriptor with valid unsigned
char* 
>>pointer.
> 
> 
> Easiest to do this would be by putting the unsigned char* and the 
> bufferlenght in a TPtr8.
> 
> 
thanks for advise, now all just fine ;)

-- 
Post Reply
about | contact