Usually, calling a function with data of different size is done by giving the size as a function argument:

void foo(int size,char *data)
{
...
}

...
foo(sizeof(LargeStruct),&MyStruct);