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.

[bcb] synchronize + threads will nicht...

Empfohlene Antworten

Veröffentlicht

hi,

ich habe einen thread der auf ein edit-feld auf meiner from zugreift. um das ganze zu realisieren brauche ich ja den synchronize aufruf. bei mir sieht das wie folgt aus:

meine thread header


class TBcdToIlTestThread : public TThread

{

private:

protected:

        void __fastcall Execute();

        void__fastcall getRuns( int *nTimes );

public:

        __fastcall TBcdToIlTestThread(bool CreateSuspended);

};

mein thread:

void __fastcall TBcdToIlTestThread::getRuns( int *nTimes )

{

     *nTimes = StrToInt( Form1->edRuns->Text );

}

//---------------------------------------------------------------------------


void __fastcall TBcdToIlTestThread::Execute()

{

     BYTE bcd[5];

     DWORD Il;


     int counter;

     int errorCnt = 0;

     int nGen;

     int retVal = BCD_OK;

     int nTimes = 0;


     Synchronize( getRuns( &nTimes ));

     ....

jetzt bekomme ich allerdings beim compilieren folgende meldungen:

[C++ Fehler] BcdToIlTest_thread.cpp(49): E2468 Ein Wert vom Typ void ist nicht zulässig.

[C++ Fehler] BcdToIlTest_thread.cpp(49): E2342 Keine Übereinstimmung des Typs beim Parameter 'Method' ('void (_fastcall * (_closure )())()' erwartet, 'void' erhalten)

[C++ Warnung] main.cpp(72): W8004 'BcdToIlThread' wurde ein Wert zugewiesen, der nie verwendet wird.

was mach ich falsch bzw wo liegt mein denkfehler?

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.