I have a dll that the user must pass a pointer to an array. I want to find the upper bound of the array but the following code returns the wrong number while inside the dll function:
I thought about letting user pass the number as an argument, but I would rather not do that as it would cause potentially not detected errors in the return values. Any idea how I can find the bounds of an array from a pointer to that array while inside my dll?