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.

Fehler bei CreateThread() ...

Empfohlene Antworten

folgene Situation:

DWORD WINAPI CMp3ListDlg::threadprc(LPVOID parameter)

{

		CString filter(".mp3"),csMeld;

		csMeld = _T("Suche Dateien, Bitte Warten ...");

		SetDlgItemText(IDC_STATIC_LIST_FILE,csMeld);




		int iFound = searchDir(m_csStartPath,filter);

		csMeld.Format(_T("Gefundene Dateien : %d"),iFound);

		SetDlgItemText(IDC_STATIC_LIST_FILE,csMeld);

}
DWORD WINAPI  threadprc(LPVOID);
DWORD dwThreadId;

HANDLE hThread = CreateThread( NULL, 0, threadprc, NULL, 0, &dwThreadId );

und ich bekomme folgenden fehler
D:\__projekte\_mp3\mp3List\mp3ListDlg.cpp(399) : error C2664: 'CreateThread' : Konvertierung des Parameters 3 von 'unsigned long (void *)' in 'unsigned long (__stdcall *)(void *)' nicht moeglich

Was sehe ich nicht??? Was mach ich falsch???

Hi TinTin,

du verwendest eine Klassenfunktion als Thread-Funktion. Das geht so nicht.

Eine Thread-Funktion muss global sein. Entweder du deklarierst deine Klassenfunktion static (damit wird sie global),

static DWORD WINAPI threadprc(LPVOID parameter);

oder nimmst sie ganz raus aud der Klasse und machst einfach 'ne globale Funktion daraus.

DWORD WINAPI threadprc(LPVOID parameter)
{
...
}[/PHP]

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.