How to convert a double to a C# decimal in C++?
See the question and my original answer on StackOverflowWhat about using VarR8FromDec Function ?
EDIT: This function is declared on Windows system only. However an equivalent C implementation is available with WINE, here: http://source.winehq.org/source/dlls/oleaut32/vartype.c