11.04.2014 Views

Advanced MFC Programming

Advanced MFC Programming

Advanced MFC Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13. Adding Special Features to Application<br />

1) Hook can be installed to let a process intercept and process Windows messages before they reach<br />

destinations. There are several types of hooks, which include mouse hook, keyboard hook, journal<br />

record hook, journal playback hook, etc.<br />

1) A hook can be installed by calling function ::SetWindowsHookEx(…) and removed by calling function<br />

::UnhookWindowsHookEx(…).<br />

1) A DLL does not have its own memory space, instead, its variables are mapped to the memory spaces<br />

of the calling processes. To declare static variables in the DLL, we need to specify a data segment by<br />

using #pragma data_seg macro and -SECTION link option.<br />

1) To share a file or a block of memory among different processes, we need to create file mapping object.<br />

Any process that wants to access the memory must create a view of file, which will map the memory to<br />

its own address space.<br />

427

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!