warning C4267: 'argument' : conversion from 'size_t' to 'UINT32', possible loss of data.
On x64 systems your variable "len" has size_t type and takes 64 bits.