ejecting_20a_20removable_20disk
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ejecting_20a_20removable_20disk [2018/03/31 13:19] – external edit 127.0.0.1 | ejecting_20a_20removable_20disk [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| //by Richard Russell, November 2007//\\ \\ The routine listed below will eject a disk (if any) in the specified drive; it requires **Windows NT4**, **Windows 2000**, **Windows XP** or **Windows Vista**. It should be called using code similar to the following: | //by Richard Russell, November 2007//\\ \\ The routine listed below will eject a disk (if any) in the specified drive; it requires **Windows NT4**, **Windows 2000**, **Windows XP** or **Windows Vista**. It should be called using code similar to the following: | ||
| + | <code bb4w> | ||
| IF FNeject(" | IF FNeject(" | ||
| PRINT "Eject succeeded" | PRINT "Eject succeeded" | ||
| Line 7: | Line 8: | ||
| PRINT "Eject failed" | PRINT "Eject failed" | ||
| ENDIF | ENDIF | ||
| + | </ | ||
| The specified drive name must include the colon (**:**). Note that it is possible for the routine to return FALSE even though the disk was actually ejected. If the drive is currently in use by another application the routine will fail.\\ \\ Here is the code:\\ \\ | The specified drive name must include the colon (**:**). Note that it is possible for the routine to return FALSE even though the disk was actually ejected. If the drive is currently in use by another application the routine will fail.\\ \\ Here is the code:\\ \\ | ||
| + | <code bb4w> | ||
| DEF FNeject(drive$) | DEF FNeject(drive$) | ||
| LOCAL hVolume%, ejectSucceeded%, | LOCAL hVolume%, ejectSucceeded%, | ||
| Line 86: | Line 89: | ||
| \ ^dwBytesReturned%, | \ ^dwBytesReturned%, | ||
| = result% | = result% | ||
| + | </ | ||
ejecting_20a_20removable_20disk.1522502358.txt.gz · Last modified: 2024/01/05 00:18 (external edit)