Referenced structure not 'sticking'
I am currently porting a lot of code from an MFC-based application to a DLL for client branding purposes.

I've come across an unusual problem. This bit of code is the same in both systems:

    // ...
      	CCommsProperties props;
      
       	pController->GetProperties( props );
       	if (props.handshake != HANDSHAKE_RTS_CTS) 
       	{
      		props.handshake = HANDSHAKE_RTS_CTS;
      		pController->RefreshCommProperties( props );
       	}
       
    // ... in another file: 
    void CControllerSI::RefreshCommProperties ( const CCommsProperties& props )
    {
    	// ... code ...
    }

CommProperties is a wrapper for the comm settings, serialization etc. and ControllerSI is a layer between the actual Comms and the Application.

On the original MFC version the setting of handshake to RTS-CTS sticks but when running as the DLL version it resets itself to 0 as soon as the function is entered.

The main differences between the original and the new modules is the variables that call the various dialogs have been removed and the removed #includes

I've lost an afternoon to this and I don't really want to lose any more...

Referenced structure not 'sticking'
===

I am currently porting a lot of code from an MFC-based application to a DLL for client branding purposes.

I've come across an unusual problem. This bit of code is the same in both systems:

    // ...
      	CCommsProperties props;
      
       	pController->GetProperties( props );
       	if (props.handshake != HANDSHAKE_RTS_CTS) 
       	{
      		props.handshake = HANDSHAKE_RTS_CTS;
      		pController->RefreshCommProperties( props );
       	}
       
    // ... in another file: 
    void CControllerSI::RefreshCommProperties ( const CCommsProperties& props )
    {
    	// ... code ...
    }

CommProperties is a wrapper for the comm settings, serialization etc. and ControllerSI is a layer between the actual Comms and the Application.

On the original MFC version the setting of handshake to RTS-CTS sticks but when running as the DLL version it resets itself to 0 as soon as the function is entered.

The main differences between the original and the new modules is the variables that call the various dialogs have been removed and the removed #includes

I've lost an afternoon to this and I don't really want to lose any more...
