If i unlock the surface first then how can i return the pointer to the
caller? I'm unlocking the surface in a different function that caller  will
call after this function.
On Thu, Dec 23, 2010 at 10:02 AM, Sriram Neelakandan <
sriram.neelakan...@gmail.com> wrote:

> well that means the surface is already locked .. u must unlock each Lock
> after usage
>
> 1. Lock
> 2. use the pointer
> 3. UnLock
>
>
> On Wed, Dec 22, 2010 at 4:31 PM, ravi <ravi...@gmail.com> wrote:
>
>> Hell,
>>            i have a function to implement that returns a pointer to an
>> array of pixels representing the
>> pixels in the specified row of the surface columns from x (inclusive) to x
>> + w
>> (exclusive), I implemented it like this......
>>
>> {  void      *data;
>>      int        pitch;
>>         surface->Lock(surface, DSLF_READ, &data, &pitch );
>>
>> return (pointer *)data + pitch*row;
>>
>> }
>>
>> running this function is aborting the program with this message......
>>
>>  DirectFBError [>surface->Lock( surface, (DFBSurfaceLockFlags)(DSLF_READ |
>> DSLF_WRITE), &data, &pitch )]: Resource is locked!
>>
>>
>>
>> --
>> Regards
>>
>> Ravi Swami
>> EnMedia Software Technologies
>> Ph +91-974-264-3747
>>
>> _______________________________________________
>> directfb-users mailing list
>> directfb-users@directfb.org
>> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>>
>>
>
>
> --
> Sriram Neelakandan
> Author - Embedded Linux System Design And Development (
> http://tinyurl.com/2doosu)
>



-- 
Regards

Ravi Swami
EnMedia Software Technologies
Ph +91-974-264-3747
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to