Click here to Skip to main content
15,867,594 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
PinnedThe C++ / CLI is for managed and mixed-mode C++ programming only Pin
Chris Maunder9-Jan-06 9:36
cofounderChris Maunder9-Jan-06 9:36 
QuestionConvert From C# to C++/CLI Pin
Paramu19731-Mar-24 14:26
Paramu19731-Mar-24 14:26 
QuestionTrying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 10:10
professionalRichard Andrew x649-Dec-23 10:10 
AnswerRe: Trying to Add System::ComponentModel Pin
Gerry Schmitz9-Dec-23 10:55
mveGerry Schmitz9-Dec-23 10:55 
GeneralRe: Trying to Add System::ComponentModel Pin
Richard Andrew x649-Dec-23 13:25
professionalRichard Andrew x649-Dec-23 13:25 
AnswerRe: Trying to Add System::ComponentModel Pin
Richard MacCutchan9-Dec-23 21:11
mveRichard MacCutchan9-Dec-23 21:11 
QuestionTreelistView c++/cli Pin
Temblor21-Aug-23 23:05
Temblor21-Aug-23 23:05 
AnswerRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 0:09
mveRichard MacCutchan22-Aug-23 0:09 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 3:57
Temblor22-Aug-23 3:57 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 4:03
mveRichard MacCutchan22-Aug-23 4:03 
AnswerRe: TreelistView c++/cli Pin
jschell22-Aug-23 6:41
jschell22-Aug-23 6:41 
GeneralRe: TreelistView c++/cli Pin
Peter_in_278022-Aug-23 17:20
professionalPeter_in_278022-Aug-23 17:20 
GeneralRe: TreelistView c++/cli Pin
Temblor22-Aug-23 20:54
Temblor22-Aug-23 20:54 
GeneralRe: TreelistView c++/cli Pin
Richard MacCutchan22-Aug-23 21:48
mveRichard MacCutchan22-Aug-23 21:48 
GeneralRe: TreelistView c++/cli Pin
jschell23-Aug-23 6:47
jschell23-Aug-23 6:47 
AnswerRe: TreelistView c++/cli Pin
Gerry Schmitz23-Aug-23 5:49
mveGerry Schmitz23-Aug-23 5:49 
AnswerRe: TreelistView c++/cli Pin
Temblor23-Sep-23 3:54
Temblor23-Sep-23 3:54 
QuestionHeap Corruption in richedit Pin
ForNow15-Jan-23 12:49
ForNow15-Jan-23 12:49 
AnswerRe: Heap Corruption in richedit Pin
Victor Nijegorodov15-Jan-23 20:26
Victor Nijegorodov15-Jan-23 20:26 
GeneralRe: Heap Corruption in richedit Pin
ForNow16-Jan-23 0:10
ForNow16-Jan-23 0:10 
Questiontrying to understand DLL and Thread local storage Pin
ForNow4-Dec-22 8:52
ForNow4-Dec-22 8:52 
AnswerRe: trying to understand DLL and Thread local storage Pin
Richard Deeming4-Dec-22 21:42
mveRichard Deeming4-Dec-22 21:42 
GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 2:40
ForNow5-Dec-22 2:40 
GeneralRe: trying to understand DLL and Thread local storage Pin
Richard Deeming5-Dec-22 4:29
mveRichard Deeming5-Dec-22 4:29 
I'm not a C++ person, but as far as I can see, the only place you write to the g_dwThreadIndex variable is in the DLL_PROCESS_ATTACH code. According to Microsoft, that means:
The DLL is being loaded into the virtual address space of the current process as a result of the process starting up or as a result of a call to LoadLibrary. DLLs can use this opportunity to initialize any instance data or to use the TlsAlloc function to allocate a thread local storage (TLS) index.
As far as I can see, that will only ever happen once per process. And the documentation explicitly says that this is the correct time to call TlsAlloc.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: trying to understand DLL and Thread local storage Pin
ForNow5-Dec-22 4:41
ForNow5-Dec-22 4:41 

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.