Subj : Re: How to get address of CALLBACK function? To : borland.public.cpp.borlandcpp From : Gasparics, Antal Date : Wed Mar 30 2005 02:51 pm Ed Mulroy [TeamB] wrote: >In the code shown the function TWaveChannel::waveOutProc is a >non-static class member function. > >A callback function must either be a function not contained in a class >or structure or a static member function of a class or structure. > >. Ed > > Thx. However the problem is still the following. I have to tell the windows the starting memory adrress of the function code, which will be called back. The Win32 Programmer's Reference says: dwCallback Address of a fixed callback function, an event handle, a handle to a window, or the identifier of a thread to be called during waveform-audio playback to process messages related to the progress of the playback. If no callback function is required, this value can be zero. For more information on the callback function, see waveOutProc. So I need the address of my function. The "addressof" operator (&) can not be used here, or at least I can not find how. I have static member function now, but the following line can not be compiled: waveOutProcAddress = &WaveChannel.waveOutProc; The Error message: E2034 Cannot convert 'void (__stdcall *)(void *,unsigned int,unsigned long,unsigned long,unsigned long)' to 'unsigned long' .