Thursday, February 19, 2009

How InitializeCriticalSection works!!! [WinCE]

This api Initializes a critical section object.
It will take the critical section object and initialize the member of the object with null then will call function CreateCrit which will again take the parameter as the critical section object and in the function it will check for the process trust level and then if it fulfill the trust level then if the object is equal to 1 then will map the critical section object to the base address of process VM base.
Now it verify the valid kernel pointer for the critical section's cric member.
After than it will call EnterCriticalSection on the global critical section object and then will do traversing to find in which location to save the new critical section object using linked list data structure.
When it will find the exact location then it will save there and then will call leave global critical section object (NameCS).
Note - This is for WCE5.0.

No comments:

Post a Comment

Please add your valuable feedback and suggestion...

Note: Only a member of this blog may post a comment.