Click here to Skip to main content
12,622,032 members (36,693 online)
Click here to Skip to main content
Add your own
alternative version

Stats

47.5K views
359 downloads
21 bookmarked
Posted

Checking Some Peripherals On Logoff

, 23 Apr 2002
Rate this:
Please Sign up or sign in to vote.
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

Share

About the Author

Hans Ruck
Software Developer (Senior)
Europe Europe
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralMultiple CD-like devices Pin
Mike Nordell23-Apr-02 10:07
memberMike Nordell23-Apr-02 10:07 
GeneralRe: Multiple CD-like devices Pin
Bogdan Rechi23-Apr-02 22:13
memberBogdan Rechi23-Apr-02 22:13 
GeneralRe: Multiple CD-like devices Pin
Paresh Solanki24-Apr-02 1:17
memberParesh Solanki24-Apr-02 1:17 
GeneralRe: Multiple CD-like devices Pin
Bogdan Rechi24-Apr-02 1:20
memberBogdan Rechi24-Apr-02 1:20 

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

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

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161128.1 | Last Updated 24 Apr 2002
Article Copyright 2002 by Hans Ruck
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid