http://bugs.winehq.org/show_bug.cgi?id=26653
Summary: Function VarRound fail Product: Wine Version: 1.2.2 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: oleaut32 AssignedTo: wine-bugs@winehq.org ReportedBy: cccarlos1983@yahoo.com
I'm trying run a VB6 app in wine, the problem happens when the VB6 app gets data from a Sybase server and tries to round to 2 decimals the value "0.00" (zero) from a field. I made a change in the "wine_source/dlls/oleaut32/variant.c" file to show the value of many variables and the output is the following:
VarRound (0x33ed40->(VT_DISPATCH ),2)
fixme:variant:VarRound unimplemented part, pVarIn == 0x33ebc8 ,V_VT(pVarIn) == 0xE, VT_TYPEMASK == 4095, deci == 2
The big problem is that I have not access to the source code of the VB6 application.
PD: My english is very bad... sorry :(
http://bugs.winehq.org/show_bug.cgi?id=26653
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Function VarRound fail |Function VarRound fails Severity|major |normal
--- Comment #1 from Dmitry Timoshkov dmitry@codeweavers.com 2011-04-04 22:31:10 CDT --- http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Please retest with wine-1.3.17
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com 2011-04-05 02:14:12 CDT --- So it wants VT_DECIMAL. We have a commented out test for that even.
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #3 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 10:32:57 CDT --- (In reply to comment #1)
http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Please retest with wine-1.3.17
Ok my friend, I'm compiling wine 1.3.17 now, thanks for your answer.
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #4 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 13:27:20 CDT --- (In reply to comment #3)
(In reply to comment #1)
http://bugs.winehq.org/page.cgi?id=fields.html#bug_severity
Please retest with wine-1.3.17
Ok my friend, I'm compiling wine 1.3.17 now, thanks for your answer.
Dear Dimmtry,
My VB6 app crash very early with the wine 1.3.17, I will return to wine 1.2.2
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #5 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 13:35:49 CDT --- Created an attachment (id=33965) --> (http://bugs.winehq.org/attachment.cgi?id=33965) Patch to add a case for "VT_DECIMAL" in dlls/oleaut32/variant.c
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #6 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 13:37:14 CDT --- (In reply to comment #5)
Created an attachment (id=33965)
--> (http://bugs.winehq.org/attachment.cgi?id=33965) [details]
Patch to add a case for "VT_DECIMAL" in dlls/oleaut32/variant.c
Hi Nikolay,
I made a little change in the "dlls/oleaut32/variant.c" file, I added a case for "VT_DECIMAL", can you check my patch and comment me about it? With that change my app runs perfectly.
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #7 from Nikolay Sivov bunglehead@gmail.com 2011-04-06 14:28:54 CDT --- Well, it's nothing without a test.
http://bugs.winehq.org/show_bug.cgi?id=26653
Carlos Chiriboga Calderon cccarlos1983@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #33965|0 |1 is obsolete| |
--- Comment #8 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 16:55:04 CDT --- Created an attachment (id=33966) --> (http://bugs.winehq.org/attachment.cgi?id=33966) This patch really Round a VT_DECIMAL value
Hi all,
I wrote this patch that resolve the bug in VarRound Function, this should be applied to the file "dlls/oleauth32/variant.c".
PD1: Sorry, I have not experience in C language, for that reason I did it converting the value to VT_R8. PD2: Sorry, My English is very very bad
Best regards,
Carlos Eduardo Chiriboga Calderon
http://bugs.winehq.org/show_bug.cgi?id=26653
Carlos Chiriboga Calderon cccarlos1983@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #33966|0 |1 is obsolete| |
--- Comment #9 from Carlos Chiriboga Calderon cccarlos1983@yahoo.com 2011-04-06 17:44:57 CDT --- Created an attachment (id=33967) --> (http://bugs.winehq.org/attachment.cgi?id=33967) This patch really Round a VT_DECIMAL value
My last upload was from the wrong File.
Hi all,
I wrote this patch that resolve the bug in VarRound Function, this should be applied to the file "dlls/oleauth32/variant.c".
PD1: Sorry, I have not experience in C language, for that reason I did it converting the value to VT_R8. PD2: Sorry, My English is very very bad
Best regards,
Carlos Eduardo Chiriboga Calderon
http://bugs.winehq.org/show_bug.cgi?id=26653
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |bunglehead@gmail.com
--- Comment #10 from Nikolay Sivov bunglehead@gmail.com 2011-05-07 01:39:20 CDT --- I'll take a look.
http://bugs.winehq.org/show_bug.cgi?id=26653
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|Function VarRound fails |VB6 database app fails | |because oleaut32 VarRound | |doesn't support VT_DECIMAL Ever Confirmed|0 |1
--- Comment #11 from Anastasius Focht focht@gmx.net 2012-04-30 09:34:37 CDT --- Hello,
obviously still present. Refining summary.
Source: http://source.winehq.org/git/wine.git/blob/cc37abb6589a1aa9862624c77a45b32c9...
--- snip --- 5127 HRESULT WINAPI VarRound(LPVARIANT pVarIn, int deci, LPVARIANT pVarOut) 5128 { ... 5146 switch (V_VT(pVarIn)) 5147 { 5148 /* cases that fail on windows */ 5149 case VT_I1: 5150 case VT_I8: 5151 case VT_UI2: 5152 case VT_UI4: 5153 hRet = DISP_E_BADVARTYPE; 5154 break; 5155 5156 /* cases just copying in to out */ 5157 case VT_UI1: 5158 V_VT(pVarOut) = V_VT(pVarIn); 5159 V_UI1(pVarOut) = V_UI1(pVarIn); 5160 break; ... 5230 /* cases we don't know yet */ 5231 default: 5232 FIXME("unimplemented part, V_VT(pVarIn) == 0x%X, deci == %d\n", 5233 V_VT(pVarIn) & VT_TYPEMASK, deci); 5234 hRet = DISP_E_BADVARTYPE; 5235 } 5236 VarRound_Exit: 5237 if (FAILED(hRet)) 5238 V_VT(pVarOut) = VT_EMPTY; 5239 VariantClear(&temp); 5240 5241 TRACE("returning 0x%08x (%s%s),%f\n", hRet, debugstr_VT(pVarOut), 5242 debugstr_VF(pVarOut), (V_VT(pVarOut) == VT_R4) ? V_R4(pVarOut) : 5243 (V_VT(pVarOut) == VT_R8) ? V_R8(pVarOut) : 0); 5244 5245 return hRet; 5246 } --- snip ---
$ wine --version wine-1.5.3
Regards
http://bugs.winehq.org/show_bug.cgi?id=26653
--- Comment #12 from Austin English austinenglish@gmail.com --- oleaut32 has had quite a few fixes recently, could someone please retest in 1.7.18?
https://bugs.winehq.org/show_bug.cgi?id=26653
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bammzilla@astronomy.com.ph
--- Comment #13 from Anastasius Focht focht@gmx.net --- *** Bug 33956 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=26653
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://dl.dropboxuserconte | |nt.com/u/75904861/ccdcalcfu | |ll.exe Summary|VB6 database app fails |Multiple VB6 applications |because oleaut32 VarRound |need oleaut32 VarRound to |doesn't support VT_DECIMAL |support VT_DECIMAL
--- Comment #14 from Anastasius Focht focht@gmx.net --- Hello folks,
obviously still present, refining summary.
Another VB6 app: https://dl.dropboxusercontent.com/u/75904861/ccdcalcfull.exe
Source: http://source.winehq.org/git/wine.git/blob/099514e753a8f25ff2fe19356729f0faa...
(indentation in 'VarRound' is also messed up)
$ sha1sum ccdcalcfull.exe b1dc30794628fcff9a0bdd4f0083afcf6fe5c57b ccdcalcfull.exe
$ du -sh ccdcalcfull.exe 3.5M ccdcalcfull.exe
$ wine --version wine-1.7.33-158-g25f24f2
Regards
https://bugs.winehq.org/show_bug.cgi?id=26653
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bunglehead@gmail.com |wine-bugs@winehq.org
https://bugs.winehq.org/show_bug.cgi?id=26653
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #15 from winetest@luukku.com --- The main download is already broken. Is the provided patch over here any good?
https://bugs.winehq.org/show_bug.cgi?id=26653
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=26653
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset| |https://github.com/wine-sta | |ging/wine-staging/tree/mast | |er/patches/oleaut32-VarRoun | |d Status|NEW |STAGED CC| |leslie_alistair@hotmail.com
https://bugs.winehq.org/show_bug.cgi?id=26653
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|STAGED |RESOLVED Fixed by SHA1| |0c738d900a8daccf2c546097203 | |3766d34d59aed
--- Comment #16 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=0c738d900a8daccf2c5460972...
https://bugs.winehq.org/show_bug.cgi?id=26653
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.3.
https://bugs.winehq.org/show_bug.cgi?id=26653
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x
https://bugs.winehq.org/show_bug.cgi?id=26653
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |---
--- Comment #18 from Michael Stefaniuc mstefani@winehq.org --- Removing the 4.0.x milestone from bug fixes included in 4.0.1.