LPSLDWORKS from CComPtr<ISldWorks>

I am adjusting my VC 6.0 code for VS 2005. I have used the LPSLDWORKS pointer all along and want to make minimal changes to my existing code so that I can use the same code base for both. Can anyone suggest an elegant way to arrive at a LPSLDWORKS pointer from a CComPtr pointer?

Deelip MenezesSolidworksApi macros