C2712: Unable to use __try in functions requiring decoupling of objects

I am transferring software using VC ++ 6.0 to VS 2010 / VC ++ 2010. and I have a project that does not compile in debug mode. I have:

LBSC_AppUserInfoList *          
LBSC_Session::GetUsersInfo( const LBSC_Ticket *pTicket )
{
    TSROut_GetUsersInfo sOut;
    C_Buffer            *pcbRet = NULL;
    TSRIn_TicketPar     InPar;
//...
    ClntFree( (void *)sOut.szBuffer );  // dealoca o que veio do RPC

        return( pList );
} // C2712 - Cannot use __try in functions that require object unwinding

and i don't mention __try

Can't you find?

+3
source share
1 answer

It seems that the most likely problem is that it ClntFreeis actually a macro that expands to use the SEH block __try. It seems that nothing like the surface makes sense, since macro and macro seem to be the most likely cause here.

Have you looked at the definition ClntFreeto see if it is a macro or not?

+3
source

All Articles