These are the notes that I have taken while reading a lot of technical books. The below text is straight from my notes and is not in any particular sequence:
1. MFC maps are dictionaries with key and value pairs
2. CDocTemplate = Docs + Views + FrameWindows
3. Activation is finding class objects, there are three ways of activation:
1. Object Binding - CoGetClassObject
2. Creating an instance of the class - CoCreateInstance
3. Getting the persistant object - CoGetInstanceFromFile
Activation also means finding class objects, loading the COM DLL, and starting the Server process.
There are two types of Activation:
1. In-process activation
2. Out-of-process activation
4. IClassFactory will have createInstance() and LockServer() methods
5. CoCreateInstanceEx = CoGetClassObject() + CreateInstance() + Release()
6. A Moniker is a locator object which finds/creates objects. A Display name is the textual representation of a moniker.
7. Inner class method calling:
carPlane::XCar::GetMaxSpeed();
8. AddRef() -> InterlockedIncrement()
Release() -> InterlockedDecrement()
9. Aggregation is a technique of exposing a binary subcomponent to a client
10. IUnknown is the most inportant interface in COM. All interfaces should be derived from IUnknown. It has three methods:
1. QueryInterface()
2. AddRef()
3. Release()
11. Containment: Outer object just forwards the call to the inner object.
12. Function pointer: Its an address of the entry point of the function
int (*funcCompare)(const char *, const char *)
funcCompare = strcmp; //assign to another function
(*funcCompare)("hello","hell"); //calling
13. argc and argv: int main(int argc, char* argv[]);
14. structures and unions: members of union share same memory location.
15. strutures and classes: by default members of structure are public and that of class are private.
16. typedef float balance: balance can be used interchangeably with float.
17. friend functions are for access to private and protected members of the class.
0 comments:
Post a Comment