Another version of parksies function:
PHP Code:
// add this include
#include <ctype.h>
// and for debug purposes
#include <assert.h>

BOOL is_drive(char letterunsigned long drives) {
    
assert(isalpha(letter));
    return 
drives & (<< (toupper(letter) - 'A'));

I'm pretty sure that left shift is right, but you must try. If it doesn't work correctly, try
0x80000000 >> (toupper(letter) - 'A')
or stick to parksies way.