Why "Applications should not call any system-defined functions frominside a callback function"

This is a discussion on Why "Applications should not call any system-defined functions frominside a callback function" within the Windows CE forums, part of the Microsoft Windows category; The windows CALLBACK functions like the void CALLBACK waveOutProc( HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD dwParam1, DWORD dwParam2 ); defined in Waveform API,limited the function call used inside the ...

Go Back   Unix Linux Forum > Unix > Other OS > Microsoft Windows > Windows CE

FixUnix.com - Unix Linux Forums

Unix Content Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 03-03-2008, 08:45 AM
Default Why "Applications should not call any system-defined functions frominside a callback function"

The windows CALLBACK functions like the
void CALLBACK waveOutProc(
HWAVEOUT hwo,
UINT uMsg,
DWORD_PTR dwInstance,
DWORD dwParam1,
DWORD dwParam2
);
defined in Waveform API,limited the function call used inside the
CALLBACK function. In MSDN,the waveOutProc is remarked as follow:

Remarks
Applications should not call any system-defined functions from inside
a callback function, except for EnterCriticalSection,
LeaveCriticalSection, midiOutLongMsg, midiOutShortMsg,
OutputDebugString, PostMessage, PostThreadMessage, SetEvent,
timeGetSystemTime, timeGetTime, timeKillEvent, and timeSetEvent.
Calling other wave functions will cause deadlock.


My question is: why does the waveOutProc callback has that
restriction? what happend in the other system calls such as the mutex
and semaphore series?

Thanks!
Reply With Quote
Reply

Thread Tools


All times are GMT -5. The time now is 03:19 PM.

In an effort to better serve ads to our visitors, cookies are used on Fixunix.com. For more information, check out our Privacy Policy.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Ad Management by RedTyger