Subj : Re: How to get address of CALLBACK function? To : borland.public.cpp.borlandcpp From : Ed Mulroy [TeamB] Date : Wed Mar 30 2005 06:55 am 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 > Gasparics, Antal wrote in message > news:424a5dd6$1@newsgroups.borland.com... > > I need to define a callback function, and pass its address (as DWORD > type) to the WIN. Therefore, I need to identify the address of my > class memeber function, but I could not find the proper way for > that. Can anybody help me? > > This thing can not be compiled: > > DWORD waveOutProcAddress; > > waveOutProcAddress = &TWaveChannel::waveOutProc; > > I got this error message: > > [C++ Error] Wave.cpp(26): E2034 Cannot convert 'void (__stdcall > TWaveChannel::*)(void *,unsigned int,unsigned long,unsigned > long,unsigned long)' to 'unsigned long' > > The definition of the functions is in this way: > > class TWaveChannel > { > private: // Internal members > // Call back funtions > void CALLBACK waveOutProc(HWAVEOUT hwo, > UINT uMsg, > DWORD dwInstance, > DWORD dwParam1, > DWORD dwParam2); > .... > }; .