ReactOS
0.4.16-dev-853-g88d9285
wunlink.cpp
Go to the documentation of this file.
1
//
2
// wunlink.cpp
3
//
4
// Copyright (c) Microsoft Corporation. All rights reserved.
5
//
6
// The _wremove() and _wunlink() functions, which remove (delete) files.
7
//
8
#include <
corecrt_internal.h
>
9
#include <stdio.h>
10
11
12
13
// Deletes the specified file. Returns zero if successful; returns -1 and sets
14
// errno and _doserrno on failure.
15
extern
"C"
int
__cdecl
_wremove
(
wchar_t
const
*
const
path
)
16
{
17
if
(!
DeleteFileW
(
path
))
18
{
19
__acrt_errno_map_os_error
(
GetLastError
());
20
return
-1;
21
}
22
23
return
0;
24
}
25
26
27
28
extern
"C"
int
__cdecl
_wunlink
(
wchar_t
const
*
const
path
)
29
{
30
return
_wremove
(
path
);
31
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
corecrt_internal.h
__acrt_errno_map_os_error
void __cdecl __acrt_errno_map_os_error(unsigned long)
Definition:
errno.cpp:91
DeleteFileW
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition:
delete.c:39
path
Definition:
wbemprox_private.h:188
GetLastError
DWORD WINAPI GetLastError(void)
Definition:
except.c:1042
_wunlink
int __cdecl _wunlink(wchar_t const *const path)
Definition:
wunlink.cpp:28
_wremove
int __cdecl _wremove(wchar_t const *const path)
Definition:
wunlink.cpp:15
sdk
lib
ucrt
filesystem
wunlink.cpp
Generated on Mon Mar 24 2025 06:14:45 for ReactOS by
1.9.6