Utilities of Serialization

Serialization is the process of reading or writing an object to or from a stream. Serialization is used in many areas in many ways.

  1. Application can save the state of one or more objects. State attributes are again retrieved in the opposite way as it was saved.
  2. Application can maintain the state of the objects used even after application is terminated.
  3. An IDE editor or any other editor application can maintain the state of toolbar, menu items, settings etc using Serialization.
  4. Applications uses project file which is a single file to maintain a list of files used at one time. Serialization can be used to maintain the path of individual. files used in the project and their corresponding settings.
  5. Drawing application can save the array of vector drawing objects in a single file as drawing file.
  6. Database application can use Serialization to save a number of records in a data file.
  7. Application uses socket to communicate to other applications or applications in remote system. Serialization can be used with CSocket file to transmit and receive objects over network.
  8. Serialization can be used to transmit/receive the object over serial port or other communication channel.

About our authors: Team EQA

Further readings

Where is WinMain() function in MFC application ?

MFC hides WinMain in its framework and includes source file on WinMain(). This explains how framework calls global CWinApp::Initinstance() from entry WinMain.

What is the utility of CWinApp class?

This is constructed during global C++ objects are constructed and is already available when Windows calls the WinMain function, which is supplied by the ...

Basic steps in Win32 GUI Application with source code.

Define a custom Window class structure, Register the class name, CreateWindow, Show windows and write message get and dispatch loop statements. Define the Window CallBack procedure and write the handlers.

What is a Window CallBack procedure and what is its utility?

DispatchMessage() is a API which indirectly triggers the Window CallBack procedure. Message structure members from this function are passed to the CallBack procedure. CallBack procedure should implement event handlers depending on the need of the application.

What are LPARAM and WPARAM in window proc function?

LPARAM and WPARAM are the two parameters in Window CallBack procedure. They signifies parameters of various events. They are used in handing individual events.

What are the basic steps of a typical MFC based application?

We need to write WinMain and need to follow all these in a Win32 application. However we need not to write much if we are writing an application with MFC ...

#