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.

Systemthreads unter Windows (Visual C++)

Empfohlene Antworten

Veröffentlicht

Also, ich hab da folgendes Problem.

Mein Programm macht nutzt DirectX 8.

Zuerst erstelle ich einen Thread zur Behandlung von

Windowsnachrichten und zum Überprüfen der DirectInput-Events.

Nachdem ich in diesem DirectDraw und DirectInput

initialisiert habe, erstelle ich einen Thread, in dem ich

den eigentlichen Programmcode schreibe.

Diese beiden Threads funktionieren reibungslos, nur werden

halt auch zahlreiche Dlls beim Start geladen, die

anscheinend auch Threads starten.

Folgende Debug-Infos erhalte ich während das Programm läuft:

(... jede menge dlls ...)

The thread 0xFFF18E2B has exited with code 0 (0x0).

(^das ist mein Application-Thread)

The thread 0xFFF1DEFB has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF72F23 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1A1D3 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1A34F has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1D877 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1DBE3 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1D51F has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1D08B has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1D207 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF1CDB3 has exited with code -1 (0xFFFFFFFF).

The thread 0xFFF59D57 has exited with code 0 (0x0).

(^ und das war mein System-Thread)

Aber wieso werden die von den System-Dlls erzeugten Threads

mit -1 als ExitCode beendet???

Ist das der normale ExitCode für Windows-System-Dlls???

:rolleyes: Bitte helft, benötige nur die Info, ob das "normal" ist?

Ich glaube, daß das alles ok ist.

Hier ist ein Hinweis, wieso -1 heißt, daß alles normal ist:

GetExitCodeProcess() wird bestimmt vom Debugger abgefragt

The GetExitCodeProcess function retrieves the termination status of the specified process.

BOOL GetExitCodeProcess(

HANDLE hProcess, // handle to the process

LPDWORD lpExitCode // address to receive termination status

);

Parameters

hProcess

Handle to the process.

Windows NT: The handle must have PROCESS_QUERY_INFORMATION access.

lpExitCode

Pointer to a 32-bit variable to receive the process termination status.

Return Values

!!!-> If the function succeeds, the return value is nonzero.

!!!-> If the function fails, the return value is zero. To get extended error information, call GetLastError.

Also vielleicht kannst Du mit GetLastError() herausfinden, ob es sich tatsächlich um Errorcodes handelt. Es scheint mir allerdings wahrscheinlicher, das der Debugger einen Exitcode erwartet und keinen bekommt, also meldet er einen Default-Errorcode. Deshalb vielleicht immer derselbe Error.

Aus meiner Erfahrung liegt nur dann ein echter Fehler vor, wenn nicht -1 sondern ein positiver int als Errorcode zurückgegeben wird. Ein Nachschlagen in der Errortabelle hat auch nur postive ints als Errrors definiert. Also wird -1 heißen: Alles ok!

Wenn also alles ordentlich läuft, dann würde ich dem keine weitere Beachtung schenken.

<FONT COLOR="#a62a2a" SIZE="1">[ 29. August 2001 23:22: Beitrag 1 mal editiert, zuletzt von Crush ]</font>

OK, danke erstmal, werde das mal checken.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.