tthread Questions

1

Solved

I'm trying to use COM interface within a thread. From what I have read I have to call CoInitialize/CoUninitialize in each thread. While this is working fine: procedure TThreadedJob.Execute; begin...
Rosenwald asked 15/8, 2016 at 20:18

2

Solved

I have a TThread object and want to be able to start/stop the thread via a button on the main form of the program. I've been looking into ways to do this and so far I have the following ideas: Te...
Hanna asked 21/7, 2016 at 23:48

1

Solved

Long ago, when I started working with threads in Delphi, I was making threads start themselves by calling TThread.Resume at the end of their constructor, and still do, like so: constructor T...
Doublecheck asked 14/3, 2016 at 23:44

4

Solved

Between time of TThread instance creation and start up, main thread will continue with code execution. If code in main thread depends on thread in question to be fully up and running it has to wait...
Girovard asked 19/2, 2015 at 14:11

3

Solved

My application is a tcp/ip server, with main thread created only once & listening all the time. When new client connects, the main thread creates the new thread of TClientThread type. There is ...
Juryman asked 29/7, 2009 at 21:32

4

Solved

I wrote a TThread descendant class that, if an exception is raised, saves exception's Class and Message in two private fields private //... FExceptionClass: ExceptClass; // --> Class of Exce...
Letitialetizia asked 30/7, 2013 at 7:24

4

Solved

I have a room with 60 computers/devices (40 computers and 20 oscilloscopes Windows CE based) and I would like to know which and every one is alive using ping. First I wrote a standard ping (see her...
Curet asked 12/10, 2012 at 11:56

3

Solved

As far as I understand and know the method of the TThread Class, if you synchronize your code, it actually get's executed in the main Application Thread (just like a timer/buttonclick/etc.) I've be...
Therapist asked 29/3, 2013 at 3:29

4

Solved

What is the best way to write a Delphi DUnit test for a TThread descendant when FreeOnTerminate = True? The TThread descendant returns a reference which I need to test for, but I can't figure out h...
Frazee asked 20/3, 2013 at 2:38

1

Solved

I'm using the LoadKeyboardLayout function to load and activate the keyboard layout this way: procedure TfrmMain.eSearchEnter(Sender: TObject); begin LoadKeyboardLayout('00000429', KLF_ACTIVATE); ...
Gabi asked 9/12, 2012 at 5:59

2

Solved

In a given example I am receiving an exception when calling AThread.Free. program Project44; {$APPTYPE CONSOLE} uses SysUtils, Classes, Windows; type TMyException = class(Exception); var AT...
Kikuyu asked 10/1, 2012 at 14:59

5

Solved

I would like to have a thread running in background which will check connection to some server with given time interval. For example for every 5 seconds. I don't know if there is a good "desing pa...

6

Solved

I just realized that my exceptions are not being shown to the user in my threads! At first I used this in my thread for raising the exception, which does not work: except on E:Exception do begin ...
Shih asked 26/3, 2011 at 14:36

5

Solved

I have a main thread and a separate thread in my program. If the separate thread finishes before the main thread, it should free itself automatically. If the main thread finishes first, it should f...
Phagocyte asked 24/8, 2010 at 13:47

4

Solved

It has been asked before, but without a full answer. This is to do with the so called famous "‘Fatal threading model!’". I need to replace this call to TThread.Suspend with something safe, that re...
Dierolf asked 19/1, 2010 at 21:40

2

Solved

This question may seem trivial, but I hope you won't ignore it. Before destroying a TThread object it is usually necessary to wait until the thread that called the TThread.Execute() method finishes...
Willamina asked 6/7, 2009 at 22:21

4

Solved

In Delphi 2009 I'm finding that any time I use TThread.CurrentThread in an application, I'll get an error message like the following when the application closes: Exception EAccessViolation in modu...
Cybernetics asked 9/10, 2008 at 17:20

6

Solved

I have source code for a Windows DLL that is written in C++ and uses Visual Component Library. Now my task is to port that to Linux, but I don't have source code for the VCL itself, or any kind of ...
Jorum asked 2/4, 2009 at 17:1
1

© 2022 - 2024 — McMap. All rights reserved.