I am sorry, i just copied your code from above for that function and didn't look if it is correct.
I commented in code that i don't know for some things how to obtain them.
You could put it like this for test:
D3DXCreateKeyframedAnimationSet(
dieAnimationSet->GetName(),
30.0, // for this check in 3ds max and/or exporter options on which value it was set
D3DXPLAY_ONCE,
1, // assume 1 animation in set
0, // assume no callback keys, otherwise i don't know how to obtain them
NULL,
&dieKeyFramedAnimationSet);
Then for numKeys you could try (my guess is that GetPeriod() is in seconds?):
double timeStep = dieAnimationSet->GetPeriod() / 30.0;
DWORD numKeys = std::floor(dieAnimationSet->GetPeriod() * 30);
double timePos = 0.0;
for(DWORD i =0; i < numKeys; ++i, timePos += timeStep)
{
D3DXVECTOR3 scale, transl;
D3DXQUATERNION rot;
dieAnimationSet->GetSRT( timePos, 0, &scale, &rot, &transl );
...
}
Maybie there is an easier way but i don't see one.