removed a number of pointer to unsigned long casts as unsigned long is a 32 bit value on Win64.