First the vlax-curve-getPointAtDist is probably not what you're after. You might rather want the vlax-curve-getDistAtParam and vlax-curve-getEndParam.
Next all those vlax-curve-* functions require at least one argument: the object's ename or vla reference (can be used interchangeably). I.e. the car of e. Some might require an extra argument, like the getPointAtDist would require a distance along the curve so it can return the point, or the getDistAtParam requires the param (vector index) along the curve so it can return the distance. In the last scenario you get the end of the curve from getEndParam which is then passed as the 2nd argument to getDistAtParam so you get the curve's total length.
Finally, you can then place the text using the vlax-curve-getPointAtDist (e.g. middle of curve by dividing the distance by 2). You might also want to rotate the text to follow the curve using vlax-curve-getFirstDeriv (this gives a 3d point in the direction following the curve, so you can use angle from a (0 0 0) point to convert it to radians.