Problem with IComponent2::IGetChildren using C++

hi,

I need to traverse an assembly using the Component2 object

...

...

    CComPtr pSwApp;
    CComPtr pSwModel;

    CComPtr pSwCfg;

    CComPtr pSwComponent;
    typedef CComPtr LPCOMPONENT2;

...

...

    int nChildren;

    pSwModel->IGetActiveConfiguration(&pSwCfg);
    pSwCfg->IGetRootComponent2(&pSwComponent);
    pSwComponent->IGetChildrenCount(&nChildren);
    LPCOMPONENT2* pChildren = new LPCOMPONENT2 [nChildren];
    pSwComponent->IGetChildren(&pChildren);

receive an error:

SldWorks::IComponent2::IGetChildren: cannot convert parameter 1 from'CSW_COM::LPCOMPONENT2 **' to 'SldWorks::IComponent2 **'

SolidworksApi macros