Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
114e8485
Commit
114e8485
authored
Nov 12, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Added SHPackDispParams test.
parent
dabbe5c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
0 deletions
+52
-0
ordinal.c
dlls/shlwapi/tests/ordinal.c
+52
-0
No files found.
dlls/shlwapi/tests/ordinal.c
View file @
114e8485
...
...
@@ -23,6 +23,8 @@
#include "winbase.h"
#include "winerror.h"
#include "winuser.h"
#include "ole2.h"
#include "oaidl.h"
/* Function ptrs for ordinal calls */
static
HMODULE
hShlwapi
;
...
...
@@ -33,6 +35,7 @@ static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD);
static
LPVOID
(
WINAPI
*
pSHLockShared
)(
HANDLE
,
DWORD
);
static
BOOL
(
WINAPI
*
pSHUnlockShared
)(
LPVOID
);
static
BOOL
(
WINAPI
*
pSHFreeShared
)(
HANDLE
,
DWORD
);
static
HRESULT
(
WINAPIV
*
pSHPackDispParams
)(
DISPPARAMS
*
,
VARIANTARG
*
,
UINT
,...);
static
void
test_GetAcceptLanguagesA
(
void
)
{
HRESULT
retval
;
...
...
@@ -431,6 +434,53 @@ static void test_GetShellSecurityDescriptor(void)
}
}
static
void
test_SHPackDispParams
(
void
)
{
DISPPARAMS
params
;
VARIANT
vars
[
10
];
HRESULT
hres
;
if
(
!
pSHPackDispParams
)
skip
(
"SHPackSidpParams not available
\n
"
);
memset
(
&
params
,
0xc0
,
sizeof
(
params
));
memset
(
vars
,
0xc0
,
sizeof
(
vars
));
hres
=
pSHPackDispParams
(
&
params
,
vars
,
1
,
VT_I4
,
0xdeadbeef
);
ok
(
hres
==
S_OK
,
"SHPackDispParams failed: %08x
\n
"
,
hres
);
ok
(
params
.
cArgs
==
1
,
"params.cArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
cNamedArgs
==
0
,
"params.cNamedArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
rgdispidNamedArgs
==
NULL
,
"params.rgdispidNamedArgs = %p
\n
"
,
params
.
rgdispidNamedArgs
);
ok
(
params
.
rgvarg
==
vars
,
"params.rgvarg = %p
\n
"
,
params
.
rgvarg
);
ok
(
V_VT
(
vars
)
==
VT_I4
,
"V_VT(var) = %d
\n
"
,
V_VT
(
vars
));
ok
(
V_DISPATCH
(
vars
)
==
(
void
*
)
0xdeadbeef
,
"failed
\n
"
);
memset
(
&
params
,
0xc0
,
sizeof
(
params
));
hres
=
pSHPackDispParams
(
&
params
,
NULL
,
0
,
0
);
ok
(
hres
==
S_OK
,
"SHPackDispParams failed: %08x
\n
"
,
hres
);
ok
(
params
.
cArgs
==
0
,
"params.cArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
cNamedArgs
==
0
,
"params.cNamedArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
rgdispidNamedArgs
==
NULL
,
"params.rgdispidNamedArgs = %p
\n
"
,
params
.
rgdispidNamedArgs
);
ok
(
params
.
rgvarg
==
NULL
,
"params.rgvarg = %p
\n
"
,
params
.
rgvarg
);
memset
(
vars
,
0xc0
,
sizeof
(
vars
));
memset
(
&
params
,
0xc0
,
sizeof
(
params
));
hres
=
pSHPackDispParams
(
&
params
,
vars
,
4
,
VT_BSTR
,
(
void
*
)
0xdeadbeef
,
VT_EMPTY
,
10
,
VT_I4
,
100
,
VT_DISPATCH
,
(
void
*
)
0xdeadbeef
);
ok
(
hres
==
S_OK
,
"SHPackDispParams failed: %08x
\n
"
,
hres
);
ok
(
params
.
cArgs
==
4
,
"params.cArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
cNamedArgs
==
0
,
"params.cNamedArgs = %d
\n
"
,
params
.
cArgs
);
ok
(
params
.
rgdispidNamedArgs
==
NULL
,
"params.rgdispidNamedArgs = %p
\n
"
,
params
.
rgdispidNamedArgs
);
ok
(
params
.
rgvarg
==
vars
,
"params.rgvarg = %p
\n
"
,
params
.
rgvarg
);
ok
(
V_VT
(
vars
)
==
VT_DISPATCH
,
"V_VT(vars[0]) = %x
\n
"
,
V_VT
(
vars
));
ok
(
V_I4
(
vars
)
==
0xdeadbeef
,
"V_I4(vars[0]) = %x
\n
"
,
V_I4
(
vars
));
ok
(
V_VT
(
vars
+
1
)
==
VT_I4
,
"V_VT(vars[1]) = %d
\n
"
,
V_VT
(
vars
+
1
));
ok
(
V_I4
(
vars
+
1
)
==
100
,
"V_I4(vars[1]) = %x
\n
"
,
V_I4
(
vars
+
1
));
ok
(
V_VT
(
vars
+
2
)
==
VT_I4
,
"V_VT(vars[2]) = %d
\n
"
,
V_VT
(
vars
+
2
));
ok
(
V_I4
(
vars
+
2
)
==
10
,
"V_I4(vars[2]) = %x
\n
"
,
V_I4
(
vars
+
2
));
ok
(
V_VT
(
vars
+
3
)
==
VT_BSTR
,
"V_VT(vars[3]) = %d
\n
"
,
V_VT
(
vars
+
3
));
ok
(
V_BSTR
(
vars
+
3
)
==
(
void
*
)
0xdeadbeef
,
"V_BSTR(vars[3]) = %p
\n
"
,
V_BSTR
(
vars
+
3
));
}
START_TEST
(
ordinal
)
{
hShlwapi
=
GetModuleHandleA
(
"shlwapi.dll"
);
...
...
@@ -441,10 +491,12 @@ START_TEST(ordinal)
pSHLockShared
=
(
void
*
)
GetProcAddress
(
hShlwapi
,(
char
*
)
8
);
pSHUnlockShared
=
(
void
*
)
GetProcAddress
(
hShlwapi
,(
char
*
)
9
);
pSHFreeShared
=
(
void
*
)
GetProcAddress
(
hShlwapi
,(
char
*
)
10
);
pSHPackDispParams
=
(
void
*
)
GetProcAddress
(
hShlwapi
,(
char
*
)
282
);
test_GetAcceptLanguagesA
();
test_SHSearchMapInt
();
test_alloc_shared
();
test_fdsa
();
test_GetShellSecurityDescriptor
();
test_SHPackDispParams
();
}
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