Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
We recommend using Visual Studio 2017

AfxNetInitModule

 

For MFC Sockets support from a regular DLL that is dynamically linked to MFC, add a call to this function in your regular DLL's CWinApp::InitInstance function to initialize the MFC Sockets DLL.


void AFXAPI AfxNetInitModule( );

The MFC Sockets DLL is an extension DLL; in order for an extension DLL to get wired into a CDynLinkLibrary chain, it must create a CDynLinkLibrary object in the context of every module that will be using it. AfxNetInitModule creates the CDynLinkLibrary object in your regular DLL's context so that it gets wired into the CDynLinkLibrary object chain of the regular DLL.

Requirements

Header: <afxdll_.h>

Show: