2009. 2. 20. 12:46
AfxOleLockApp and AfxOleUnlockApp
2009. 2. 20. 12:46 in 3. Implementation/MFC
The Microsoft Foundation Class Library provides additional facilities for
controlling application behavior when external clients have references to the
application's objects. Besides maintaining a count of references to each object,
servers maintain a global count of active objects. The global functions AfxOleLockApp and AfxOleUnlockApp update the
application's count of active objects. If this count is nonzero, the application
does not terminate when the user chooses Close from the system menu or Exit from
the File menu. Instead, the application's main window is hidden (but not
destroyed) until all pending client requests have been completed. Typically,
AfxOleLockApp and AfxOleUnlockApp are called in the constructors
and destructors, respectively, of classes that support Automation.
FROM : MSDN