Click here to Skip to main content
15,910,981 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralDebug vs Release version Pin
21-May-02 22:44
suss21-May-02 22:44 
GeneralRe: Debug vs Release version Pin
Wolfram Steinke21-May-02 23:36
Wolfram Steinke21-May-02 23:36 
GeneralRe: Debug vs Release version Pin
Alexandru Savescu22-May-02 0:13
Alexandru Savescu22-May-02 0:13 
GeneralRe: Debug vs Release version Pin
Jason Hooper22-May-02 0:54
Jason Hooper22-May-02 0:54 
GeneralRe: Debug vs Release version Pin
22-May-02 6:05
suss22-May-02 6:05 
QuestionHow can I directly access image data in a CImgEdit-Control? Pin
Ice-T.Polarbear21-May-02 22:39
Ice-T.Polarbear21-May-02 22:39 
QuestionMutex? Pin
21-May-02 22:36
suss21-May-02 22:36 
AnswerRe: Mutex? Pin
Prem Kumar21-May-02 22:40
Prem Kumar21-May-02 22:40 
GeneralRe: Mutex? Pin
Deian21-May-02 22:48
Deian21-May-02 22:48 
GeneralRe: Mutex? Pin
jan larsen21-May-02 23:56
jan larsen21-May-02 23:56 
AnswerRe: Mutex? Pin
markkuk22-May-02 0:16
markkuk22-May-02 0:16 
GeneralPrinting under PocketPC... Pin
21-May-02 21:52
suss21-May-02 21:52 
GeneralVOICE/FAX/DAT MODEM Pin
21-May-02 21:21
suss21-May-02 21:21 
GeneralChanging IP Address programmatically Pin
Kannan Kalyanaraman21-May-02 21:21
Kannan Kalyanaraman21-May-02 21:21 
GeneralRe: Changing IP Address programmatically Pin
Kannan Kalyanaraman21-May-02 21:29
Kannan Kalyanaraman21-May-02 21:29 
Generalchar Pin
Mazdak21-May-02 21:13
Mazdak21-May-02 21:13 
GeneralRe: char Pin
Martin Speiser21-May-02 21:58
Martin Speiser21-May-02 21:58 
GeneralRe: char Pin
Mazdak22-May-02 1:08
Mazdak22-May-02 1:08 
GeneralRe: char Pin
Prem Kumar21-May-02 22:36
Prem Kumar21-May-02 22:36 
GeneralRe: char Pin
Alexandru Savescu22-May-02 0:06
Alexandru Savescu22-May-02 0:06 
GeneralUsing resources in static libraries Pin
SevereHammer21-May-02 20:29
SevereHammer21-May-02 20:29 
GeneralRe: Using resources in static libraries Pin
Martin Speiser21-May-02 22:43
Martin Speiser21-May-02 22:43 
GeneralGlobal hook performance... Pin
Dana Holt21-May-02 19:01
Dana Holt21-May-02 19:01 
I am working on a project that requires a global hook.

I only need to process a single message (WM_ACTIVATE), and I am using a WH_CALLWNDPROCRET type hook.

Basically if I get this message I fire off another thread in the DLL that runs at THREAD_PRIORITY_LOWEST that modifies some of the window's styles.

Anyway, when the hook is running taskmgr takes about 30% - 40% of the CPU time with nothing else going on. I assume this is from processing the messages because moving the mouse quickly increases this to 50% - 60%. The first thing I do in the hook is check if it is the message I want, and if it is not I call the next hook.

I am also checking for nCode < 0 and calling the next hook without executing mine if this is true.

Can anyone tell me what the best performance hook is? I think it is weird that the hook causes that much CPU usage in taskmgr.

Oh, yes I am using DisableThreadLibraryCalls() for each process that uses the DLL.

Thanks!

--
Dana Holt
Xenos Software
GeneralRe: Global hook performance... Pin
Alex Cramer21-May-02 19:56
Alex Cramer21-May-02 19:56 
QuestionSCSI Commands and VC++? Pin
chen21-May-02 18:15
chen21-May-02 18:15 

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.