1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| static UINT ThreadSocketConnexion(LPVOID pParam)
{
CMainFrame * pObject = (CMainFrame*)pParam;
if (pObject == NULL || !pObject->IsKindOf(RUNTIME_CLASS(CMainFrame)))
return 1; // if pObject is not valid
CSingleLock sLock(pObject->m_pEventSocketConnexion);
while (TRUE)
{ // Attente de l'événement m_pEventSocketConnexion
sLock.Lock();
.....
pObject->m_szVariableCString = .... fonctionne
// Mais le post de message ne passe pas ....
pObject->PostMessage(WM_FIN_CONNEXION, (WPARAM)pObject->m_bConnexionEnCours);
// de même que l'appel d'une fonction de ma classe CMainFrame comme
pObject->TRACE_VIEW(..); .....
sLock.UnLock();
}
sLock.UnLock();
return 0;
} |
Partager