nschessnerd 0 Posting Whiz in Training

Hi, I have the following managed c++ code:

DWORD addr=(obj.addresshigh*0x10000)+obj.addresslow;

and i use this address to read memory in a program.. However I noticed it was crashing because it's adding wrong.
Ie:
obj.addresshigh=4006
obj.addresslow=d6b4

however addr ends up as 4005d6b4

the weird thing is this doesnt always happen, only randomly.
I got the above values from a breakpoint immediately above that line.... does anyone have any clue about why it does this?

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.