I got c++ code for you, which works. Simply first create a ray, like you find in the picking example(VB/C++) that comes with the sdk, or from MVPS.org (google: improved ray picking or something)
//Check if we hit an object
//Check if we hit our model:
DWORD dwNumFaces = g_pGame->objTerrain->objMS3DModel->m_pMS3DFile->GetNumTriangles();
float fBary1, fBary2;
int intersects = 0;
//temp: get the transform:
m_combinedMat = g_pGame->objTerrain->matobject;
for( DWORD i=0; i<dwNumFaces; i++ )
vv0 = *v0;
vv1 = *v1;
vv2 = *v2;
// Check if the pick ray passes through this point
if( IntersectTriangle( vNear, vDir, vv0, vv1, vv2,
&fDist, &fBary1, &fBary2 ) )
//Transform vertex back to world space!
IntersectTriangle is simply a functions which checks if a line is going through a triangle, it's probably from gameprogrammer.com or something. (or gametutorials.com).
Now, the most important thing in this code, is that you actually use the MATRIX that was used to render the object on it's place. So, you did your rotation, scaling, translating, etc, and Multiplied it in a new matrix and then did SetTransform.
I simply used a global object for it to test, called matobject. Now, even if I scale my model, ray intersection still works.
btw: first do box intersection, if hit -> proceed triangle intersection