Unfortunately this method has a few bugs. 

If the DWORD is anything above `0x7FFFFFFF` it will be a negative value but this algorithm only accounts for `0xF______` unless the DPS says that what it would be for negative values (non standard two's compliment integer).

This would probably work better (untested)
```python
int(h, 16) if int(h,16) < int('0x80000000', 16) else (-int('0xffffffff', 16)+int(h,16)-1)
```