I use an API that returns a windows DECIMAL type.
I need to convert it, the information I need is:
- the number of decimal place
- the value itself
For example, if my number is 1.234, I would like to get (3, 1234), for 10 (0,10) for 0.01 (2,1).
How can I extract this information from the tagDec object ?
Thanks
Given
DECIMAL d, the number of decimal places isd.scaleand the value is(d.sign?-1:1) * (double(d.Lo64) + double(d.Hi32) * double(1UL<<32) * double(1UL<<32)) * pow(10, d.scale)