Start of session-based win7 code

Had to change to session based interface after upgrade to Win7.
Untested function at this point …