Click here to Skip to main content
16,005,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: lets continue the same discussion Pin
toxcct8-Oct-07 3:11
toxcct8-Oct-07 3:11 
GeneralRe: lets continue the same discussion Pin
Nemanja Trifunovic8-Oct-07 2:57
Nemanja Trifunovic8-Oct-07 2:57 
AnswerRe: union and struct Pin
ShilpiP8-Oct-07 1:52
ShilpiP8-Oct-07 1:52 
Questionpointers Pin
KASR17-Oct-07 23:46
KASR17-Oct-07 23:46 
AnswerRe: pointers Pin
Maxwell Chen8-Oct-07 0:12
Maxwell Chen8-Oct-07 0:12 
AnswerRe: pointers Pin
Hamid_RT8-Oct-07 0:31
Hamid_RT8-Oct-07 0:31 
Questionabout thread memory space Pin
DSPCottage7-Oct-07 22:22
DSPCottage7-Oct-07 22:22 
AnswerRe: about thread memory space Pin
Matthew Faithfull7-Oct-07 23:03
Matthew Faithfull7-Oct-07 23:03 
Gut Mikh Tappe wrote:
thread memory space


Hmm, under Windows the only Thread specific Memory Space is Thread Local Storage (TLS) which is already protected and can't be over written by other threads without some knowledge and some assembly code. Each thread has it's own stack so you don't need to worry about anything stack based. Heap memory, allocated with new, is shared and this you do need to protect. There's no single or simple way to do this, you need to manually keep track of all objects ( I hope your code is OO ) shared between threads. Each of these objects needs protecting using relevant Synchronisation Objects, sometimes called Synchronisation Primitives. Critical Sections, Mutexes, Events, Semaphores and Completion Ports. There is an extensive Synchronisation section of the Win32 API which you can use to create, lock, unlock and free these objects which are implemented by the Windows Kernel. If you use a framework like MFC some or all of these objects may be provided with easy to use wrappers along with useful classes like stack based Mutex Locks. I hope this is enough to get you started.

Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: about thread memory space Pin
DSPCottage8-Oct-07 1:35
DSPCottage8-Oct-07 1:35 
AnswerRe: about thread memory space Pin
chandu0048-Oct-07 2:00
chandu0048-Oct-07 2:00 
QuestionHow to get Quit Event from WORD? Pin
PhanMinhDuy7-Oct-07 21:37
PhanMinhDuy7-Oct-07 21:37 
Questiontransfer to login page Pin
Rafiuddinmd7-Oct-07 21:21
Rafiuddinmd7-Oct-07 21:21 
QuestionRe: transfer to login page Pin
Nelek7-Oct-07 21:36
protectorNelek7-Oct-07 21:36 
QuestionRe: transfer to login page Pin
David Crow8-Oct-07 3:51
David Crow8-Oct-07 3:51 
AnswerRe: transfer to login page Pin
Iain Clarke, Warrior Programmer8-Oct-07 6:46
Iain Clarke, Warrior Programmer8-Oct-07 6:46 
Questionmutual connection class Pin
JesusLeFou1327-Oct-07 21:03
JesusLeFou1327-Oct-07 21:03 
AnswerRe: mutual connection class Pin
Roger Broomfield7-Oct-07 21:09
Roger Broomfield7-Oct-07 21:09 
AnswerRe: mutual connection class Pin
Cedric Moonen7-Oct-07 21:16
Cedric Moonen7-Oct-07 21:16 
GeneralRe: mutual connection class Pin
JesusLeFou1327-Oct-07 21:58
JesusLeFou1327-Oct-07 21:58 
QuestionHow to add a page in the mouse of the control panel ? Pin
nike_zzyun7-Oct-07 20:38
nike_zzyun7-Oct-07 20:38 
AnswerRe: How to add a page in the mouse of the control panel ? Pin
Hamid_RT7-Oct-07 21:21
Hamid_RT7-Oct-07 21:21 
GeneralRe: How to add a page in the mouse of the control panel ? Pin
nike_zzyun7-Oct-07 21:40
nike_zzyun7-Oct-07 21:40 
QuestionErrors about #import. Help me. Pin
kcynic7-Oct-07 17:46
kcynic7-Oct-07 17:46 
AnswerRe: Errors about #import. Help me. Pin
ShilpiP7-Oct-07 22:42
ShilpiP7-Oct-07 22:42 
GeneralRe: Errors about #import. Help me. Pin
kcynic7-Oct-07 23:20
kcynic7-Oct-07 23:20 

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.