🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #5951

Re: Callback mechanics

#5951
From: AlexB
Date: Wed, 22 Jun 2005 03:57
32 lines
1856 bytes
Remy Lebeau (TeamB) wrote:
> "AlexB" wrote in message
>>Does this call look like "interruption" of main (or another my) thread?
> No.

 >>Does collision possible here with VCL staff?
 > Please elaborate.

// main thread, multimedia timer
mmt=timeSetEvent(
  msInterval,        // delay
  wTimerRes,         // resolution
  mmtCallback,       // callback function
  (DWORD)0,          // user data
  TIME_PERIODIC);    // periodic timer event

while(1)            // forever
{ // VCL in progress
  StringList->Lines->Add(...);
}

...
void CALLBACK mmtCallback(UINT wTimerID, UINT msg,
     DWORD dwUser, DWORD dw1, DWORD dw2)
{
  StringList->Lines->Add(...);
}

How Window "knows" what my thread does right now? If thread works 
without pauses at what moment Windows can call a callback function?

AlexB.
Technical Details
Message-ID: <42b8e174$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42b7fc1d$1@newsgroups.borland.com> <42b84cd0$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,bcabb6910c82b605
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 22 Jun 2005 10:57:31 +0700
From: AlexB <b.a.v@inbox.ru>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: ru, en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Callback mechanics
References: <42b7fc1d$1@newsgroups.borland.com> <42b84cd0$1@newsgroups.borland.com>
In-Reply-To: <42b84cd0$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.192.185.54
Message-ID: <42b8e174$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1119412596 212.192.185.54 (21 Jun 2005 20:56:36 -0700)
Lines: 32
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail