Im currently working on a Media Player and Im using mciSendString to display and control the media.
An important part of my program involves getting the length of the media file loaded by using the command string 'status movie length'.
Data
TotalLengthMP db 'status movie length',0
TotalLength dd 257 dup (0)
Code
LOCAL TotalLength:DWORD
invoke mciSendString,addr TotalLengthMP,addr TotalLength,sizeof TotalLength,0
How can I get the number thats in TotalLength and put it in TotalLength?
Hi Dan. What specifically are you trying to do, your discription is a little ambiguous. Maybe this will help:
; lets say that StatusMovieLength is ASCII "123456",0
invoke mciSendString,addr TotalLengthMP,addr StatusMovieLength,sizeof TotalLength,0
invoke atodw,addr StatusMovieLength ; returns eax (0x1E240)
; use eax or copy its value somewhere
Sorry about my post, I was quite tired when I made it. Also thanks for the solution to my problem.
Hehe, don't feel bad. I've done much worse... :toothy
http://www.masmforum.com/simple/index.php?topic=2351.0