title: error C2440: 'type cast' : cannot convert from 'overloaded-function' to
body: <p>I have a piece of code which worked fine on a previous projet. A part of it was even copied from a working demo project and I don't know how I can have this error on a new project now.
  When compiling, I have the following error :</p>
  
  <pre><code>1&gt;d:\visual studio 2012\netsdk_poc\mfc_netsdk2\mfc_netsdk2\netsdkfunctions.cpp(33): error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'fDisConnect'
  </code></pre>
  
  <p>The code :</p>
  
  <pre><code>class CNetSDKFunctions{
  
  void __stdcall DisConnectBackCallFunc(LONG lLoginID, char *pchDVRIP, 
                                    LONG nDVRPort, DWORD dwUser)
  {
      CNetSDKFunctions* pThis = (CNetSDKFunctions*)dwUser;
      if (pThis == NULL)
      {
          ASSERT( FALSE );
          return ;
      }
      //pThis-&gt;ReConnect(lLoginID, pchDVRIP, nDVRPort);
  }
  
  BOOL CNetSDKFunctions::InitSDK()
  {
      long m_PlayerHandle;
  
      H264_DVR_GetLastError();
      H264_DVR_Init(NULL, 0);
  
              //Here it is :
      BOOL logResult = H264_DVR_Init( (fDisConnect) DisConnectBackCallFunc, (DWORD) this );
     ....
    }
  </code></pre>
  
  <p>And fDisConnect definition :</p>
  
  <pre><code>typedef void (CALL_METHOD *fDisConnect)(long lLoginID, char *pchDVRIP, long nDVRPort, unsigned long dwUser);
  </code></pre>