Your question doesn't make sense to me. Does getRanges return a pointer to an array? If it does, you can't get the length of the array from a pointer. Typically you'd use output parameters when more than one return value is needed.