msi/tests: Use CreateFile instead of OpenFile to avoid handle casts.
This commit is contained in:
parent
1f83e7d9fd
commit
35811a9078
|
@ -5742,14 +5742,13 @@ static void test_noquotes(void)
|
||||||
|
|
||||||
static void read_file_data(LPCSTR filename, LPSTR buffer)
|
static void read_file_data(LPCSTR filename, LPSTR buffer)
|
||||||
{
|
{
|
||||||
OFSTRUCT ofs;
|
HANDLE file;
|
||||||
HFILE file;
|
|
||||||
DWORD read;
|
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);
|
ZeroMemory(buffer, MAX_PATH);
|
||||||
ReadFile((HANDLE)file, buffer, MAX_PATH, &read, NULL);
|
ReadFile(file, buffer, MAX_PATH, &read, NULL);
|
||||||
CloseHandle((HANDLE)file);
|
CloseHandle(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_forcecodepage(void)
|
static void test_forcecodepage(void)
|
||||||
|
|
Loading…
Reference in New Issue