Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MFC Ping

Empfohlene Antworten

Hi, ich möchte aus meinen Programm einen Ping senden und abfangen, ob er ankommt oder nicht. wie mache ich denn das?

Hi,

hier ist was für dich!

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 :(

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

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)

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.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.