I dont have DGSDK but if the command has the same params as INTERSECT OBJECT from DBP, then;
The first number specified isnt the object the ray is being sent from/to at all, it is instead the object that the ray is checking for intersection with. In other words, this is the object that the system checks to see if any of it's normals or verts pass through the next 6 params.
The next 3 params are the X,Y,Z of the starting point of the ray, and the 3 params after that are the ending points of the ray.
What is returned is the distance, not a true or false value, to the itnersection point from the starting X,Y,Z coords of the ray.
So, if you wanted to check if a sphere object went in between a player and 100 units infront of the player, and the sphere's ID was 7, you'd use these params;
7, PlayerX, PlayerY, PlayerZ, XCheck, YCheck, ZCheck
Where X,Y and Z Check are the positions 100 units infront of the user. This would then return the distance to the closest intersection point, so if the sphere intersected twice, the distance returned would be the distance to the side of the sphere facing the user.
When people use this command for sliding collision/any collision detection purposes, they usually cast the ray from the player's old positions the the player's new positions, checking for either 1 main map object or using a for/next loop to check for an assortment of objects at once. This way, even if the user is going so fast that they would eseentially not run into the wall (since moving an object is really just positioning an object), an intersection will still be picked up. (eg if theres a wall 10 units infront of the user, and the user moves forward 100 units in 1 loop, a distance of 10 will be returned. Using this value, you can move the user backwards by their speed minus the distance, in this case 90 units, positioning them at the point of intersection (though you may also decide to add on half the user's z scale or some other factor like that to the backward movement so as to avoid having half of the object going through the wall).
I can write up some DBP code for you explaining the command more, but Im not sure if you can compile that or not with DGSDK (like I said Ive not used it before but Im assumming you'd have to convert all of the commands to dbCommandName(), and fix the variable definitions to be proper to tandard C++)
Hope its been of some help,
- RUC'