you also can use ins.write:
{
    ins.write( reinterpret_cast< const char* >( &value ), sizeof( UINT32 ) );
    return value;
}