Debian Codegraph @

libcfile/libcfile_winapi.h

raw symbols SCIP
1 /*
2 * WINAPI fallback functions
3 *
4 * Copyright (C) 2008-2024, Joachim Metz <[email protected]>
5 *
6 * Refer to AUTHORS for acknowledgements.
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22 #if !defined( _LIBCFILE_WINAPI_H )
23 #define _LIBCFILE_WINAPI_H
24
25 #include <common.h>
26 #include <types.h>
27
28 #if defined( __cplusplus )
29 extern "C" {
30 #endif
31
32 #if defined( WINAPI ) && ( WINVER <= 0x0500 )
33
34 BOOL libcfile_CloseHandle(
35 HANDLE file_handle );
36
37 HANDLE libcfile_CreateFileA(
38 LPCSTR filename,
39 DWORD desired_access,
40 DWORD share_mode,
41 SECURITY_ATTRIBUTES *security_attributes,
42 DWORD creation_disposition,
43 DWORD flags_and_attributes,
44 HANDLE template_file );
45
46 #if defined( HAVE_WIDE_CHARACTER_TYPE )
47
48 HANDLE libcfile_CreateFileW(
49 LPCWSTR filename,
50 DWORD desired_access,
51 DWORD share_mode,
52 SECURITY_ATTRIBUTES *security_attributes,
53 DWORD creation_disposition,
54 DWORD flags_and_attributes,
55 HANDLE template_file );
56
57 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
58
59 BOOL libcfile_GetOverlappedResult(
60 HANDLE file_handle,
61 OVERLAPPED *overlapped,
62 DWORD *read_count,
63 BOOL wait_io_complete );
64
65 BOOL libcfile_ReadFile(
66 HANDLE file_handle,
67 VOID *buffer,
68 DWORD read_size,
69 DWORD *read_count,
70 OVERLAPPED *overlapped );
71
72 BOOL libcfile_WriteFile(
73 HANDLE file_handle,
74 VOID *buffer,
75 DWORD write_size,
76 DWORD *write_count,
77 OVERLAPPED *overlapped );
78
79 BOOL libcfile_SetFilePointerEx(
80 HANDLE file_handle,
81 LARGE_INTEGER distance_to_move_large_integer,
82 LARGE_INTEGER *new_file_pointer_large_integer,
83 DWORD move_method );
84
85 BOOL libcfile_SetEndOfFile(
86 HANDLE file_handle );
87
88 BOOL libcfile_GetFileSizeEx(
89 HANDLE file_handle,
90 LARGE_INTEGER *file_size_large_integer );
91
92 DWORD libcfile_GetFileType(
93 HANDLE file_handle );
94
95 DWORD libcfile_GetFileAttributesA(
96 LPCSTR filename );
97
98 #if defined( HAVE_WIDE_CHARACTER_TYPE )
99
100 DWORD libcfile_GetFileAttributesW(
101 LPCWSTR filename );
102
103 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
104
105 BOOL libcfile_DeleteFileA(
106 LPCSTR filename );
107
108 #if defined( HAVE_WIDE_CHARACTER_TYPE )
109
110 BOOL libcfile_DeleteFileW(
111 LPCWSTR filename );
112
113 #endif /* defined( HAVE_WIDE_CHARACTER_TYPE ) */
114
115 #endif /* defined( WINAPI ) && ( WINVER <= 0x0500 ) */
116
117 #if defined( __cplusplus )
118 }
119 #endif
120
121 #endif /* !defined( _LIBCFILE_WINAPI_H ) */
122