Float Inexact Result
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 8 of 8

Thread: Float Inexact Result

  1. #1
    Join Date
    Feb 2004
    Posts
    3

    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

  2. #2
    Join Date
    Feb 2004
    Posts
    3
    ??
    any solutions?

  3. #3
    Join Date
    Sep 2002
    Location
    14 39'19.65"N / 121 1'44.34"E
    Posts
    9,815
    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.

  4. #4
    Join Date
    Apr 1999
    Posts
    27,446
    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

  5. #5
    Join Date
    Feb 2004
    Posts
    3
    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.

  6. #6
    Join Date
    Sep 2002
    Location
    14 39'19.65"N / 121 1'44.34"E
    Posts
    9,815
    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...

  7. #7
    Join Date
    Aug 2002
    Location
    Madrid
    Posts
    4,588
    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.

  8. #8
    Join Date
    Jun 2009
    Posts
    3

    Resolved 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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center