aboutsummaryrefslogtreecommitdiff
path: root/src/cyn_file_win_x64.c
diff options
context:
space:
mode:
authorbonmas14 <bonmas14@gmail.com>2025-09-25 14:17:07 +0300
committerbonmas14 <bonmas14@gmail.com>2025-09-25 14:17:07 +0300
commit166877cf15f6afa89c9f8a61e267d485868d0ee1 (patch)
tree9f080314edc4fb293f91227cdc1c01cfec8d7bae /src/cyn_file_win_x64.c
parent8ebdc95621bc61fdf3c98cd7ae4ddca67398df23 (diff)
downloadungrateful-166877cf15f6afa89c9f8a61e267d485868d0ee1.tar.gz
ungrateful-166877cf15f6afa89c9f8a61e267d485868d0ee1.zip
+disgrace and rework of ungrateful.h
Diffstat (limited to 'src/cyn_file_win_x64.c')
-rw-r--r--src/cyn_file_win_x64.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/cyn_file_win_x64.c b/src/cyn_file_win_x64.c
new file mode 100644
index 0000000..1ded1de
--- /dev/null
+++ b/src/cyn_file_win_x64.c
@@ -0,0 +1,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
+);
+*/