ApplyTransform error

I have the code below trying to detect the intersection points between 2 curves in a drawing document:

//this return the selection point of one curve but could be related to the error

CComPtr pDispatch;

CComPtr swMathTransform;

hr=swSketch->get_ModelToSketchTransform(&swMathTransform);

CComPtr swMathUtility;

iSwApp->GetMathUtility(&pDispatch);

hr = pDispatch->QueryInterface(__uuidof(IMathUtility), reinterpret_cast(&swMathUtility));

pDispatch=NULL;

hr=swMathUtility->CreatePoint(m_Point1, &pDispatch);

CComPtr swMathPoint;

hr = pDispatch->QueryInterface(__uuidof(IMathPoint), reinterpret_cast(&swMathPoint));

pDispatch=NULL;

hr=swMathPoint->MultiplyTransform(swMathTransform,&pDispatch);

swMathPoint=NULL;

hr = pDispatch->QueryInterface(__uuidof(IMathPoint), reinterpret_cast(&swMathPoint));

// ok up to this!

..............

hr=pCurve2->ApplyTransform(swMathTransform);

hr=pCurve1->ApplyTransform(swMathTransform);

hr=pCurve1->IIntersectCurveSize(pCurve2,pStartPointIntersectionArray,pEndPointIntersectionArray,pOtherStartPointIntersectionArray,pOtherEndPointIntersectionArray,&retval);

hr return S_FALSE for ApplyTransform for curve 1 and curve 2. What is wrong?

SolidworksApi macros