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.

Empfohlene Antworten

Veröffentlicht

Hi,

wie kann es sein dass ich bei folgendem Code, an meinem PC mit Win98, immer

eine Accesviolation bekomme und es an einem Win2000 und einem WinXP

PC einwandfrei läuft?

Die Violation tritt komischerweise nur auf wenn ich die Schleife nicht

auskommentiere und zwar bei den 4 if Abfragen, also bevor die Schleife

überhaupt ausgeführt wird:


case WM_DESTROY:
{
bUhr = false;
GetExitCodeThread(hThread,&dwExitCode);
if (dwExitCode == STILL_ACTIVE)
TerminateThread(hThread,0);
WSACleanup();
if (hFile != NULL) //Accessviolation
InternetCloseHandle(hFile);
if (hInternet != NULL) //Accessviolation
InternetCloseHandle(hInternet);
if (Daten != NULL) //Accessviolation
delete[] Daten;
if (Auswahl != NULL) //Accessviolation
delete[] Auswahl;

/*do
{
GetExitCodeProcess(hInternetExplorer,&dwExitCode);
}
while(dwExitCode == STILL_ACTIVE);*/

PostQuitMessage(0);
return 0;
}
[/PHP]

Gruß

Guybrush

  • Autor

Da stand etwas von einem unerlaubetem Zugriff und 0x000000005 Access Violation

oder so.

Das hat sich mittlerweile aber erledigt. Es hing irgendwie mit WSACleanup()

zusammen.

In dem Programm wird WSAStartup() und später WSACleanup() aufgerufen.

Ich hab WSACleanup nur nochmal bei WM_DESTROY geschrieben falls das Programm

vor dem anderen Aufruf beendet wird. Das ganze hab ich jetzt durch ne bool

Variable gelöst die das festhält.

Das Komische ist nur das das Programm nicht bei WSACleanup() sondern der

Funktion danach abgestürzt ist und bis heute Nachmittag einwandfrei lief, obwohl

das die ganze Zeit so war.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.