you can use the dbPickObject command, probably in a similar way to what you are using it to get the object number of the object you are clicking...
You just work out a point in 3dspace from the position of your camera, and the pickvector of the object(retrieved when pickobject is called).
The below code will give you the X, Y, Z world co-ords of the place on an object that you click, that is in the range of g_iObjnum_Start and g_iObjnum_End
int iNull = dbPickObject(dbMouseX(), dbMouseY(), g_iObjnum_Start, g_iObjnum_End);
float m_iTargetX = dbCameraPositionX(CamA->ID) + dbGetPickVectorX();
float m_iTargetZ = dbCameraPositionZ(CamA->ID) + dbGetPickVectorZ();
float m_iTargetY = dbCameraPositionY(CamA->ID) + dbGetPickVectorY();
// place cube at xyz world location from xz mouse co-ords
dbPositionObject(g_iObjNum, m_iTargetX, m_iTargetY, m_iTargetZ);
If it ain't broke.... DONT FIX IT !!!