Skip to content

Commit bfe25d0

Browse files
authored
Merge pull request FreeRDP#11664 from akallabeth/winpr-createfile
[winpr,file] fix definition of winpr_CreateFile
2 parents 6e7216c + ef6b4ef commit bfe25d0

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

winpr/include/winpr/file.h

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,6 @@ extern "C"
263263
{
264264
#endif
265265

266-
WINPR_ATTR_MALLOC(CloseHandle, 1)
267-
WINPR_API HANDLE winpr_CreateFile(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
268-
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
269-
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,
270-
HANDLE hTemplateFile);
271-
272266
WINPR_DEPRECATED_VAR("since 3.16.0, Use winpr_CreateFile",
273267
WINPR_ATTR_MALLOC(CloseHandle, 1) WINPR_API HANDLE CreateFileA(
274268
LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
@@ -472,14 +466,28 @@ typedef struct
472466

473467
#endif /* _WIN32 */
474468

475-
WINPR_API BOOL ValidFileNameComponent(LPCWSTR lpFileName);
469+
#ifdef __cplusplus
470+
extern "C"
471+
{
472+
#endif
473+
WINPR_API BOOL ValidFileNameComponent(LPCWSTR lpFileName);
476474

477475
#if defined(_UWP) || !defined(_WIN32)
478476
WINPR_API DWORD GetLogicalDriveStringsA(DWORD nBufferLength, LPSTR lpBuffer);
479477

480478
WINPR_API DWORD GetLogicalDriveStringsW(DWORD nBufferLength, LPWSTR lpBuffer);
481479
#endif
482480

481+
WINPR_ATTR_MALLOC(CloseHandle, 1)
482+
WINPR_API HANDLE winpr_CreateFile(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
483+
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
484+
DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,
485+
HANDLE hTemplateFile);
486+
487+
#ifdef __cplusplus
488+
}
489+
#endif
490+
483491
#ifdef _UWP
484492

485493
#ifdef __cplusplus

0 commit comments

Comments
 (0)