PlaySound in Windows Service

C

CKKwan

I can do this in XP, if the Windows Service is log on using a valid
user account.

But cannot get this to work in Vista.

May I know what is missing?

TIA.
 
S

sturyuu5eye

1st, user need this application running without logon to Windows.
2nd, this application will continuously monitor event and boardcast
via speaker (something like what you heard in Airport terminal).
 
J

Jeff Johnson

1st, user need this application running without logon to Windows.
2nd, this application will continuously monitor event and boardcast
via speaker (something like what you heard in Airport terminal).

Is "Don't use Vista" an option?
 
S

sturyuu5eye

Unfortunately no. Because this is a new system, and they are planing
to migrate all systems to Vista. This is the second application.

If don't use Vista is an option, then I lose my job already.
 
A

andy.johnstone

Hi,

Usually to build something that interacts with the desktop, you need
to split things into two; the background service, which is always
running and monitoring whatever, and a desktop application (which
could just be a tray application or maybe no UI at all) that connects
to the service. When the service sees something "interesting" it can
broadcast to any listening application. The desktop upon hearing that
something interesting happened can then play the sound.

Of course you must be logged on for this to work; I don't think
there's any way to play sounds when not logged on (well, not that you
could do.. MS likely has ways for the logon program to do this).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top