🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.multimedia
3 messages
3 total messages Started by Robert Penoyer Wed, 28 Mar 2001 03:07
waveInOpen and CALLBACK
#1310
Author: Robert Penoyer
Date: Wed, 28 Mar 2001 03:07
13 lines
1273 bytes
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?
2. What is a "fixed" function?
3. How do I get the handle of a window or thread?
4. How do I invoke the event that triggers an event callback? Such an
event might be "buffer full."

Thanks,

Bob
Re: waveInOpen and CALLBACK
#1312
Author: 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.
Re: waveInOpen and CALLBACK
#1314
Author: Robert Penoyer
Date: Wed, 28 Mar 2001 20:07
40 lines
2289 bytes
Mike,

Simple answers to perplexing questions are the best. Thanks!

Bob

Michael Warner wrote:

> 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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads