Click here to Skip to main content
Licence 
First Posted 22 Apr 2002
Views 44,016
Bookmarked 21 times

Checking Some Peripherals On Logoff

By | 23 Apr 2002 | Article
This is about a program that helps you with some small problems.

Sample Image - smallspot.gif

The Program

When you forget a CD in the CD-ROM at the logoff moment, you could become a little more aggressive than usual. Just in order to keep you cool and useful for society, the program attached to this article solves the problem for you.

To operate the CD-ROM, I've chosen the MCI library. The code in the source looks like this:

mciSendString("open cdaudio wait", NULL, 0, NULL);
mciSendString("set cdaudio door open", NULL, 0, NULL);
mciSendString("close cdaudio wait", NULL, 0, NULL);
   // ...
mciSendString("open cdaudio wait", NULL, 0, NULL);
mciSendString("set cdaudio door closed", NULL, 0, NULL);
mciSendString("close cdaudio wait", NULL, 0, NULL);

Just to be more than stupidly simple, the application organizes two desktops you can switch between. To do this, you must right-click the shell icon in the taskbar and choose "Switch desktop" from the popup menu.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Bogdan Rechi

Software Developer (Senior)

Europe Europe

Member

Working on a dream...

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMultiple CD-like devices PinmemberMike Nordell9:07 23 Apr '02  
GeneralRe: Multiple CD-like devices PinmemberBogdan Rechi21:13 23 Apr '02  
GeneralRe: Multiple CD-like devices PinmemberParesh Solanki0:17 24 Apr '02  
GeneralRe: Multiple CD-like devices PinmemberBogdan Rechi0:20 24 Apr '02  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 24 Apr 2002
Article Copyright 2002 by Bogdan Rechi
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid