Alexandre Julliard : msi/tests: Use CreateFile instead of OpenFile to avoid handle casts.
Alexandre Julliard
julliard at winehq.org
Thu Jan 8 08:30:59 CST 2009
Module: wine
Branch: master
Commit: 35811a9078b742de36f2618d783ece78cfd8e540
URL: http://source.winehq.org/git/wine.git/?a=commit;h=35811a9078b742de36f2618d783ece78cfd8e540
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 8 13:05:27 2009 +0100
msi/tests: Use CreateFile instead of OpenFile to avoid handle casts.
---
dlls/msi/tests/db.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c
index 4037ac6..d04823e 100644
--- a/dlls/msi/tests/db.c
+++ b/dlls/msi/tests/db.c
@@ -5742,14 +5742,13 @@ static void test_noquotes(void)
static void read_file_data(LPCSTR filename, LPSTR buffer)
{
- OFSTRUCT ofs;
- HFILE file;
+ HANDLE file;
DWORD read;
- file = OpenFile(filename, &ofs, OF_READ);
+ file = CreateFileA( filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL );
ZeroMemory(buffer, MAX_PATH);
- ReadFile((HANDLE)file, buffer, MAX_PATH, &read, NULL);
- CloseHandle((HANDLE)file);
+ ReadFile(file, buffer, MAX_PATH, &read, NULL);
+ CloseHandle(file);
}
static void test_forcecodepage(void)
More information about the wine-cvs
mailing list