There is a whole thread about it. It depends on who you race against and whether you finish in front of people with a higher rating than you. The theory is that the number on your car door correlates to what position the game thinks you belong in. If you finish higher than that you should gain points.
I can't find that thread anymore :/
Yet if you have one A level driver in the room and the rest B to D, I guess easy win for the A level, but no points I would think. If you're D level in a room with all A to B, you can't lose any points.
Some people game the system though by lowering their DR for easier wins. They will effect your rating as well unfortunately. If you keep driving normally you should end up with good competition, however the pool of SR.S drivers is quite small. Outside prime time I always get matched with S to D while I am B level. I guess it's safer when everyone is spread out like that... In the 10 lap races most people don't make it to the finish before the time runs out :/