Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Brown
  
 York
 
 Paul Brown
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: how to open DVD drive?
Thread ID: 49550 Message ID: 51460 # Views: 1 # Ratings: 0
Version: Visual FoxPro 7 Category: Projects and Design
Date: Monday, September 13, 2004 10:24:47 AM         
   


Hi

Use the mciGetErrorString function to convert an error code to text, e.g. (this will generate an error)

DECLARE INTEGER mciSendString ;
	IN WinMM.DLL ;
	STRING cMCIString,;
	STRING @cRetString,;
	INTEGER nRetLength,;
	INTEGER hInstance

DECLARE INTEGER mciGetErrorString ;
	IN WinMM.DLL ;
	INTEGER fdwError, ;
	STRING @lpszErrorText, ;
	INTEGER cchErrorText   
	
	
LOCAL lcRetString, lnError, lcText
lcRetString = ""
lcText  = SPACE(50)

lnError = mciSendString("Set CDAudio Door Close", @lcRetString, 0,0)

IF lnError <> 0
	mciGetErrorString(lnError, @lcText, LEN(lcText))
	
	WAIT WINDOW lcText
ENDIF


See the MSDN page for the send string API for a list off all the commands it will accept:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/_win32_mcisendstring.asp

Just follow the link to the strings page

HTH
Paul


>
> And, fergossake, could anybody tell me where I am to look up these error codes and see what they mean?!
>
> Regards,
>
> Ilya


ENTIRE THREAD

HOWTO open CD/DVD ROM drive programmatically? Posted by ILYA RABYY @ 8/20/2004 7:19:47 PM
RE: HOWTO open CD/DVD ROM drive programmatically? Posted by Eric den Doop @ 8/20/2004 7:41:09 PM
RE: HOWTO open CD/DVD ROM drive programmatically? Posted by ILYA RABYY @ 8/20/2004 8:24:26 PM
RE: open ROM drive programmatically - CD or DVD? Posted by ILYA RABYY @ 8/20/2004 8:02:18 PM
CD or DVD - nobody knows the answer (or cares)? Posted by ILYA RABYY @ 8/25/2004 5:43:25 PM
RE: CD or DVD - nobody knows the answer (or car... Posted by Ken Blum @ 8/25/2004 6:02:33 PM
RE: CD or DVD - nobody knows the answer (or car... Posted by ILYA RABYY @ 8/25/2004 6:54:32 PM
RE: CD or DVD - nobody knows the answer (or car... Posted by Ken Blum @ 8/25/2004 7:51:45 PM
RE: CD or DVD, and how to open DVD drive? Posted by ILYA RABYY @ 8/25/2004 9:51:26 PM
RE: CD or DVD, and how to open DVD drive? Posted by Ken Blum @ 8/26/2004 4:38:34 PM
RE: how to open DVD drive? Posted by ILYA RABYY @ 9/8/2004 11:27:49 PM
RE: how to open DVD drive? Posted by Paul Brown @ 9/13/2004 10:24:47 AM
RE: how to open DVD drive? Posted by ILYA RABYY @ 9/13/2004 6:59:09 PM
RE: how to open DVD drive? Posted by Paul Brown @ 9/14/2004 9:33:53 AM
RE: how to open DVD drive? Posted by ILYA RABYY @ 9/14/2004 4:47:11 PM
RE: how to open DVD drive? Posted by Paul Brown @ 9/15/2004 9:51:35 AM
RE: HOWTO open CD/DVD ROM drive programmatically? Posted by Jeep @ 9/11/2004 8:28:12 PM
RE: HOWTO open CD/DVD ROM drive programmatically? Posted by ILYA RABYY @ 9/13/2004 5:54:04 PM