Solved

COleCurrency::ParseCurrency()

Posted on 1997-08-26
1
267 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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