12. Mai 200521 j Hi, ich möchte aus meinen Programm einen Ping senden und abfangen, ob er ankommt oder nicht. wie mache ich denn das?
12. Mai 200521 j Danke, ich habs runtergeladen und die Klasse CPing meinem Programm hinzugefügt. aber es funktioniert nicht. Ich bekomme folgende Fehlermeldung: --------------------Konfiguration: bader - Win32 Debug-------------------- Kompilierung läuft... baderDlg.cpp To avoid this message place you need to include Winsock2.h in your PCH (normally stdafx.h) c:\programme\microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig c:\programme\microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig D:\Eigene Dateien\Projekte\bader\baderDlg.cpp(392) : error C2146: Syntaxfehler : Fehlendes ';' vor Bezeichner 'm_csStatus' ping.cpp To avoid this message please put AFXPRIV.H in your PCH (normally stdafx.h) To avoid this message place you need to include Winsock2.h in your PCH (normally stdafx.h) c:\programme\microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig c:\programme\microsoft platform sdk\include\wspiapi.h(45) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig Generieren von Code... Fehler beim Ausführen von cl.exe. bader.exe - 5 Fehler, 0 Warnung(en) Das kann doch nicht sein, wenn es eigentlich funktioniert
12. Mai 200521 j Hi, die Meldung kommt über die "ping.h" Datei: #ifndef CPING_NO_WINSOCK2 #ifndef _WINSOCK2API_ #pragma message("To avoid this message place you need to include Winsock2.h in your PCH (normally stdafx.h)") #include <winsock2.h> #include <ws2tcpip.h> #endif #else #ifndef _WINSOCKAPI_ #pragma message("You need to include Winsock.h, Winsock2.h or AfxSock.h in your PCH (normally stdafx.h) to compile CPing") #include <winsock.h> #endif #endif [/PHP] Du musst wohl in deinem Projekt CPING_NO_WINSOCK2 definieren. [PHP] #define CPING_NO_WINSOCK2
12. Mai 200521 j geht nicht c:\programme\microsoft platform sdk\include\wspiapi.h(46) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig c:\programme\microsoft platform sdk\include\wspiapi.h(46) : error C2265: '<unbekannt>' : Verweis auf ein Array der Groesse Null ist ungueltig Generieren von Code... Fehler beim Ausführen von cl.exe. Browse-Informationsdatei wird erstellt... - 2 Fehler, 0 Warnung(en)
12. Mai 200521 j Hi, an welcher Stelle kommt es den zu dem #include "wspiapi.h" ? Und schau doch mal die Zeile 46 an, was da genau steht. Von der CPing-Klasse kommt das jedenfalls nicht!
Archiv
Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.