Commit 69dd0a94 authored by Alexandre Julliard's avatar Alexandre Julliard

Removed dependency on 16-bit file I/O functions.

parent 5b971f00
...@@ -5,7 +5,6 @@ VPATH = @srcdir@ ...@@ -5,7 +5,6 @@ VPATH = @srcdir@
MODULE = setupapi MODULE = setupapi
SOVERSION = 1.0 SOVERSION = 1.0
ALTNAMES = setupx ALTNAMES = setupx
IMPORTS = ntdll
LDDLLFLAGS = @LDDLLFLAGS@ LDDLLFLAGS = @LDDLLFLAGS@
SYMBOLFILE = $(MODULE).tmp.o SYMBOLFILE = $(MODULE).tmp.o
......
...@@ -19,7 +19,7 @@ HINF16 IP_curr_handle = 0; ...@@ -19,7 +19,7 @@ HINF16 IP_curr_handle = 0;
RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf) RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
{ {
HFILE16 hFile = _lopen16(lpInfFileName, OF_READ); HFILE hFile = _lopen(lpInfFileName, OF_READ);
if (!lphInf) if (!lphInf)
return IP_ERROR; return IP_ERROR;
...@@ -28,7 +28,7 @@ RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf) ...@@ -28,7 +28,7 @@ RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
if (IP_curr_handle == 0xffff) if (IP_curr_handle == 0xffff)
return ERR_IP_OUT_OF_HANDLES; return ERR_IP_OUT_OF_HANDLES;
if (hFile != HFILE_ERROR16) if (hFile != HFILE_ERROR)
{ {
InfList = HeapReAlloc(GetProcessHeap(), 0, InfList, InfNumEntries+1); InfList = HeapReAlloc(GetProcessHeap(), 0, InfList, InfNumEntries+1);
InfList[InfNumEntries].hInf = IP_curr_handle++; InfList[InfNumEntries].hInf = IP_curr_handle++;
...@@ -73,11 +73,11 @@ RETERR16 IP_CloseInf(HINF16 hInf) ...@@ -73,11 +73,11 @@ RETERR16 IP_CloseInf(HINF16 hInf)
{ {
int i; int i;
WORD n; WORD n;
HFILE16 res = ERR_IP_INVALID_HINF; RETERR16 res = ERR_IP_INVALID_HINF;
if (IP_FindInf(hInf, &n)) if (IP_FindInf(hInf, &n))
{ {
_lclose16(InfList[n].hInfFile); _lclose(InfList[n].hInfFile);
HeapFree(GetProcessHeap(), 0, InfList[n].lpInfFileName); HeapFree(GetProcessHeap(), 0, InfList[n].lpInfFileName);
for (i=n; i < InfNumEntries-1; i++) for (i=n; i < InfNumEntries-1; i++)
InfList[i] = InfList[i+1]; InfList[i] = InfList[i+1];
......
...@@ -65,7 +65,7 @@ enum _IP_ERR { ...@@ -65,7 +65,7 @@ enum _IP_ERR {
typedef struct { typedef struct {
HINF16 hInf; HINF16 hInf;
HFILE16 hInfFile; HFILE hInfFile;
LPSTR lpInfFileName; LPSTR lpInfFileName;
} INF_FILE; } INF_FILE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment