-
February 18th, 2004, 08:52 AM
#1
Float Inexact Result
I am getting the following error First-chance exception in UCSSocketServer.exe (KERNEL32.DLL): 0xC000008F: Float Inexact Result. My VC++ program invokes a method of a VB ocx which in turn calls the VB dll. The error occurs during the invocation of the dll method. I have a VB client which works without any problem. But when I try to call it through my VC++ code it throws this exception. Can anybody give a solution to this. Thanks in advance.
John
-
February 18th, 2004, 11:56 AM
#2
-
February 18th, 2004, 12:01 PM
#3
Originally posted by johnsam2000
??
any solutions?
I don't think you'll get any quick solutions without posting some relevant code. With the information you've given so far, we can only guess what might be wrong.
-
February 18th, 2004, 12:06 PM
#4
You can't get solutions if you don't post anything related to the problem. What are the parameters to the function you are trying to call?
Also, I did a google search in the newsgroups for "Float Inexact Results"
http://groups.google.com/groups?hl=e...22&sa=N&tab=wg
At least 10 pages of hits.
Regards,
Paul McKenzie
-
February 18th, 2004, 12:12 PM
#5
The VC++ code which instantiates the ***_Host.ocx and calls its Receive() method
HRESULT hrOCXCreate = CoCreateInstance (***_Host::CLSID_***_Data,NULL,CLSCTX_ALL, ***_Host::IID__***_Data,(void**)&pobjASSData);
pobjASSData->Receive();
The ***_Host.ocx code where it invokes the dll method
Public Function Receive() As Integer
Dim oBearbeitenData As Object
On Error GoTo ErrorReceive
Set oBearbeitenData = AssAccess1.GetAss
In debug mode I get the following error at this point
First-chance exception in UCSSocketServer.exe (KERNEL32.DLL): 0xC000008F: Float Inexact Result.
-
February 18th, 2004, 12:32 PM
#6
Originally posted by johnsam2000
The VC++ code which instantiates the ***_Host.ocx and calls its
Looks like your A S S - Host has been censored by the forum software...
-
February 18th, 2004, 08:35 PM
#7
I may be wrong, but I think that it's the VB runtime dll that generates these errors if you run it inside of VCs debugger. In any case, anytime I debug a C++ COM object with a program written in VB, I get loads of these. Maybe it's when in VB you use implicit conversions, variant datatypes or generic functions taking variants as input.
In any case, if it comes from the VB ocx, I wouldn't worry about it.
[edit:
Thinking about the whole thing, it's probably normal behaviour by VB. The thing is that a certain function generates this exception and usually the VB runtime (or the compiled code) would catch it directly and handle it accordingly. But since you attached a debugger, that sees the exception before VB can handle it. Hence it's name "First chance exception". If the VB runtime (or the compiled VB code) would not handle the exception, the debugger would catch a "Second chance exception" while the VB program would crash.
So, in short, don't worry about that.]
Last edited by Yves M; February 18th, 2004 at 08:42 PM.
Get this small utility to do basic syntax highlighting in vBulletin forums (like Codeguru) easily.
Supports C++ and VB out of the box, but can be configured for other languages.
-
July 23rd, 2009, 10:41 PM
#8
Re: Float Inexact Result
"(KERNEL32.DLL): 0xC000008F: Float Inexact Result" errors occurs on calling an OCX control method with incorrect parameter type.
E.g:
OCX Method
virtual HRESULT __stdcall put_xxx (
VARIANT_BOOL _arg1 ) = 0;
INCORRECT Function Call
VARIANT_BOOL bValue = 0;
pMyOCX->get_Something( bValue ); // The above execption will happen
CORRECT Function Call
VARIANT_BOOL bValue = FALSE;
pMyOCX->get_Something( bValue );
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|