locked
WinRT equivalent for getnameinfo

    Question

  • Hi,

    As ws2 functionality has been restricted to the desktop family, I'm - again - trying to find equivalents in WinRT.

    The lack of getaddrinfo has already been worked around with the DatagramSocket::GetEndpointPairsAsync trick, but I am still stuck with getnameinfo. What's the proper way of address-to-name translation in Store Apps, using _only_ C++.

    (neither .NET, nor C# cross code is valid option. )

    Thank You,

    György

    Thursday, October 3, 2013 9:52 AM

Answers

  • Hello,

    There is no WinRT equivalent to do the reverse - i.e there's no equivalent to getnameinfo in WinRT. What scenario you are trying to achieve by doing the reverse lookup? (IP to Hostname)? Can you provide more details?

    Thanks,

    Prashant.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    • Marked as answer by fairlane_73 Monday, October 7, 2013 8:44 AM
    Friday, October 4, 2013 1:04 AM
    Moderator

All replies

  • Hello,

    There is no WinRT equivalent to do the reverse - i.e there's no equivalent to getnameinfo in WinRT. What scenario you are trying to achieve by doing the reverse lookup? (IP to Hostname)? Can you provide more details?

    Thanks,

    Prashant.


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    • Marked as answer by fairlane_73 Monday, October 7, 2013 8:44 AM
    Friday, October 4, 2013 1:04 AM
    Moderator
  • Thank You, Prashant!

    There is no single scenario, however. I am responsible for providing a platform abstraction library that offers a single, consistent interface for common functionality that our products and higher level libraries use to implement platform-independent business logic. There is no restriction what those codes use my abstract API for.

    Well, tracing all current and future use-cases is impossible (we are talking about many layers in hierarchy on top of my library, and 100k+, or M+ code lines)...

    The problem on my level is that each such function, that has to return ERR_UNIMPLEMENTED on a given platform due to the API restrictions, reduces the chance to compile the common code base, and in turn makes it harder - if at all - for a product to appear on that platform.

    That's why I want to be absolutely sure, before I ban anything on any platform from our library. 

    (Actually, I still cannot believe that so widely used functions like getaddrinfo and getnameinfo need a complex workaround /the former one/, or there is no way at all /for the latter one/)

    Thanks,

    Gyorgy

    Friday, October 4, 2013 9:44 AM
  • Thanks for the feedback Gyorgy. I will pass it onto the feature team for future consideration.

    Regards,

    Prashant


    Windows Store Developer Solutions #WSDevSol || Want more solutions? See our blog, http://aka.ms/t4vuvz

    Monday, October 7, 2013 6:51 PM
    Moderator