kernel32: Add partial CreateFile2 implementation.

This commit is contained in:
André Hentschel 2013-09-10 00:24:55 +02:00 committed by Alexandre Julliard
parent 26d42b9d5c
commit fa6b058070
4 changed files with 58 additions and 0 deletions

View File

@ -42,6 +42,7 @@
#include "wincon.h"
#include "ddk/ntddk.h"
#include "kernel_private.h"
#include "fileapi.h"
#include "wine/exception.h"
#include "wine/unicode.h"
@ -1527,6 +1528,20 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
return CreateFileW( nameW, access, sharing, sa, creation, attributes, template );
}
/*************************************************************************
* CreateFile2 (KERNEL32.@)
*/
HANDLE WINAPI CreateFile2( LPCWSTR filename, DWORD access, DWORD sharing, DWORD creation,
CREATEFILE2_EXTENDED_PARAMETERS *exparams )
{
LPSECURITY_ATTRIBUTES sa = exparams ? exparams->lpSecurityAttributes : NULL;
DWORD attributes = exparams ? exparams->dwFileAttributes : 0;
HANDLE template = exparams ? exparams->hTemplateFile : NULL;
FIXME("(%s %x %x %x %p), partial stub\n", debugstr_w(filename), access, sharing, creation, exparams);
return CreateFileW( filename, access, sharing, sa, creation, attributes, template );
}
/***********************************************************************
* DeleteFileW (KERNEL32.@)

View File

@ -229,6 +229,7 @@
@ stdcall CreateEventW(ptr long long wstr)
@ stdcall CreateFiber(long ptr ptr)
@ stdcall CreateFiberEx(long long long ptr ptr)
@ stdcall CreateFile2(wstr long long long ptr)
@ stdcall CreateFileA(str long long ptr long long long)
@ stdcall CreateFileMappingA(long ptr long long long str)
@ stdcall CreateFileMappingW(long ptr long long long wstr)

View File

@ -302,6 +302,7 @@ SRCDIR_INCLUDES = \
exdispid.h \
fci.h \
fdi.h \
fileapi.h \
fltdefs.h \
gdiplus.h \
gdipluscolor.h \

41
include/fileapi.h Normal file
View File

@ -0,0 +1,41 @@
/*
* Copyright 2013 André Hentschel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_FILEAPI_H
#define __WINE_FILEAPI_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _CREATEFILE2_EXTENDED_PARAMETERS {
DWORD dwSize;
DWORD dwFileAttributes;
DWORD dwFileFlags;
DWORD dwSecurityQosFlags;
LPSECURITY_ATTRIBUTES lpSecurityAttributes;
HANDLE hTemplateFile;
} CREATEFILE2_EXTENDED_PARAMETERS, *PCREATEFILE2_EXTENDED_PARAMETERS, *LPCREATEFILE2_EXTENDED_PARAMETERS;
WINBASEAPI HANDLE WINAPI CreateFile2(LPCWSTR,DWORD,DWORD,DWORD,LPCREATEFILE2_EXTENDED_PARAMETERS);
#ifdef __cplusplus
}
#endif
#endif /* __WINE_FILEAPI_H */