Boolean DiskSave(
DiskHandle disk,
void * buffer, /* data will be written here */
word * bufferSize); /* Size of buffer (in bytes) */
This routine writes information about a disk in the specified buffer.
DiskRestore()
can use this information to return the disk handle, even in another session of GEOS. The
bufferSize
argument should point to a word containing the size of the buffer (in bytes). If the buffer is large enough,
DiskSave()
will write an opaque data structure into the buffer, and change the value of
*bufferSize
to the actual size of the data structure; any extra buffer space can be freed or otherwise used. In this case,
DiskSave()
will return
true
(i.e. non-zero). If the buffer was too small,
DiskSave()
will return
false
(i.e. zero) and write the size needed into
*bufferSize
. Simply call
DiskSave()
again with a large enough buffer. If
DiskSave()
failed for some other reason, it will return
false
and set
*bufferSize
to zero.
See Also: DiskRestore().
Include: disk.h
word DiskSetVolumeName(
DiskHandle dh,
const char * name); /* Change the name to this */
This routine changes the disk's volume label. If it is successful, it returns zero; otherwise it returns an error code. It also sets or clears the thread's error value appropriately. The following error codes may be returned:
Include: disk.h
word DosExec(
const char * prog,
DiskHandle progDisk,
const char * arguments,
const char * execDir,
DiskHandle execDisk,
DosExecFlags flags);
This routine shuts down GEOS to run a DOS program. It returns an error code if an error occurs or zero if successful. Its parameters are listed below:
prog
progDisk
arguments
execDir
execDisk
is zero, the program will be run in the directory in which GEOS was first started.
execDisk
execDir
.
flags
DosExecFlags
indicating whether the DOS program will give a prompt to the user to return to GEOS. The possible flags are DEF_PROMPT, DEF_FORCED_SHUTDOWN, and DEF_INTERACTIVE. For more information, see the entry for
DosExecFlags
.
If there was no error,
DosExec()
will return zero. Otherwise it will return one of the following error values: ERROR_FILE_NOT_FOUND, ERROR_DOS_EXEC_IN_PROGRESS, ERROR_INSUFFICIENT_MEMORY, or ERROR_ARGS_TOO_LONG.
Include: system.h
GEOS SDK TechDocs
|
|
DiskGetDrive() ...
|
DriveGetDefaultMedia() ...