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
916d6a44
Commit
916d6a44
authored
Jan 08, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi: Fix the StringTableLookUpStringEx() prototype.
parent
35680c83
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
20 deletions
+20
-20
setupapi.spec
dlls/setupapi/setupapi.spec
+1
-1
stringtable.c
dlls/setupapi/stringtable.c
+7
-7
stringtable.c
dlls/setupapi/tests/stringtable.c
+12
-12
No files found.
dlls/setupapi/setupapi.spec
View file @
916d6a44
...
...
@@ -533,7 +533,7 @@
@ stdcall StringTableInitialize()
@ stdcall StringTableInitializeEx(long long)
@ stdcall StringTableLookUpString(ptr wstr long)
@ stdcall StringTableLookUpStringEx(ptr wstr long ptr
ptr
)
@ stdcall StringTableLookUpStringEx(ptr wstr long ptr
long
)
@ stdcall StringTableSetExtraData(ptr long ptr long)
@ stdcall StringTableStringFromId(ptr long)
@ stdcall StringTableStringFromIdEx(ptr long ptr ptr)
...
...
dlls/setupapi/stringtable.c
View file @
916d6a44
...
...
@@ -457,7 +457,7 @@ StringTableGetExtraData(HSTRING_TABLE hStringTable,
* dwFlags [I] Flags
* 1: case sensitive compare
* lpExtraData [O] Pointer to the buffer that receives the extra data
*
lp
Reserved [I/O] Unused
*
dw
Reserved [I/O] Unused
*
* RETURNS
* Success: String ID
...
...
@@ -468,13 +468,13 @@ StringTableLookUpStringEx(HSTRING_TABLE hStringTable,
LPWSTR
lpString
,
DWORD
dwFlags
,
LPVOID
lpExtraData
,
LPDWORD
lp
Reserved
)
DWORD
dw
Reserved
)
{
PSTRING_TABLE
pStringTable
;
DWORD
i
;
TRACE
(
"%p %s %x %p, %
p
\n
"
,
hStringTable
,
debugstr_w
(
lpString
),
dwFlags
,
lpExtraData
,
lp
Reserved
);
TRACE
(
"%p %s %x %p, %
x
\n
"
,
hStringTable
,
debugstr_w
(
lpString
),
dwFlags
,
lpExtraData
,
dw
Reserved
);
pStringTable
=
(
PSTRING_TABLE
)
hStringTable
;
if
(
pStringTable
==
NULL
)
...
...
@@ -493,7 +493,7 @@ StringTableLookUpStringEx(HSTRING_TABLE hStringTable,
if
(
!
lstrcmpW
(
pStringTable
->
pSlots
[
i
].
pString
,
lpString
))
{
if
(
lpExtraData
)
memcpy
(
lpExtraData
,
pStringTable
->
pSlots
[
i
].
pData
,
(
DWORD
)
lp
Reserved
);
memcpy
(
lpExtraData
,
pStringTable
->
pSlots
[
i
].
pData
,
dw
Reserved
);
return
i
+
1
;
}
}
...
...
@@ -502,7 +502,7 @@ StringTableLookUpStringEx(HSTRING_TABLE hStringTable,
if
(
!
lstrcmpiW
(
pStringTable
->
pSlots
[
i
].
pString
,
lpString
))
{
if
(
lpExtraData
)
memcpy
(
lpExtraData
,
pStringTable
->
pSlots
[
i
].
pData
,
(
DWORD
)
lp
Reserved
);
memcpy
(
lpExtraData
,
pStringTable
->
pSlots
[
i
].
pData
,
dw
Reserved
);
return
i
+
1
;
}
}
...
...
@@ -532,7 +532,7 @@ StringTableLookUpString(HSTRING_TABLE hStringTable,
LPWSTR
lpString
,
DWORD
dwFlags
)
{
return
StringTableLookUpStringEx
(
hStringTable
,
lpString
,
dwFlags
,
NULL
,
NULL
);
return
StringTableLookUpStringEx
(
hStringTable
,
lpString
,
dwFlags
,
NULL
,
0
);
}
...
...
dlls/setupapi/tests/stringtable.c
View file @
916d6a44
...
...
@@ -46,7 +46,7 @@ static HSTRING_TABLE (WINAPI *pStringTableDuplicate)(HSTRING_TABLE hStringTable)
static
HSTRING_TABLE
(
WINAPI
*
pStringTableInitialize
)(
VOID
);
static
HSTRING_TABLE
(
WINAPI
*
pStringTableInitializeEx
)(
DWORD
,
DWORD
);
static
DWORD
(
WINAPI
*
pStringTableLookUpString
)(
HSTRING_TABLE
,
LPWSTR
,
DWORD
);
static
DWORD
(
WINAPI
*
pStringTableLookUpStringEx
)(
HSTRING_TABLE
,
LPWSTR
,
DWORD
,
LPVOID
,
LP
DWORD
);
static
DWORD
(
WINAPI
*
pStringTableLookUpStringEx
)(
HSTRING_TABLE
,
LPWSTR
,
DWORD
,
LPVOID
,
DWORD
);
static
LPWSTR
(
WINAPI
*
pStringTableStringFromId
)(
HSTRING_TABLE
,
DWORD
);
#if 0
static BOOL (WINAPI *pStringTableStringFromIdEx)(HSTRING_TABLE, DWORD, LPWSTR, LPDWORD);
...
...
@@ -247,33 +247,33 @@ static void test_StringTableLookUpStringEx(void)
ok
(
table2
!=
NULL
,
"Failed to duplicate String Table
\n
"
);
/* case insensitive */
retval
=
pStringTableLookUpStringEx
(
table
,
string
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table
,
string
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find string in String Table 1
\n
"
);
ok
(
retval
==
hstring
,
"Lookup for string (%x) does not match previous handle (%x) in String Table 1
\n
"
,
retval
,
hstring
);
retval
=
pStringTableLookUpStringEx
(
table2
,
string
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table2
,
string
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find string in String Table 2
\n
"
);
retval
=
pStringTableLookUpStringEx
(
table
,
String
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table
,
String
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find String in String Table 1
\n
"
);
retval
=
pStringTableLookUpStringEx
(
table2
,
String
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table2
,
String
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find String in String Table 2
\n
"
);
retval
=
pStringTableLookUpStringEx
(
table
,
foo
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table
,
foo
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find foo in String Table 1
\n
"
);
ok
(
retval
==
hfoo
,
"Lookup for foo (%x) does not match previous handle (%x) in String Table 1
\n
"
,
retval
,
hfoo
);
retval
=
pStringTableLookUpStringEx
(
table2
,
foo
,
0
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table2
,
foo
,
0
,
NULL
,
0
);
ok
(
retval
!=
~
0u
,
"Failed find foo in String Table 2
\n
"
);
/* case sensitive */
retval
=
pStringTableLookUpStringEx
(
table
,
string
,
ST_CASE_SENSITIVE_COMPARE
,
NULL
,
NULL
);
retval2
=
pStringTableLookUpStringEx
(
table
,
String
,
ST_CASE_SENSITIVE_COMPARE
,
NULL
,
NULL
);
retval
=
pStringTableLookUpStringEx
(
table
,
string
,
ST_CASE_SENSITIVE_COMPARE
,
NULL
,
0
);
retval2
=
pStringTableLookUpStringEx
(
table
,
String
,
ST_CASE_SENSITIVE_COMPARE
,
NULL
,
0
);
ok
(
retval
!=
retval2
,
"Lookup of string equals String in Table 1
\n
"
);
ok
(
retval
==
hString
,
"Lookup for String (%x) does not match previous handle (%x) in String Table 1
\n
"
,
...
...
@@ -289,17 +289,17 @@ static void test_StringTableLookUpStringEx(void)
ok
(
retval
!=
~
0u
,
"failed to add 'UILEVEL' to string table
\n
"
);
memset
(
buffer
,
0x55
,
sizeof
(
buffer
));
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
(
LPDWORD
)
0
);
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
0
);
ok
(
retval
!=
~
0u
,
"failed find 'UILEVEL' in string table
\n
"
);
ok
(
memcmp
(
buffer
,
&
data
,
4
),
"unexpected data
\n
"
);
memset
(
buffer
,
0x55
,
sizeof
(
buffer
));
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
(
LPDWORD
)
2
);
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
2
);
ok
(
retval
!=
~
0u
,
"failed find 'UILEVEL' in string table
\n
"
);
ok
(
!
memcmp
(
buffer
,
&
data
,
2
),
"unexpected data
\n
"
);
memset
(
buffer
,
0x55
,
sizeof
(
buffer
));
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
(
LPDWORD
)
sizeof
(
buffer
));
retval
=
pStringTableLookUpStringEx
(
table
,
uilevel
,
ST_CASE_SENSITIVE_COMPARE
,
buffer
,
sizeof
(
buffer
));
ok
(
retval
!=
~
0u
,
"failed find 'UILEVEL' in string table
\n
"
);
ok
(
!
memcmp
(
buffer
,
&
data
,
4
),
"unexpected data
\n
"
);
...
...
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