Click here to Skip to main content
15,908,112 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSystem Tray - Dialog Please Help Pin
Sameer Maggon17-Apr-02 0:17
Sameer Maggon17-Apr-02 0:17 
GeneralRe: System Tray - Dialog Please Help Pin
Jon Hulatt17-Apr-02 3:07
Jon Hulatt17-Apr-02 3:07 
GeneralRe: System Tray - Dialog Please Help Pin
Sameer Maggon17-Apr-02 18:37
Sameer Maggon17-Apr-02 18:37 
QuestionModifying the ListBox text font size ? Pin
17-Apr-02 0:01
suss17-Apr-02 0:01 
AnswerRe: Modifying the ListBox text font size ? Pin
Roger Allen17-Apr-02 5:50
Roger Allen17-Apr-02 5:50 
QuestionHow to check individual threads for memory leaks Pin
Dave Midgley16-Apr-02 23:03
Dave Midgley16-Apr-02 23:03 
AnswerRe: How to check individual threads for memory leaks Pin
Niklas L16-Apr-02 23:56
Niklas L16-Apr-02 23:56 
AnswerRe: How to check individual threads for memory leaks Pin
Joao Vaz16-Apr-02 23:58
Joao Vaz16-Apr-02 23:58 
As the name implies TLS is synonym of thread specific data.


Use TlsAlloc on process/dll initialization, this will allocate a TLS index, then for each thread that needs specific instance data allocate some storage and pass the pointer to TlsSetValue, associating the TLS index with it.
When a thread needs to get the instance value use TlsGetValue.
Finally when all your threads are over, use TlsFree to release the Tls Index.
The nº of TLS index is limited by process to 64 on 95 ??? , 64 or 80 in 98/me and 10?? in XP, please check msdn for the correct value, I don't remember clearly

You could circumvent this if you wish by providing a pointer to a list/map of pseudo TLS indexes.





Joao Vaz
Unhappy TCL programmer
GeneralCListCtrl InsertItem Pin
Catherine16-Apr-02 22:56
Catherine16-Apr-02 22:56 
GeneralRe: CListCtrl InsertItem Pin
Niklas L16-Apr-02 23:01
Niklas L16-Apr-02 23:01 
GeneralRe: CListCtrl InsertItem Pin
Niklas L16-Apr-02 23:23
Niklas L16-Apr-02 23:23 
GeneralRe: CListCtrl InsertItem Pin
Catherine16-Apr-02 23:27
Catherine16-Apr-02 23:27 
Questionatl book? Pin
bryce16-Apr-02 22:33
bryce16-Apr-02 22:33 
AnswerRe: atl book? Pin
Christian Graus16-Apr-02 22:41
protectorChristian Graus16-Apr-02 22:41 
GeneralRe: atl book? Pin
Paul A. Howes17-Apr-02 2:28
Paul A. Howes17-Apr-02 2:28 
AnswerRe: atl book? Pin
-Dy17-Apr-02 2:57
-Dy17-Apr-02 2:57 
AnswerRe: atl book? Pin
Joao Vaz17-Apr-02 3:13
Joao Vaz17-Apr-02 3:13 
QuestionHow to get CPU and memory statistic by C/C++? Pin
yungivan16-Apr-02 21:39
yungivan16-Apr-02 21:39 
QuestionWin 2000 ??? Pin
Manikandan16-Apr-02 21:22
Manikandan16-Apr-02 21:22 
AnswerRe: Win 2000 ??? Pin
Niklas L16-Apr-02 22:13
Niklas L16-Apr-02 22:13 
GeneralRe: Win 2000 ??? Pin
Manikandan16-Apr-02 22:37
Manikandan16-Apr-02 22:37 
GeneralRe: Win 2000 ??? Pin
Niklas L16-Apr-02 22:45
Niklas L16-Apr-02 22:45 
GeneralRe: Win 2000 ??? Pin
Manikandan16-Apr-02 22:58
Manikandan16-Apr-02 22:58 
AnswerRe: Win 2000 ??? Pin
Gianfranco Lanzetta17-Apr-02 11:50
Gianfranco Lanzetta17-Apr-02 11:50 
GeneralActive Documents Pin
Nyrup16-Apr-02 20:39
Nyrup16-Apr-02 20:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.