This returns with undefined symbol for PlaySound.
invoke PlaySound, addr sound, NULL, SND_FILENAME);
invoke ExitProcess,0
include \masm32\include\winmm.inc
includelib \masm32\lib\winmm.lib
the parenthesis and semicolon ");" look like C leftovers - maybe that is the undefined symbol
Quote from: dedndave on April 05, 2010, 11:13:16 PM
the parenthesis and semicolon ");" look like C leftovers - maybe that is the undefined symbol
You are right, the parenthesis didn't belong. But the missing include and library had to be there.
Most API's have info on necessary includes, but PlaySound didn't.
PlaySound wasn't even in the 2003 SDK help files.
Magnum, see if you can find the reference material on MSDN online.
My 2003 PSDK documents it, and includes the necessary header file and import library.
oex has it right, it is exported by winmm.dll so the lib should be winmm.lib. However, it is available in both ANSI and UNICODE versions so you may have to use PlaySoundA or PlaySoundW if it is not redirected by your include file or you can do the redefinition yourself
PlaySound equ <PlaySoundA>
anyway for the SND_MEMORY what is the image format?
Quote from: MichaelW on April 07, 2010, 03:28:43 AM
My 2003 PSDK documents it, and includes the necessary header file and import library.
My mistake.
I was looking in the Functions by Alphabetical Order which doesn't list everything.
I found PlaySound in my SDK.