DWORD is unsigned long on 32bit builds, and unsigned int on 64bit. There is no correct printf format string.
What? No it's not, it's unsigned long everywhere. %lu is correct. (%ld is not really correct, but it works regardless.)
Oh, my mistake, this is Unix side code. Yes, we need to cast to unsigned int. Or, perhaps better, define the function with unsigned int instead of DWORD.