Removed dependency on 16-bit file I/O functions.
This commit is contained in:
parent
5b971f009a
commit
69dd0a9467
|
@ -5,7 +5,6 @@ VPATH = @srcdir@
|
|||
MODULE = setupapi
|
||||
SOVERSION = 1.0
|
||||
ALTNAMES = setupx
|
||||
IMPORTS = ntdll
|
||||
|
||||
LDDLLFLAGS = @LDDLLFLAGS@
|
||||
SYMBOLFILE = $(MODULE).tmp.o
|
||||
|
|
|
@ -19,7 +19,7 @@ HINF16 IP_curr_handle = 0;
|
|||
|
||||
RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
|
||||
{
|
||||
HFILE16 hFile = _lopen16(lpInfFileName, OF_READ);
|
||||
HFILE hFile = _lopen(lpInfFileName, OF_READ);
|
||||
|
||||
if (!lphInf)
|
||||
return IP_ERROR;
|
||||
|
@ -28,7 +28,7 @@ RETERR16 IP_OpenInf(LPCSTR lpInfFileName, HINF16 *lphInf)
|
|||
if (IP_curr_handle == 0xffff)
|
||||
return ERR_IP_OUT_OF_HANDLES;
|
||||
|
||||
if (hFile != HFILE_ERROR16)
|
||||
if (hFile != HFILE_ERROR)
|
||||
{
|
||||
InfList = HeapReAlloc(GetProcessHeap(), 0, InfList, InfNumEntries+1);
|
||||
InfList[InfNumEntries].hInf = IP_curr_handle++;
|
||||
|
@ -73,11 +73,11 @@ RETERR16 IP_CloseInf(HINF16 hInf)
|
|||
{
|
||||
int i;
|
||||
WORD n;
|
||||
HFILE16 res = ERR_IP_INVALID_HINF;
|
||||
RETERR16 res = ERR_IP_INVALID_HINF;
|
||||
|
||||
if (IP_FindInf(hInf, &n))
|
||||
{
|
||||
_lclose16(InfList[n].hInfFile);
|
||||
_lclose(InfList[n].hInfFile);
|
||||
HeapFree(GetProcessHeap(), 0, InfList[n].lpInfFileName);
|
||||
for (i=n; i < InfNumEntries-1; i++)
|
||||
InfList[i] = InfList[i+1];
|
||||
|
|
|
@ -65,7 +65,7 @@ enum _IP_ERR {
|
|||
|
||||
typedef struct {
|
||||
HINF16 hInf;
|
||||
HFILE16 hInfFile;
|
||||
HFILE hInfFile;
|
||||
LPSTR lpInfFileName;
|
||||
} INF_FILE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue