Separated 32 bit functions to shellole.c.
[wine/multimedia.git] / include / file.h
blob4250243a44da67c18c4c56d6ba994e78d6ab53d3
1 /*
2 * File handling declarations
4 * Copyright 1996 Alexandre Julliard
5 */
7 #ifndef __WINE_FILE_H
8 #define __WINE_FILE_H
10 #include <time.h> /* time_t */
11 #include "winbase.h"
13 #define MAX_PATHNAME_LEN 1024
15 /* Definition of a full DOS file name */
16 typedef struct
18 char long_name[MAX_PATHNAME_LEN]; /* Long pathname in Unix format */
19 char short_name[MAX_PATHNAME_LEN]; /* Short pathname in DOS 8.3 format */
20 int drive;
21 } DOS_FULL_NAME;
23 #define IS_END_OF_NAME(ch) (!(ch) || ((ch) == '/') || ((ch) == '\\'))
25 /* DOS device descriptor */
26 typedef struct
28 char *name;
29 int flags;
30 } DOS_DEVICE;
33 /* files/file.c */
34 extern void FILE_SetDosError(void);
35 extern HFILE FILE_DupUnixHandle( int fd, DWORD access );
36 extern BOOL FILE_Stat( LPCSTR unixName, BY_HANDLE_FILE_INFORMATION *info );
37 extern HFILE16 FILE_Dup2( HFILE16 hFile1, HFILE16 hFile2 );
38 extern HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing,
39 LPSECURITY_ATTRIBUTES sa, DWORD creation,
40 DWORD attributes, HANDLE template, BOOL fail_read_only );
41 extern HFILE FILE_CreateDevice( int client_id, DWORD access,
42 LPSECURITY_ATTRIBUTES sa );
43 extern LPVOID FILE_dommap( int unix_handle, LPVOID start,
44 DWORD size_high, DWORD size_low,
45 DWORD offset_high, DWORD offset_low,
46 int prot, int flags );
47 extern int FILE_munmap( LPVOID start, DWORD size_high, DWORD size_low );
48 extern HFILE16 FILE_AllocDosHandle( HANDLE handle );
49 extern BOOL FILE_InitProcessDosHandles( void );
50 extern HANDLE FILE_GetHandle( HFILE16 hfile );
52 /* files/directory.c */
53 extern int DIR_Init(void);
54 extern UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count );
55 extern UINT DIR_GetSystemUnixDir( LPSTR path, UINT count );
56 extern DWORD DIR_SearchPath( LPCSTR path, LPCSTR name, LPCSTR ext,
57 DOS_FULL_NAME *full_name, BOOL win32 );
59 /* files/dos_fs.c */
60 extern void DOSFS_UnixTimeToFileTime( time_t unixtime, LPFILETIME ft,
61 DWORD remainder );
62 extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder );
63 extern BOOL DOSFS_ToDosFCBFormat( LPCSTR name, LPSTR buffer );
64 extern const DOS_DEVICE *DOSFS_GetDevice( const char *name );
65 extern const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE hFile );
66 extern HFILE DOSFS_OpenDevice( const char *name, DWORD access );
67 extern BOOL DOSFS_FindUnixName( LPCSTR path, LPCSTR name, LPSTR long_buf,
68 INT long_len, LPSTR short_buf,
69 BOOL ignore_case );
70 extern BOOL DOSFS_GetFullName( LPCSTR name, BOOL check_last,
71 DOS_FULL_NAME *full );
72 extern int DOSFS_FindNext( const char *path, const char *short_mask,
73 const char *long_mask, int drive, BYTE attr,
74 int skip, WIN32_FIND_DATAA *entry );
76 #endif /* __WINE_FILE_H */