关键词:内存映射文件;进程通信;MFC
Application and Research of Memory-mapped Files in Process
Abstract
With the development of computer operating system, multi-task process has been used more widely. In order to accelerate the application of the operation, it often creates a number of processes in the system. These processes cooperate to accomplish a common task, often exchanging information and data transfer in the process
Windows offers a variety of mechanisms for enabling the applications to share data and information quickly and easily. These mechanisms include the RPC, COM, OLE and DDE, information window (especially WM_COPYDATA), the clipboard, mailboxes, pipes and sockets. These mechanisms are used memory mapping file in the Windows system. The memory-mapped file is used in these mechanisms of windows. The memory-mapped file is the lowest level on the single computer for sharing data mechanism. If the processes that are communicating with each other are all in the same machine, the system will acquire higher function with smaller expense by using the memory-mapping file to share data.
This paper discusses the basic principles and the methods of the memory-mapped files mainly. We will explore and study how to use memory-mapped files for complete inter-process data sharing by using MFC in Visual C ++. An example is given.
Key words: Memory-mapped files; Process communication; MFC