You have to define your own class which inherits from ID3DXAllocateHierarchy and override the 4 virtual abstract methods defined in that class. What to do in those overriden methods is beyond me, never worked with it. Maybe you can read up some documentation on MSDN.