Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory error when preparing .WAV file

Status
Not open for further replies.

deyzel

Programmer
Apr 4, 2001
15
0
0
CA
I inherited a software product that plays wave files. Written in Borland C++. After a number of days of constant message playing I get the following error when waveOutPrepareHeader is called: MMSYSERR_NOMEM:Unable to allocate or lock memory.
I don't see any obvious memory leaks and the systems resources does not go down.
The system needs to be restarted to resolve this, it does not help to just restart the application.

Any ideas how to resolve or work around this??

Thanks
 
To play this wave Memory must first be allocated (GLOBALALLOC), then locked (GLOBALLOCK) and when done with must be freed (GLOBALFREE). It would appear that some memory is not being freed. The GLOBALFREE function returns NUll if succesfull. Test for NULL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top