Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ThreadID

0 views
Skip to first unread message

Hon Yuen Ng

unread,
May 8, 2003, 6:45:35 AM5/8/03
to
hi

I'm not sure this should be posted here. If i'm wrong, please gimme the
direction? :P

My problem is:

If i'm not mistaken, any form is a thread itself, rite? Then is it possible
to check its thread ID?

Thank you in advance :)

From,
Hon Yuen, Ng

Bruce McGee

unread,
May 8, 2003, 7:24:16 AM5/8/03
to
The best group is probably Object Pascal, but since you're here:

Each form does not run in it's own thread. They all run in the context
of the main thread, as visual objects should.

Are you looking for a way to uniquely identify a form? If so, you can
use it's handle.

Regards,
Bruce McGee
Glooscap Software

Hon Yuen, Ng

unread,
May 9, 2003, 12:31:44 AM5/9/03
to
Thanks Bruce!

So is there a way to track down the main thread ID?
I'm currently involve in a project where i have to identify each and every
thread's Id (Including main thread).

Thanks.

From,
Hon Yuen, Ng

"Bruce McGee" <bmc...@ionline.net> wrote in message
news:3eba...@newsgroups.borland.com...

Chad Z. Hower aka Kudzu

unread,
May 9, 2003, 9:59:21 AM5/9/03
to
"Hon Yuen, Ng" <hy...@tm.net.my> wrote in news:3ebb2fb4
@newsgroups.borland.com:

> So is there a way to track down the main thread ID?
> I'm currently involve in a project where i have to identify each and
> thread's Id (Including main thread).

GetThreadID IIRC. I know IdGlobal uses it.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Qualified help FAST with Indy Experts Support
from the experts themselves:

http://www.atozedsoftware.com/indy/experts/support.html

ELKNews - Get your free copy at http://www.atozedsoftware.com

Hon Yuen, Ng

unread,
May 9, 2003, 3:17:01 AM5/9/03
to
Sorry Chad, I don't quite understand what you mean. Any
reference/explanation?

Thanks!

By the way, i want to ask if it is possible to do ranged download with
TIdFTP?

From,
Hon Yuen, Ng

"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message
news:Xns93765B7...@127.0.0.1...

Chad Z. Hower aka Kudzu

unread,
May 9, 2003, 2:00:27 PM5/9/03
to
"Hon Yuen, Ng" <hy...@tm.net.my> wrote in news:3ebb5653
@newsgroups.borland.com:

> Sorry Chad, I don't quite understand what you mean. Any
> reference/explanation?

GetThreadID, IIRC its in SysUtils or other. You can look in IdGlobal for an
example.

> By the way, i want to ask if it is possible to do ranged download with
> TIdFTP?

IIRC it does support resume, but not "middle" trasnfers.

--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Want more Indy stuff? Try the Atozed Indy Portal at
http://www.atozedsoftware.com/
* More Free Demos
* Free Articles
* Extra Support

Hon Yuen, Ng

unread,
May 9, 2003, 8:37:32 PM5/9/03
to
Thanks a lot, chad, I got them! =)

BTW, i've customize the TIdFTP in order to let it does "middle" download.
However, i cant make it does resumable "middle" download.

Here is the codes that i modified.

:

procedure Get(const ASourceFile: string; ADest: TStream; nPosition: Integer;
AResume: Boolean = True); overload;
begin
AResume := AResume and CanResume;
InternalGet('RETR ' + ASourceFile, ADest, nPosition, AResume);
DoAfterGet(ADest);
end;

procedure TCustFTP.InternalGet(const ACommand: string; ADest: TStream;
nPosition: Integer; AResume: Boolean);
.
.
.
if AResume then begin
Self.SendCmd('REST ' + IntToStr(ADest.Position + nPosition), [350]);
.
.
.
if AResume then begin
Self.SendCmd('REST ' + IntToStr(ADest.Position + nPosition), [350]);

I just let these function to pass the position i want instead of the stream
starting position.

Can you please correct me if i made any mistake?

Thanks you in advance.

From,
Hon Yuen, Ng


"Chad Z. Hower aka Kudzu" <cp...@hower.org> wrote in message

news:Xns9376845...@127.0.0.1...

0 new messages