Making two infinate loops inside the other?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2004
Posts: 4,443
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 250
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Making two infinate loops inside the other?

 
0
  #11
Feb 19th, 2008
Does this sort of thing make sense:
  1. while ( 1 )
  2. {
  3. // PART A
  4. DWORD d = 0;
  5. DeviceIoControl(hcd, IOCTL_STORAGE_EJECT_MEDIA, NULL,
  6. 0, NULL, 0, &d, NULL);
  7. DeviceIoControl(hcd, IOCTL_STORAGE_LOAD_MEDIA, NULL,
  8. 0, NULL, 0, &d, NULL);
  9. // PART B
  10. SetCursorPos( X, Y );
  11. }
Last edited by Dave Sinkula; Feb 19th, 2008 at 3:48 pm.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 80
Reputation: cosmos22 is an unknown quantity at this point 
Solved Threads: 0
cosmos22's Avatar
cosmos22 cosmos22 is offline Offline
Junior Poster in Training

Re: Making two infinate loops inside the other?

 
0
  #12
Feb 19th, 2008
Nearly, I tried that myself. I'll explain:

When the drive loads, this sets the mouse position, then it gives the user time to react by closing the window, before the drive loads again. You see? And yes, even giving this condition after the ejection still doesn't suffice.

I want them both to be running at the same time constantly.

On that note, is it possible to hide the command window? This would suffice...
Last edited by cosmos22; Feb 19th, 2008 at 4:07 pm.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC