《深度探索C++物件模型》P.233 L.-2: 一個由程式員定義的 destructor 被擴充的方式類似 constructor 被擴充的方式,但順序相反:1. 如果 object 內帶一個 vptr,那麼首先重設 (reset) 相關的 virtual table; If the object contains a vptr, it is reset to the virtual table associated with the class.2. destructor
You can get the decorated form of a function name after you compile the source file that contains the function definition or prototype. To examine decorated names in your program, you can do one of the following:Use a listingUse the DUMPBIN toolYou
Occasionally, an application needs to examine the contents of a thread's message queue from outside the thread's message loop. For example, if an application's window procedure performs a lengthy drawing operation, you may want the user to be able
This note describes the use of the CWnd::PostNcDestroy method. Use this method if you want to do customized allocation of CWnd-derived objects. This note also explains why you should use CWnd::DestroyWindow to destroy a C++ Windows object instead of
File mapping can be used to share a file or memory between two or more processes. To share a file or memory, all of the processes must use the name or the handle of the same file mapping object.To share a file, the first process creates or opens a
A Remote Desktop Services server has multiple namespaces for the following named kernel objects: events, semaphores, mutexes, waitable timers, file-mapping objects, and job objects. There is a global namespace used primarily by services in
There are two ways to create an import library given a .DLL:Create a .DEF file for use with the LIB /DEF: command.Stub out functions, and use the .OBJ files created to mimic the import/export relationships. Then use the LIB /DEF: command to create
When you create BSTRs and pass them between COM objects, you must take care in treating the memory they use in order to avoid memory leaks. When a BSTR stays within an interface, you must free its memory when you are done with it. However, when
#include <cstdio> int main(){ int foo = 5; void* p = NULL; printf_s("Address of foo is 0x%p. /r/n", &foo); // 0x0012FF60 p = &(++foo); printf_s("Address of ++foo is 0x%p. /r/n", p); // 0x0012FF60 p = &(--foo);