Let aside whether using quaternions makes sense in your use case, IMO your code snippet shows a construction flaw:
...
D3DXVec3TransformCoord(&forward, &forward, &matYaw); D3DXVec3TransformCoord(&right, &right, &matYaw); //Apply the yaw transformation to the relevant vectors
D3DXVec3TransformCoord(&forward, &forward, &matPitch); D3DXVec3TransformCoord(&up, &up, &matPitch); //Apply the pitch transformation to the relevant vectors
D3DXVec3TransformCoord(&right, &right, &matRoll); D3DXVec3TransformCoord(&up, &up, &matRoll); //Apply the roll transformation to the relevant vectors
OrientationMatrix *= matPitch*matYaw*matRoll; //Adjust the orientation matrix
The 3 row vectors of a rotation (row) matrix already define the side, up, and forward vectors of the local frame w.r.t. the parental frame. That means that your vectors right, forward, and up are logically part of your OrientationMatrix.
Now, you compute the new OrientationMatrix as:
OrientationMatrixn+1 = OrientationMatrixn * matPitch * matYaw * matRoll
But you compute the new vectors as:
OrientationVectorsn+1 = OrientationVectorsn * matYaw * matPitch * matRoll
That is obviously not the same when remembering that matrix multiplications isn't commutative. Hence the both orientation representations you use will be different, although logically they should be the same.

Find content
Male