Pointers in a function, sizeof doesn't get array length
When a function takes a pointer to an array as a parameter, how do I determine the size of the array and not the pointer? This is what I mean, for a brief example:
I need the top case to work, not the bottom case. The function processes multiple arrays and I need to make sure I don't exceed the array's limit. Whether I put * or & in the front, I don't get the 16,384 I'm expecting, just 1 in the case of the * and 4 in the case of the & (the latter I'd expect since it's getting the address instead, a 32-bit value).
unsigned char RandomArray;
void TestFunction(unsigned char *ArrayPointer)
const int ArrayLength = sizeof(ArrayPointer); // * or & in front doesn't work
const int ObviousRoute = sizeof(RandomArray); // this works as expected