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
fd10f47d
Commit
fd10f47d
authored
Oct 12, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Add more tests.
parent
52bd8542
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
0 deletions
+54
-0
ordinal.c
dlls/shlwapi/tests/ordinal.c
+54
-0
No files found.
dlls/shlwapi/tests/ordinal.c
View file @
fd10f47d
...
@@ -62,6 +62,10 @@ static HRESULT (WINAPI *pSHIShellFolder_EnumObjects)(LPSHELLFOLDER, HWND, SHCONT
...
@@ -62,6 +62,10 @@ static HRESULT (WINAPI *pSHIShellFolder_EnumObjects)(LPSHELLFOLDER, HWND, SHCONT
static
DWORD
(
WINAPI
*
pSHGetIniStringW
)(
LPCWSTR
,
LPCWSTR
,
LPWSTR
,
DWORD
,
LPCWSTR
);
static
DWORD
(
WINAPI
*
pSHGetIniStringW
)(
LPCWSTR
,
LPCWSTR
,
LPWSTR
,
DWORD
,
LPCWSTR
);
static
BOOL
(
WINAPI
*
pSHSetIniStringW
)(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
);
static
BOOL
(
WINAPI
*
pSHSetIniStringW
)(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
);
static
HKEY
(
WINAPI
*
pSHGetShellKey
)(
DWORD
,
LPCWSTR
,
BOOL
);
static
HKEY
(
WINAPI
*
pSHGetShellKey
)(
DWORD
,
LPCWSTR
,
BOOL
);
static
HRESULT
(
WINAPI
*
pSKGetValueW
)(
DWORD
,
LPCWSTR
,
LPCWSTR
,
DWORD
*
,
void
*
,
DWORD
*
);
static
HRESULT
(
WINAPI
*
pSKSetValueW
)(
DWORD
,
LPCWSTR
,
LPCWSTR
,
DWORD
,
void
*
,
DWORD
);
static
HRESULT
(
WINAPI
*
pSKDeleteValueW
)(
DWORD
,
LPCWSTR
,
LPCWSTR
);
static
HRESULT
(
WINAPI
*
pSKAllocValueW
)(
DWORD
,
LPCWSTR
,
LPCWSTR
,
DWORD
*
,
void
**
,
DWORD
*
);
static
HMODULE
hmlang
;
static
HMODULE
hmlang
;
static
HRESULT
(
WINAPI
*
pLcidToRfc1766A
)(
LCID
,
LPSTR
,
INT
);
static
HRESULT
(
WINAPI
*
pLcidToRfc1766A
)(
LCID
,
LPSTR
,
INT
);
...
@@ -2701,7 +2705,9 @@ static void test_SHGetShellKey(void)
...
@@ -2701,7 +2705,9 @@ static void test_SHGetShellKey(void)
static
const
WCHAR
WineTestW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
WineTestW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'T'
,
'e'
,
's'
,
't'
,
0
};
void
*
pPathBuildRootW
=
GetProcAddress
(
hShlwapi
,
"PathBuildRootW"
);
void
*
pPathBuildRootW
=
GetProcAddress
(
hShlwapi
,
"PathBuildRootW"
);
DWORD
*
alloc_data
,
data
,
size
;
HKEY
hkey
;
HKEY
hkey
;
HRESULT
hres
;
if
(
!
pSHGetShellKey
)
if
(
!
pSHGetShellKey
)
{
{
...
@@ -2754,6 +2760,50 @@ static void test_SHGetShellKey(void)
...
@@ -2754,6 +2760,50 @@ static void test_SHGetShellKey(void)
ok
(
hkey
!=
NULL
,
"Can't create key
\n
"
);
ok
(
hkey
!=
NULL
,
"Can't create key
\n
"
);
ok
(
SUCCEEDED
(
RegDeleteKeyW
(
hkey
,
WineTestW
)),
"Can't delte key
\n
"
);
ok
(
SUCCEEDED
(
RegDeleteKeyW
(
hkey
,
WineTestW
)),
"Can't delte key
\n
"
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
if
(
!
pSKGetValueW
||
!
pSKSetValueW
||
!
pSKDeleteValueW
||
!
pSKAllocValueW
)
{
win_skip
(
"SKGetValueW, SKSetValueW, SKDeleteValueW or SKAllocValueW not available
\n
"
);
return
;
}
hres
=
pSKGetValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
NULL
,
&
data
,
&
size
);
ok
(
hres
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"hres = %x
\n
"
,
hres
);
data
=
1234
;
hres
=
pSKSetValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
REG_DWORD
,
&
data
,
sizeof
(
DWORD
));
ok
(
hres
==
S_OK
,
"hres = %x
\n
"
,
hres
);
size
=
1
;
hres
=
pSKGetValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
NULL
,
NULL
,
&
size
);
ok
(
hres
==
S_OK
,
"hres = %x
\n
"
,
hres
);
ok
(
size
==
sizeof
(
DWORD
),
"size = %d
\n
"
,
size
);
data
=
0xdeadbeef
;
hres
=
pSKGetValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
NULL
,
&
data
,
&
size
);
ok
(
hres
==
S_OK
,
"hres = %x
\n
"
,
hres
);
ok
(
size
==
sizeof
(
DWORD
),
"size = %d
\n
"
,
size
);
ok
(
data
==
1234
,
"data = %d
\n
"
,
data
);
hres
=
pSKAllocValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
NULL
,
(
void
**
)
&
alloc_data
,
&
size
);
ok
(
hres
==
S_OK
,
"hres= %x
\n
"
,
hres
);
ok
(
size
==
sizeof
(
DWORD
),
"size = %d
\n
"
,
size
);
ok
(
*
alloc_data
==
1234
,
"*alloc_data = %d
\n
"
,
*
alloc_data
);
LocalFree
(
alloc_data
);
hres
=
pSKDeleteValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
);
ok
(
hres
==
S_OK
,
"hres = %x
\n
"
,
hres
);
hres
=
pSKDeleteValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
);
ok
(
hres
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"hres = %x
\n
"
,
hres
);
hres
=
pSKGetValueW
(
SHKEY_Root_HKLM
,
WineTestW
,
NULL
,
NULL
,
&
data
,
&
size
);
ok
(
hres
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"hres = %x
\n
"
,
hres
);
hkey
=
pSHGetShellKey
(
SHKEY_Root_HKLM
,
NULL
,
FALSE
);
ok
(
hkey
!=
NULL
,
"Can't create key
\n
"
);
ok
(
SUCCEEDED
(
RegDeleteKeyW
(
hkey
,
WineTestW
)),
"Can't delte key
\n
"
);
RegCloseKey
(
hkey
);
}
}
static
void
init_pointers
(
void
)
static
void
init_pointers
(
void
)
...
@@ -2782,6 +2832,10 @@ static void init_pointers(void)
...
@@ -2782,6 +2832,10 @@ static void init_pointers(void)
MAKEFUNC
(
SHGetShellKey
,
491
);
MAKEFUNC
(
SHGetShellKey
,
491
);
MAKEFUNC
(
SHPropertyBag_ReadLONG
,
496
);
MAKEFUNC
(
SHPropertyBag_ReadLONG
,
496
);
MAKEFUNC
(
IUnknown_ProfferService
,
514
);
MAKEFUNC
(
IUnknown_ProfferService
,
514
);
MAKEFUNC
(
SKGetValueW
,
516
);
MAKEFUNC
(
SKSetValueW
,
517
);
MAKEFUNC
(
SKDeleteValueW
,
518
);
MAKEFUNC
(
SKAllocValueW
,
519
);
#undef MAKEFUNC
#undef MAKEFUNC
}
}
...
...
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