kb4038779 - problem with getnameinfo()

Diskutiere und helfe bei kb4038779 - problem with getnameinfo() im Bereich Allgemeines im Windows Info bei einer Lösung; The following program stopped working after this patch (kb4038779) had been installed in Windows 7 Pro x64 SP1: // gethostname.c : // //... Dieses Thema im Forum "Allgemeines" wurde erstellt von ChristophKukulies, 5. Dezember 2017.

  1. kb4038779 - problem with getnameinfo()


    The following program stopped working after this patch (kb4038779) had been installed in Windows 7 Pro x64 SP1:


    // gethostname.c :
    //
    // Testprogramm zum Testen der getnameinfo-Funktion unter Windows (7,10, Windows Server 20xx)
    // CPK

    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
    #include <stdio.h>
    #include <sys/types.h>

    typedef unsigned int SOCKET;

    #include <Winsock2.h>
    #include <ws2tcpip.h>

    void usage(void);
    int exit(int);
    #define MAXHOSTNAMELEN 512

    static char hostinfo[NI_MAXHOST];
    static char hostname[MAXHOSTNAMELEN];

    int main(int argc, char *argv[])
    {
    int result,err;
    int wsreturn;
    static char tmpstring[1024];
    WORD wVersionRequested;
    WSADATA wsaData;
    SOCKADDR_IN sa;
    sa.sin_family=AF_INET;
    wVersionRequested = MAKEWORD( 2, 2 );

    err = WSAStartup( wVersionRequested , &wsaData );
    if ( err != 0 ) {
    /* Tell the user that we couldn't find a usable */
    /* winsock.dll. */
    printf("server: couldn't find a Winsock 2.2!\n"),exit(3);
    }
    if(argc !=2)
    usage();

    inet_pton(AF_INET,argv[1], &(sa.sin_addr));

    result=getnameinfo((struct sockaddr *)&sa,
    sizeof (sa),hostinfo,NI_MAXHOST,NULL,0,0);
    wsreturn=WSAGetLastError();
    if(wsreturn!=0)
    printf("WSockError=%d\n",wsreturn);
    printf("CLIENT: ip=[%s] hostinfo=[%s] result=%d wsreturn=%d\n", argv[1],hostinfo,result,wsreturn);

    return 0;

    }
    void usage() {
    printf("gethostname <IP>\nz.B. gethostname 10.172.10.35\n"),exit(1);
    }


    Using it, gives the following result:


    C:\>gethostname 172.27.1.252 ... a few (10) seconds of waiting here

    CLIENT: ip=[172.27.1.252] hostinfo=[172.27.1.252] result=0 wsreturn=0


    Without the patch


    C:\>gethostname 172.27.1.252 ... no waiting here, immediate return

    CLIENT: ip=[172.27.1.252] hostinfo=[some.host.domain] result=0 wsreturn=0



    After a while the behaviour changed again to that of the situation without the patch.
     
  2. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

kb4038779 - problem with getnameinfo() - Allgemeines

Die Seite wird geladen...

kb4038779 - problem with getnameinfo() - Similar Threads - kb4038779 problem with

Forum Datum

Problem with Exchange emails

Problem with Exchange emails: hi,I use my hotmail.com address as my main email. I get emails on my iPhone, MacBook and Mac but since a few days I am having problems using it on my iPad.It constantly asks for my password and...
Outlook.com 10. Januar 2024

I have an problem with windows:

I have an problem with windows:: I can t use the microsoft store i allways get an error that one of the update services is not working. I allready tryed to perform an clean Boot but it still does not work. In the services app is...
Apps 2. Oktober 2023

Problem with wevtutil / WMI

Problem with wevtutil / WMI: Der folgende Befehl listet 1.180 Protokolle, u.a. "Microsoft-Windows-USBVideo/Analytic":C:\Windows\system32>wevtutil el...Microsoft-Windows-USBVideo/Analytic...Auf 1.179 Protokolle kann ich eine...
Apps 15. August 2022

Problem with wevtutil / WMI

Problem with wevtutil / WMI: Der folgende Befehl listet 1.180 Protokolle, u.a. "Microsoft-Windows-USBVideo/Analytic":C:\Windows\system32>wevtutil el...Microsoft-Windows-USBVideo/Analytic...Auf 1.179 Protokolle kann ich eine...
Games und Spiele 15. August 2022

Problem with data import

Problem with data import: I wanted to import data within the actual Office365 Excel version. When I changed separator to space most of my data just disappeared. When I use most of the other separators it works fine, its...
Microsoft Office 19. März 2020

kb4038779 - problem with getnameinfo()

kb4038779 - problem with getnameinfo(): Don't know whether this is a place to drop my question. Probably not. But maybe someone coudl guide me to the right place. The following program stopped working after this patch (kb4038779) had...
Allgemeines 13. Dezember 2017

Problem with an excel file in onedrive

Problem with an excel file in onedrive: Hallo Microsoft Community Your session has exceeded its limits and has been closed. Error Id: 9b9d4eb9-18cd-416c-8423-75f0b4354238 If i want delete a Row this Mistake is happen. What i can...
Microsoft Office 23. Juni 2017
kb4038779 - problem with getnameinfo() solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.