strtoulW won't do what you want on 32-bit platforms.
looks like even 64-bit windows (at least win10) errors if anything but DWORD-size is passed in. and it fails on overflow if Content-Length exceeds sizeof(DWORD). i'll update and resend
thanks daniel