First public contribution.
5 /** @fn Pls(const TUid& aLibraryUid, TInt (*aInitFunc)(T*) = 0)
6 @return Pls() will always return a non-NULL value.
7 If Pls() fails to allocate memory, it will panic rather than returning NULL.
8 The risk of such a panic is minimal due to the allocation of Windows OS memory for the Pls object (which is effectively unlimited) rather than memory from the Emulator.
10 A templated function that is used by a library (DLL) that requires to use
12 The function returns the PLS (Process Local Storage) object of the specified library,
13 for the current process. If the PLS object doesn't yet exist then it is allocated,
14 initialised, stored and returned.
15 The template type T is the type of the PLS object, and is supplied by the caller.
17 Takes as a parameter the TUid of the library DLL whose PLS is to be returned for the
18 current process. It also takes as a parameter a pointer to a (non-leaving, non-panicing)
19 initialisation function defined by the caller which takes a pointer to T (i.e. the
20 PLS object) as a parameter and returns one of the system wide error codes as a TInt.
21 This parameter is optional but it should be used when necessary to ensure that if Pls()
22 requires to create a PLS object then the object is completely initialised on its return.
23 The initialisation function is called after the PLS object has been allocated and its
24 constructor called if it is an instance of a class - neither the constructor nor the
25 initialisation function should call Pls().
27 Returns a pointer to the PLS object