flat assembler
Message board for the users of flat assembler.

Index > Windows > Adding WAV to resources

Author
Thread Post new topic Reply to topic
M@X



Joined: 26 Dec 2003
Posts: 1
Location: Ukraine
M@X 07 Sep 2004, 06:20
Hi, ppl. I had a trouble adding WAV files to resources. Is anybody can write a sample how this can be done.
Post 07 Sep 2004, 06:20
View user's profile Send private message ICQ Number Reply with quote
DEMON



Joined: 01 Aug 2004
Posts: 26
Location: Republic of Belarus
DEMON 07 Sep 2004, 17:35
You can add to *.res file string like as:

Code:
MySound SOUND "sound.wav"    


To play WAV-resourse you can use function PlaySound.
Post 07 Sep 2004, 17:35
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 07 Sep 2004, 17:58
try put this into ur .asm file, please provide ur own .wav file!
or copy it from ur windows directory, or just change the link to it.

assembled with FASM 1.55, and it works on my PC :p
also, please take a look on the "INCLUDE\EQUATES\KERNEL32.INC"

; Resource types

Resource-Definition Statements <- PSDK help file, can be downloaded from microsoft website. there are lot of information inside

Code:
section '.rsrc' resource data readable
   directory       RT_RCDATA,mysound
   
    resource        mysound,\
                  30,LANG_NEUTRAL,soundfile
   
    fileres soundfile,"The Microsoft Sound.wav"
    


you can try visit http://sulaiman.thefreebizhost.com for converted FASM code :p

sincerely,
vbVeryBeginner
Post 07 Sep 2004, 17:58
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1 04 Oct 2004, 12:24
Quote:
Resource-Definition Statements <- PSDK help file, can be downloaded from microsoft website

I didn`t manage to find such a help file. Could somebody give me any download link please.
Post 04 Oct 2004, 12:24
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 04 Oct 2004, 15:32
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm

this is a rather big file,
if you got BIG pipe, fast internet connection, it should be no problem Smile

sincerely,
me
Post 04 Oct 2004, 15:32
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1 04 Oct 2004, 17:10
thank you, but size... errr... Sad
Post 04 Oct 2004, 17:10
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 04 Oct 2004, 22:37
a small one is here (in .hlp format)

http://www.borland.com/devsupport/borlandcpp/patches/BC52HLP1.ZIP

win32 api reference about (5.43 mb)

sincerely,
sulaiman chang
Post 04 Oct 2004, 22:37
View user's profile Send private message Visit poster's website Reply with quote
veach1



Joined: 16 Jul 2004
Posts: 165
veach1 05 Oct 2004, 06:35
great! thank you!
Post 05 Oct 2004, 06:35
View user's profile Send private message Reply with quote
semiono



Joined: 31 Aug 2007
Posts: 198
Location: section '.code' executable
semiono 24 Jan 2014, 23:16
Code:
include '%fasm%/win64ax.inc'
section '.code' executable
start:
        sub rsp,8

        invoke PlaySound,a,NULL,13

        invoke MessageBoxTimeout,HWND_DESKTOP,'Stop','',MB_TOPMOST,LANG_NEUTRAL,5000
exit:
        invoke ExitProcess,NULL

section '.data' readable

        a file 'Play.wav'

section '.idata' import readable

        library kernel32,'KERNEL32.DLL',user32,'USER32.DLL',winmm,'WINMM.DLL'
        include '%fasm%/api/kernel32.inc'
        include '%fasm%/api/user32.inc'
        import winmm,PlaySound,'PlaySound'    


wasm.ru (c) Very Happy
Post 24 Jan 2014, 23:16
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.