🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.multimedia
Article #1312

Re: waveInOpen and CALLBACK

#1312
From: Michael Warner
Date: Wed, 28 Mar 2001 17:13
31 lines
2098 bytes
On Tue, 27 Mar 2001 19:07:40 -0800, Robert Penoyer
<rpenoyer@earthlink.net> wrote:

>I'm trying to learn to use waveInOpen. The fourth argument of this
>function, dwCallback, is an _address_ of a "fixed callback function, an
>event handle, or a handle of a window or thread."
>
>1. How do I determine the address of a function or event handle?

In C/C++ you just specify its name, with no parentheses or arguments.
You may have to cast it to the correct type, which may be DWORD for
a multi-function argument like that one. Yuck.

>2. What is a "fixed" function?

The term is a bit vague, but in practice it must be a standalone
C-style function or a static class member. Normal class members can't
be used as callbacks, since the "this" pointer isn't available to pass
to them.
>3. How do I get the handle of a window or thread?

The handle of a VCL-created windows is obtained with form->Handle.
Threads are normally specified by thread ID, so I'm not sure about
that one.

>4. How do I invoke the event that triggers an event callback? Such an
>event might be "buffer full."

Read up on events in the API help.

The callback mechanism is the easiest to use of these.
Technical Details
Message-ID: <ll64ctss1l4ag4rmgaaounda1o2q3h0h2d@4ax.com>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!202.7.186.60
References: <3AC1557C.B0B5A538@earthlink.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d0fc,2fb6e7638562241e
X-Google-Attributes: gid10d0fc,public
X-Google-ArrivalTime: 2001-03-28 09:26:22 PST
From: Michael Warner <mvw@ozemail.com.au>
Newsgroups: borland.public.cppbuilder.multimedia
Subject: Re: waveInOpen and CALLBACK
Date: Thu, 29 Mar 2001 02:43:45 +0930
Organization: Warner Solutions
Reply-To: mvw@ozemail.com.au
Message-ID: <ll64ctss1l4ag4rmgaaounda1o2q3h0h2d@4ax.com>
References: <3AC1557C.B0B5A538@earthlink.net>
X-Newsreader: Forte Agent 1.8/32.548
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 202.7.186.60
X-Trace: 28 Mar 2001 09:12:29 -0800, 202.7.186.60
Lines: 32
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!news.tele.dk!128.230.129.106!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!202.7.186.60