blob: 1ded1de007c1dc310d4a28fe1b3b8e7b649860ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
File_Handle *cyn_file_open(String path, File_Status *status) {
wchar *final_path;
Allocator talloc;
talloc = un_alloc_temp_get();
final_path = un_wstring_from_string(path, talloc);
if (path.size > MAX_PATH) {
if (status != NULL) *status = CYN_FILE_ERROR_MAX_PATH;
return NULL;
}
if (final_path == NULL) {
if (status != NULL) *status = CYN_FILE_ERROR_NULL_FILENAME;
return NULL; // @todo status
}
//CreateFileW();
if (status != NULL) *status = CYN_FILE_ERROR;
return NULL;
}
/*
HANDLE CreateFileW(
LPCWSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
NULL,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
NULL
);
*/
|