Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3cfb018e
Commit
3cfb018e
authored
May 18, 2007
by
Hans Leidekker
Committed by
Alexandre Julliard
May 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Don't require a valid version section for INF_STYLE_OLDNT files.
parent
5058fabf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
4 deletions
+42
-4
parser.c
dlls/setupapi/parser.c
+3
-3
query.c
dlls/setupapi/tests/query.c
+39
-1
No files found.
dlls/setupapi/parser.c
View file @
3cfb018e
...
...
@@ -925,7 +925,7 @@ static void append_inf_file( struct inf_file *parent, struct inf_file *child )
*
* parse an INF file.
*/
static
struct
inf_file
*
parse_file
(
HANDLE
handle
,
const
WCHAR
*
class
,
UINT
*
error_line
)
static
struct
inf_file
*
parse_file
(
HANDLE
handle
,
const
WCHAR
*
class
,
DWORD
style
,
UINT
*
error_line
)
{
void
*
buffer
;
DWORD
err
=
0
;
...
...
@@ -1002,7 +1002,7 @@ static struct inf_file *parse_file( HANDLE handle, const WCHAR *class, UINT *err
}
}
if
(
error_line
)
*
error_line
=
0
;
err
=
ERROR_WRONG_INF_STYLE
;
if
(
style
&
INF_STYLE_WIN4
)
err
=
ERROR_WRONG_INF_STYLE
;
}
done:
...
...
@@ -1145,7 +1145,7 @@ HINF WINAPI SetupOpenInfFileW( PCWSTR name, PCWSTR class, DWORD style, UINT *err
if
(
handle
!=
INVALID_HANDLE_VALUE
)
{
file
=
parse_file
(
handle
,
class
,
error
);
file
=
parse_file
(
handle
,
class
,
style
,
error
);
CloseHandle
(
handle
);
}
if
(
!
file
)
...
...
dlls/setupapi/tests/query.c
View file @
3cfb018e
...
...
@@ -101,6 +101,27 @@ static void create_inf_file(LPSTR filename)
CloseHandle
(
hf
);
}
static
void
create_inf_file2
(
LPSTR
filename
)
{
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"[SourceFileInfo]
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
bitsinst.exe=250B3702C7CCD7C2F9E4DAA1555C933E,000600060A28062C,27136,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
bitsprx2.dll=4EBEA67F4BB4EB402E725CA7CA2857AE,000600060A280621,7680,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
bitsprx3.dll=C788A1D9330DA011EF25E95D3BC7BDE5,000600060A280621,7168,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
qmgr.dll=696AC82FB290A03F205901442E0E9589,000600060A280621,361984,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
qmgrprxy.dll=8B5848144829E1BC985EA4C3D8CA7E3F,000600060A280621,17408,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
winhttp.dll=3EC6F518114606CA59D4160322077437,000500010A280615,331776,SP1QFE
\n
"
);
append_str
(
&
ptr
,
"sp1qfe
\\
xpob2res.dll=DB83156B9F496F20D1EA70E4ABEC0166,000500010A280622,158720,SP1QFE
\n
"
);
WriteFile
(
hf
,
data
,
ptr
-
data
,
&
dwNumberOfBytesWritten
,
NULL
);
CloseHandle
(
hf
);
}
static
BOOL
check_info_filename
(
PSP_INF_INFORMATION
info
,
LPSTR
test
)
{
LPSTR
filename
;
...
...
@@ -271,7 +292,7 @@ static void test_SetupGetSourceFileLocation(void)
{
char
buffer
[
MAX_PATH
]
=
"not empty"
,
inf_filename
[
MAX_PATH
];
UINT
source_id
;
DWORD
required
;
DWORD
required
,
error
;
HINF
hinf
;
BOOL
ret
;
...
...
@@ -296,6 +317,23 @@ static void test_SetupGetSourceFileLocation(void)
pSetupCloseInfFile
(
hinf
);
DeleteFileA
(
inf_filename
);
create_inf_file2
(
inf_filename
);
SetLastError
(
0xdeadbeef
);
hinf
=
pSetupOpenInfFileA
(
inf_filename
,
NULL
,
INF_STYLE_WIN4
,
NULL
);
error
=
GetLastError
();
ok
(
hinf
==
INVALID_HANDLE_VALUE
,
"could open inf file
\n
"
);
ok
(
error
==
ERROR_WRONG_INF_STYLE
,
"got wrong error: %d
\n
"
,
error
);
hinf
=
pSetupOpenInfFileA
(
inf_filename
,
NULL
,
INF_STYLE_OLDNT
,
NULL
);
ok
(
hinf
!=
INVALID_HANDLE_VALUE
,
"could not open inf file
\n
"
);
ret
=
pSetupGetSourceFileLocationA
(
hinf
,
NULL
,
""
,
&
source_id
,
buffer
,
sizeof
(
buffer
),
&
required
);
ok
(
!
ret
,
"SetupGetSourceFileLocation succeeded
\n
"
);
pSetupCloseInfFile
(
hinf
);
DeleteFileA
(
inf_filename
);
}
static
void
test_SetupGetSourceInfo
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment