Hello, I have a quick question. Say i want to write a program that, when executed will go to a website, and play a wav file & also not be visible. For example... .386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc include \masm32\include\shell32.inc includelib \masm32\lib\shell32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib .data Url db "http://MySpace.MyServer.com/SomeMusic.wav",0 ;just an example .code start: Invoke ShellExecute,NULL,NULL,Addr Url,NULL,NULL, SW_HIDE Invoke ExitProcess, NULL end start This code will open up my Defualt web browser, and start to play my wav file. The SW_HIDE (i thought) would hide the browser while the wav file is being played. How can i make this work? Do i need fill hWnd or something? Also, i don't want the browser to remain open (and hidden) once the file is finished playing. So how can i make it auto-close so to speak? I know it is possible to add a wav file to the program itself, but that's not what i am aiming for here. I just want to explore something new... Thanks, Nokturnal
Posted on 2001-01-23 20:33:00 by Nokturnal
The nShowCmd is only used if the lpFile parameter is an exe file.
Posted on 2001-01-24 00:55:00 by Varunun
Hi, Win32 docu said about nShowCmd: .. Flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it. .. maybe you can try SW_SHOWMINIMIZED or some others.
Posted on 2001-01-24 09:27:00 by beaster
Okay, so forget using shellexecute. Can anyone show me how to use winsock to send a message out to a website? Possibly play the wav file hidden that way, or maybe it could copy the wav from the website to disk and then play it/delete when finished...? What do you guys think, is this possible? Anyone wanna try it? Thanks again, Nokturnal
Posted on 2001-01-24 16:24:00 by Nok
PlaySound API this plays wavs but I don't now if it accepts URLs
Posted on 2001-01-24 16:33:00 by Hiroshimator
Iczelion has a tutorial about WinSock, so you can read that. Or, you can look at the WinInet API at: http://msdn.microsoft.com/workshop/networking/wininet/overview/overview.asp It looks pretty simple to use. Use InternetOpenUrl, InternetReadFile, and then PlaySound. It *looks* like it would work.
Posted on 2001-01-24 17:43:00 by mookmar