blob: c69a599554f052336e258b4fa9c3953423d9610b [file] [log] [blame]
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +00001/*
2 * DOS drive handling declarations
3 *
4 * Copyright 1995 Alexandre Julliard
Alexandre Julliard0799c1a2002-03-09 23:29:33 +00005 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000019 */
20
21#ifndef __WINE_DRIVE_H
22#define __WINE_DRIVE_H
23
Jim Aston2e1cafa1999-03-14 16:35:05 +000024#include "windef.h"
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000025
26#define MAX_DOS_DRIVES 26
27
Alexandre Julliard1e37a181996-08-18 16:21:52 +000028/* Drive flags */
29
30#define DRIVE_DISABLED 0x0001 /* Drive is disabled */
31#define DRIVE_SHORT_NAMES 0x0002 /* Drive fs has 8.3 file names */
32#define DRIVE_CASE_SENSITIVE 0x0004 /* Drive fs is case sensitive */
33#define DRIVE_CASE_PRESERVING 0x0008 /* Drive fs is case preserving */
Alexandre Julliardfbace6e2000-04-04 20:35:45 +000034#define DRIVE_FAIL_READ_ONLY 0x0010 /* Fail opening read-only files for writing */
35#define DRIVE_READ_VOL_INFO 0x0020 /* Try to read volume info from the device? */
Alexandre Julliard1e37a181996-08-18 16:21:52 +000036
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000037extern int DRIVE_Init(void);
38extern int DRIVE_IsValid( int drive );
39extern int DRIVE_GetCurrentDrive(void);
40extern int DRIVE_SetCurrentDrive( int drive );
41extern int DRIVE_FindDriveRoot( const char **path );
42extern const char * DRIVE_GetRoot( int drive );
43extern const char * DRIVE_GetDosCwd( int drive );
44extern const char * DRIVE_GetUnixCwd( int drive );
Andreas Mohr1fe93342000-01-29 21:11:47 +000045extern const char * DRIVE_GetDevice( int drive );
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000046extern const char * DRIVE_GetLabel( int drive );
47extern DWORD DRIVE_GetSerialNumber( int drive );
48extern int DRIVE_SetSerialNumber( int drive, DWORD serial );
Alexandre Julliarda3960291999-02-26 11:11:13 +000049extern UINT DRIVE_GetFlags( int drive );
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000050extern int DRIVE_Chdir( int drive, const char *path );
51extern int DRIVE_Disable( int drive );
52extern int DRIVE_Enable( int drive );
Alexandre Julliard491502b1997-11-01 19:08:16 +000053extern int DRIVE_SetLogicalMapping ( int existing_drive, int new_drive );
Alexandre Julliard60ce85c1998-02-01 18:33:27 +000054extern int DRIVE_OpenDevice( int drive, int flags );
Alexandre Julliarda3960291999-02-26 11:11:13 +000055extern int DRIVE_RawRead(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
56extern int DRIVE_RawWrite(BYTE drive, DWORD begin, DWORD length, BYTE *dataptr, BOOL fake_success );
Alexandre Julliardaef9a362000-10-03 04:19:16 +000057extern char *DRIVE_BuildEnv(void);
Alexandre Julliard4f8c37b1996-01-14 18:12:01 +000058
59#endif /* __WINE_DRIVE_H */