Drive numbers are reported by Windows in the order that the BIOS enumerates them. Most BIOSes will enumerate a chip's individual drives first (i.e. the build-in IDE/SATA drives), then any RAID or AHCI volumes, then any add-in cards.
Windows NT/2K/XP/Vista/Server2000/Server2003/Server2008 doesn't care what the reported drive order is, the drive letters are kept by Windows in the registry, and are independent of the BIOS's drive ID assignment. This is unlike previous versions of Windows (95/98/ME) where the first drive reported by the BIOS was assigned as the C: drive.
The above is an old post I found, but I'll look into it a little more.
It should not matter if your C drive is 0 or 1. Why don't you change the code in your program to detect the RAID no matter what the drive number is? I am a computer programmer, so I might be able to help. What language did you program the software in?
Just to understand:
When the OS boots, PnP will ask the bus-drivers to "walk the bus" and report back all devices it sees. Then an "object" is created for each device in the sequence it is reported.
So the first drive reported will get number 0, the second reported will get number 1 and so on.
The sequence can change when you have added hardware to your system which is reported before your original disk (this is the driver reporting to PnP upon boot time)
And the sequence can change when you upgrade a driver (again the driver is reporting it to PnP, so whoever is writing the driver can change the sequence and therefore influence the numbering)
This probably doesn't really answer your question, but I hope this will help you understand physical drive numbering.