First you need to allocate enough memory to contain the fixed-size parts and the filename:
size_t uri_size = strlen(filename) + 1;
size_t param_size = sizeof(OMX_PARAM_CONTENTURITYPE) + uri_size - 1;
OMX_PARAM_CONTENTURITYPE * param = malloc(param_size);
adding 1 to include the termination character, and subtracting 1 because the structure already contains an array of one byte.
In C++, you'll need a cast, and you should use a smart pointer or a vector for exception safety:
std::vector<char> memory(param_size);
OMX_PARAM_CONTENTURITYPE * param =
reinterpret_cast<OMX_PARAM_CONTENTURITYPE *>(&memory[0]);
Then you can fill in the fields:
param->nSize = param_size;
param->nVersion = whatever;
memcpy(param->contentURI, filename, uri_size);
and don't forget to free(param)
once you've finished with it.