CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2003
    Location
    Timisoara, Romania
    Posts
    306

    Using getnameinfo() I got First-chance exception - kernel32.dll

    I just did a small tool that uses getnameinfo() function in order to get computers names using an IPs range.
    Everything it's fine but I don't like that I got an exception in my output window:
    Code:
    First-chance exception at 0x77d67ded (kernel32.dll) in scanComputersName.exe: 0x000006BA: The RPC server is unavailable.
    This exception appears for each range's IP that it's not assigned to a real station.

    My first point of view it's that this isn’t a big issue.
    http://support.microsoft.com/kb/884564
    http://support.microsoft.com/kb/257187

    But I don't like exceptions. That's why I'm looking for experienced opinions in this topic.

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: Using getnameinfo() I got First-chance exception - kernel32.dll

    First-chance exception messages can be ignored. Especially in your case, when you know their reason. Some internal getnameinfo implementation uses SEH to catch invalid address.
    The only case when we need to worry about first-chance exception messages, is if we don't expect them - everything should be 100% correct, but they appear.

  3. #3
    Join Date
    Jan 2003
    Location
    Timisoara, Romania
    Posts
    306

    Re: Using getnameinfo() I got First-chance exception - kernel32.dll

    Alex, thanks for your reply. I'm using VC++ 2005 (VS Team Suite). Maybe, the implementation of this function includes SEH. All the best!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured