0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
Run-Time Type Information is a mechanism that allows the type of an object to be determined during the program execution.
3 main elements to RTTI in MFC are

1.Dynamic_cast operator
Used for conversion of polymorphic types.
2.typeid - used for identifying the exact type of an object
3. type_info class
used to hold the type information returned by typeid.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
Searialization is the process of streaming the object data to or from a persistent storage medium. It's useful in Doc-View Architecture. CObject :: Serialize() function is used to do serialization.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
2 types of thread in MFc are UserInterface thread and worker thread. UserInterface threads maintain the message loops and used to handles user input,creates windows and process messges sent to those windows.Worker thread don't use message loops and mainly used to perform background operations such as printing etc.,Created using AfxBeginThread bypassing ThreadFunction to create worker thread and Runtime class object to create a user interface thread.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
Mutex as the name suggest allows a mutullay exclusive access to a shared resource among the threads. Critical section is a piece of code that can be executed safely to be accessed by two or more threads. Criticalsection provides synchronization means for one process only, while mutexes allow data synchronization across processes. Means two or more threads can share the common resources among more than one application or process boundaries in mutex.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
A "socket" is an endpoint of communication: an object through which your application communicates with other Windows Sockets applications across a network.The two MFC Windows Sockets programming models are supported by the following classes: CAsyncSocket and CSocket
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
Consider a server application that is listening on a specific port to get data from clients. In synchronous receiving, while the server is waiting to receive data from a client, if the stream is empty the main thread will block until the request for data is satisfied. Hence, the server cannot do anything else until it receives data from the client. If another client attempts to connect to the server at that time, the server cannot process that request because it is blocked on the first client. This behavior is not acceptable for a real-world application where we need to support multiple clients at the same time.

In asynchronous communication, while the server is listening or receiving data from a client, it can still process connection requests from other clients as well as receive data from those clients. When a server is receiving asynchronously, a separate thread (at the OS level) listens on the socket and will invoke a callback function when a socket event occurs. This callback function in turn will respond and process that socket event.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
MFC is a wrapper around win32 API, It provides classes which uses the win32 API, Some of the API's we usually work with are : GetDlgItemInt,GetDlgItemText,GetWindowTextA,Messag eBoxA,CreateFile,CreateMutex,CreateEvent,WaitForSi ngleObject,CreateWindow,ShowWindow etc.,
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
ANSI code represents 8bytes data where UNICODE represents 16bytes data for supporting universal languages. One major draw back to ASCII was you could only have 256 different characters. However, languages such as Japanese and Arabic have thousands of characters. Thus ASCII would not work in these situations. The result was Unicode which allowed for up to 65,536 different characters
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
Regular dlls wraps only the c/c++ functions. Where extention dlls include c++ interfaces where we can create the objects of it and use in our classes. Extended dlls support object oriented concepts.Regural dlls uses mfc internally and exported functions can be used by any mfc or non-mfc applications.Extention dlls implements reusable classes derived from mfc library,built using dll version of mfc.Only mfc executables(applications/dll-shared version of mfc) can use extention dlls.extention dlls used for passing mfc derived objects b/w applications and dlls. Regulardlls linked both statically and dynamically but extended dlls links dynamically.
0
rajeswaridvssnr's Avatar, Join Date: Oct 2006
Go4Expert Member
MessageMap is a logical table that maps the windows messages to the member functions of the class. We use message maps over virtual function because of lots of overhead. If every windows message had a virtual function associated with it , there would be several hundred bytes per window class of vtable. Message maps means we only pay for the messages we use.

Last edited by rajeswaridvssnr; 1Nov2006 at 18:21..