Solved

COleCurrency::ParseCurrency()

Posted on 1997-08-26
1
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

687 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