c
const UINT64 offset = (UINT64)nXDst * dstBytesPerPixel + (UINT64)nYDst * nDstStep;
if (offset > UINT32_MAX) {
    // Handle error: offset is too large
    return FALSE;
}
const BYTE* pDstStart = &pDstData[(UINT32)offset];
