flat assembler
Message board for the users of flat assembler.
Index
> Windows > newbie question: mp3 play not working ? :( |
Author |
|
vbVeryBeginner 10 Aug 2006, 02:42
the winmm.dll doesn't seem get imported in ur code.
|
|||
10 Aug 2006, 02:42 |
|
Basic2 10 Aug 2006, 03:10
i just found out useing a DLL viewer that theres only mciSendStringA and mciSendStringW Damn win32.hlp file didnt show it.
but i try with both still crash |
|||
10 Aug 2006, 03:10 |
|
SFeLi 10 Aug 2006, 04:52
mciSendString has four parameters:
mciSendString(lpszCommand,lpszReturnString,cchReturn,hwndCallback).
|
|||||||||||
10 Aug 2006, 04:52 |
|
Basic2 10 Aug 2006, 05:08
Code: include 'win32ax.inc' .data title db "playing",0 msg db "Stop music press on Ok",0 .code start: invoke mciSendString,'load "D:\all\mp3\2fast.mp3" alias media',0,0,0 invoke MessageBox,0,title,msg,MB_OK ender: invoke ExitProcess,0 .end start library winmp3,'winmm.dll' import winmp3,mciSendString,'mciSendStringW' ;import winmp3,mciSendString,'mciSendStringA' ; Crash too Still Crashes i dont get why, maybe a bug ? i know second parm can be a pointer to a buffer maybe thats whats wrong? |
|||
10 Aug 2006, 05:08 |
|
LocoDelAssembly 10 Aug 2006, 05:11
vbVeryBeginner is right, "library" macro seems to be imposible to use it twice.
|
|||
10 Aug 2006, 05:11 |
|
Basic2 10 Aug 2006, 05:27
Can i get example on how it work?
thanks |
|||
10 Aug 2006, 05:27 |
|
SFeLi 10 Aug 2006, 05:33
You're not importing winmm! All imports must be placed into imports table. It can be defined as:
Code: data import ;imports table here end data ;or as section section '.idata' import data readable writeable ;imports table here win32ax.inc defines standard imports table with no winmm imports when you use .end macro. Code: include 'win32ax.inc' entry start .data title db "playing",0 msg db "Stop music press on Ok",0 .code start: invoke mciSendString,'load "D:\all\mp3\2fast.mp3" alias media',0,0,0 invoke MessageBox,0,title,msg,MB_OK ender: invoke ExitProcess,0 ;.end start ;Adds default imports table. data import library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ winmm,'WINMM.DLL' include 'apia/kernel32.inc' include 'apia/user32.inc' import winmm,\ mciSendString,'mciSendStringA' end data |
|||
10 Aug 2006, 05:33 |
|
Basic2 10 Aug 2006, 05:53
Sweet thanks SFeLi
Code: include 'win32ax.inc' entry start .data title db "playing",0 msg db "Stop music press on Ok",0 .code start: invoke mciSendString,'open "D:\all\mp3\2fast.mp3" alias media',0,0,0 invoke mciSendString,'play media',0,0,0 invoke MessageBox,0,title,msg,MB_OK ender: invoke ExitProcess,0 ;.end start ;Adds default imports table. data import library kernel32,'KERNEL32.DLL',\ user32,'USER32.DLL',\ winmm,'WINMM.DLL' include 'apia/kernel32.inc' include 'apia/user32.inc' import winmm,\ mciSendString,'mciSendStringA' end data now working proberly, i'ma make some more on it Regardz |
|||
10 Aug 2006, 05:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.