Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to use message queue in windows Pin
neodeaths29-Nov-14 6:47
neodeaths29-Nov-14 6:47 
AnswerRe: how to use message queue in windows Pin
Richard MacCutchan29-Nov-14 23:24
mveRichard MacCutchan29-Nov-14 23:24 
AnswerRe: how to use message queue in windows Pin
jschell30-Nov-14 6:18
jschell30-Nov-14 6:18 
AnswerRe: how to use message queue in windows Pin
Albert Holguin1-Dec-14 3:59
professionalAlbert Holguin1-Dec-14 3:59 
QuestionImageHlp.h and DbgHelp.h in the same program Pin
Richard Andrew x6428-Nov-14 8:33
professionalRichard Andrew x6428-Nov-14 8:33 
AnswerRe: ImageHlp.h and DbgHelp.h in the same program Pin
CPallini29-Nov-14 0:04
mveCPallini29-Nov-14 0:04 
QuestionDllMain safety Pin
Richard Andrew x6425-Nov-14 11:09
professionalRichard Andrew x6425-Nov-14 11:09 
AnswerRe: DllMain safety Pin
«_Superman_»25-Nov-14 18:51
professional«_Superman_»25-Nov-14 18:51 
If you're trying to get the address of functions in the same DLL, I don't see why you need to call these APIs.
Instead you could directly get the address of the functions.

If you're trying to get the address of functions from a different module, then calling GetModuleHandle from DllMain is not safe and can deadlock because of a loader lock being acquired.

Here is a best practice guide to DLLs - Dynamic-Link Library Best Practices[^]

Here are some interesting reads with regards to DllMain -
Does creating a thread from DllMain deadlock or doesn't it?[^]
Another reason not to do anything scary in your DllMain: Inadvertent deadlock[^]
«_Superman 
I love work. It gives me something to do between weekends.


Microsoft MVP (Visual C++) (October 2009 - September 2013)

Polymorphism in C

GeneralRe: DllMain safety Pin
Richard Andrew x6428-Nov-14 8:30
professionalRichard Andrew x6428-Nov-14 8:30 
Questionc++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037225-Nov-14 9:46
Member 1123037225-Nov-14 9:46 
SuggestionRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
David Crow25-Nov-14 16:30
David Crow25-Nov-14 16:30 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 1:15
Member 1123037226-Nov-14 1:15 
AnswerRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan25-Nov-14 22:17
mveRichard MacCutchan25-Nov-14 22:17 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 1:13
Member 1123037226-Nov-14 1:13 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 2:46
mveRichard MacCutchan26-Nov-14 2:46 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 3:17
Member 1123037226-Nov-14 3:17 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 3:20
mveRichard MacCutchan26-Nov-14 3:20 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 3:44
Member 1123037226-Nov-14 3:44 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 4:11
mveRichard MacCutchan26-Nov-14 4:11 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 9:06
Member 1123037226-Nov-14 9:06 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan26-Nov-14 9:50
mveRichard MacCutchan26-Nov-14 9:50 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037226-Nov-14 23:23
Member 1123037226-Nov-14 23:23 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan27-Nov-14 0:02
mveRichard MacCutchan27-Nov-14 0:02 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Member 1123037227-Nov-14 1:19
Member 1123037227-Nov-14 1:19 
GeneralRe: c++ Windows Form app: How to grant public access to DataTable object? Pin
Richard MacCutchan27-Nov-14 1:33
mveRichard MacCutchan27-Nov-14 1:33 

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.