This paper develops a Dynamic Link Library (DLL) module that could be generally utilized by multiple programming environments for the construction of network communication. CSocket class, which is included in Microsoft Foundation Class (MFC), was adopted to develop the DLL that supports TCP and UDP protocol in visual studio 2010. The DLL was developed to construct network communication mechanism in the client/server, peer-to-peer and broadcast modes in a LAN. The realization of universal network communication DLL provides a good way to design the modularized data transfer applications in different programming environments. It can greatly raise the developing efficiency of such application projects.