hi I am his friend
some additional infos:
the final Opengl matrix is m[3][4]
int arUtilMat2QuatPos( double m[3][4], double q[4], double p[3] )
{
double w;

w = m[0][0] + m[1][1] + m[2][2] + 1;
if( w < 0.0 ) return -1;

w = sqrt( w );
q[0] = (m[1][2] - m[2][1]) / (w*2.0);
q[1] = (m[2][0] - m[0][2]) / (w*2.0);
q[2] = (m[0][1] - m[1][0]) / (w*2.0);
q[3] = w / 2.0;

p[0] = m[0][3];
p[1] = m[1][3];
p[2] = m[2][3];

return 0;
}
the function above is to get the Quaternions(q[]) and the Positions(p[])

in the dll,we save the 3 rows : m[][0] , m[][1], m[][2], to a7 vectors : fromDllAxisX,Y,Z. then build the mat_Rot.The transform matrix (mat_Trans)
is to transform opengl axis to a7 axis.

In the shader, first we do
TempPos = mul(InPos, mtlMat), then
OutPos = mul(TempPos, matWorldViewProj)