I'm not sure what your bullets are colliding against based on the code you've posted, but assuming your testing for collision against one or more world objects, here's the lowdown.
The way raycasting works is that it shoots an invisible laserbeam from one point to another. If the laserbeam hits something along the way, then the raycasting command will tell you. However, you have to say what that "something" is. SC_RAYCAST will check for collision against a certain object, while SC_RAYCASTGROUP will check for collision against a group of objects. These groups are defined when you use SC_SetupObject to setup your objects for collision.
As for the bullets, the answer is simple. Each loop, you'll want to recorod the position of your bullet before it moves. Then, you'll want to move the bullet forwards like you normally do. Then, you'll want to record its position again in a different set of variables. The thing to do now is to "shoot a laserbeam" from where the bullet was before it moved to where it is now. If the laserbeam hits one of your world objects, then the bullet just tried to go through a wall. If it didn't, then let the bullet keep going

. The raycasting commands will always return a 0 if the laserbeam doesn't hit anything. If it hits something, then some other number will be returned depending on the command you used.