Solved

COleCurrency::ParseCurrency()

Posted on 1997-08-26
1
262 Views
Last Modified: 2013-11-20
Why does COleCurrency::ParseCurrency fail when I have the Swedish Regional settings ?
It seems to be a problem when I have a dot as thousand sign and a comma as a decimal sign at the same time.
Regards, torbjorn.berglund@reterm.se
0
Comment
Question by:tberglund
1 Comment
 
LVL 1

Accepted Solution

by:
kargo earned 500 total points
ID: 1304939
The COleCurrency::ParseCurrency function uses a function in OleAuth32.dll that is supposed to convert OLE types from something to something else.  In this case the conversion if from OLESTR to CURRENCY.  There is a bug in the VarCyFromStr(() function which is used in that conversion.  You may have noticed that the default "Digit Grouping Symbol" in the Control Panel setting if either " " or ",".   I guess that you manually added the "." to get the result you mention.  The value is ignored in reality so you can only use a " " since the "," is used as the "Decimal Symbol".  The solution I came up with is to parse user entered text and place " " where ever the "Digit Grouping Symbol" appears before the conversion.  When going to the display I find " " and replace them with the "Digit Grouping Symbol".
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now