I managed to store the stirng as MAYA string, but the connection variable is uniqe to MFC (uses socket for connection) so it is a different case. I tryied the connection a global var in the plug-in and it didn't work either. Any idea?