To jest funkcja tworząca wątek.
KOD cpp: UKRYJ
Void Download::Create_New_Thread()
{
thread = gcnew Thread(gcnew ParameterizedThreadStart(&Download::Start));
if (go_pause_ == true)
{
if (File::Exists(local_file_path_)
thread->Start(gcnew FileInfo(local_file_path_)->Length);
}
else
{
thread->Start(0);
}
}
{
thread = gcnew Thread(gcnew ParameterizedThreadStart(&Download::Start));
if (go_pause_ == true)
{
if (File::Exists(local_file_path_)
thread->Start(gcnew FileInfo(local_file_path_)->Length);
}
else
{
thread->Start(0);
}
}
Download - nazwa klasy;
Start - nazwa głównej funkcji. Przyjmuje jeden argument Object;
i błąd:
|
Download::Start(System::Object ^)' : the specified function does not match the delegate type 'void (System::Object ^)' |
Nie za bardzo wiem o co chodzi, bo argumenty są tego samego typu, zwracane wartości też, więc zrzucam winę na delegate, bo pierwszy raz tego używam i mogłem coś źle zrobić.






