Figure 4: From file SampleClient.cpp — Defines the class behaviors for the application

////////////////////////////////////////////////////////////////
// CSampleClientApp initialization

BOOL CSampleClientApp::InitInstance()
{
    AfxEnableControlContainer();

    //Customized Code
   // Initialize OLE libraries
    if (!AfxOleInit())
    {
        AfxMessageBox(IDP_OLE_INIT_FAILED);
        return FALSE;
    }


    // Standard initialization
    // If you are not using these features and wish to reduce the 
    // size of your final executable, you should remove from the 
    // following the specific initialization routines you do not 
    // need.

    ...
}