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
a7e1b7c6
Commit
a7e1b7c6
authored
Jul 26, 2012
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jul 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Use always static binding for GetTokenInformation.
parent
35eef16b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
16 deletions
+8
-16
action.c
dlls/msi/tests/action.c
+2
-4
install.c
dlls/msi/tests/install.c
+2
-4
package.c
dlls/msi/tests/package.c
+2
-4
patch.c
dlls/msi/tests/patch.c
+2
-4
No files found.
dlls/msi/tests/action.c
View file @
a7e1b7c6
...
...
@@ -41,7 +41,6 @@ static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
MSIINSTALLCONTEXT
,
LPSTR
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pConvertSidToStringSidA
)(
PSID
,
LPSTR
*
);
static
BOOL
(
WINAPI
*
pGetTokenInformation
)(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
LPVOID
,
DWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pOpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExA
)(
HKEY
,
LPCSTR
,
REGSAM
,
DWORD
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
PBOOL
);
...
...
@@ -2014,7 +2013,6 @@ static void init_functionpointers(void)
GET_PROC
(
hmsi
,
MsiGetComponentPathExA
);
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
);
GET_PROC
(
hadvapi32
,
GetTokenInformation
);
GET_PROC
(
hadvapi32
,
OpenProcessToken
);
GET_PROC
(
hadvapi32
,
RegDeleteKeyExA
)
GET_PROC
(
hkernel32
,
IsWow64Process
)
...
...
@@ -2030,7 +2028,7 @@ static BOOL is_process_limited(void)
{
HANDLE
token
;
if
(
!
pOpenProcessToken
||
!
pGetTokenInformation
)
return
FALSE
;
if
(
!
pOpenProcessToken
)
return
FALSE
;
if
(
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
))
{
...
...
@@ -2038,7 +2036,7 @@ static BOOL is_process_limited(void)
TOKEN_ELEVATION_TYPE
type
=
TokenElevationTypeDefault
;
DWORD
size
;
ret
=
p
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
ret
=
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
CloseHandle
(
token
);
return
(
ret
&&
type
==
TokenElevationTypeLimited
);
}
...
...
dlls/msi/tests/install.c
View file @
a7e1b7c6
...
...
@@ -46,7 +46,6 @@ static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
MSIINSTALLCONTEXT
,
LPSTR
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pConvertSidToStringSidA
)(
PSID
,
LPSTR
*
);
static
BOOL
(
WINAPI
*
pGetTokenInformation
)(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
LPVOID
,
DWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pOpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExA
)(
HKEY
,
LPCSTR
,
REGSAM
,
DWORD
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
PBOOL
);
...
...
@@ -2115,7 +2114,6 @@ static void init_functionpointers(void)
GET_PROC
(
hmsi
,
MsiGetComponentPathExA
);
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
);
GET_PROC
(
hadvapi32
,
GetTokenInformation
);
GET_PROC
(
hadvapi32
,
OpenProcessToken
);
GET_PROC
(
hadvapi32
,
RegDeleteKeyExA
)
GET_PROC
(
hkernel32
,
IsWow64Process
)
...
...
@@ -2131,7 +2129,7 @@ static BOOL is_process_limited(void)
{
HANDLE
token
;
if
(
!
pOpenProcessToken
||
!
pGetTokenInformation
)
return
FALSE
;
if
(
!
pOpenProcessToken
)
return
FALSE
;
if
(
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
))
{
...
...
@@ -2139,7 +2137,7 @@ static BOOL is_process_limited(void)
TOKEN_ELEVATION_TYPE
type
=
TokenElevationTypeDefault
;
DWORD
size
;
ret
=
p
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
ret
=
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
CloseHandle
(
token
);
return
(
ret
&&
type
==
TokenElevationTypeLimited
);
}
...
...
dlls/msi/tests/package.c
View file @
a7e1b7c6
...
...
@@ -40,7 +40,6 @@ static INSTALLSTATE (WINAPI *pMsiGetComponentPathExA)(LPCSTR, LPCSTR, LPCSTR, MS
static
HRESULT
(
WINAPI
*
pSHGetFolderPathA
)(
HWND
,
int
,
HANDLE
,
DWORD
,
LPSTR
);
static
BOOL
(
WINAPI
*
pConvertSidToStringSidA
)(
PSID
,
LPSTR
*
);
static
BOOL
(
WINAPI
*
pGetTokenInformation
)(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
LPVOID
,
DWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pOpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExA
)(
HKEY
,
LPCSTR
,
REGSAM
,
DWORD
);
static
LONG
(
WINAPI
*
pRegDeleteKeyExW
)(
HKEY
,
LPCWSTR
,
REGSAM
,
DWORD
);
...
...
@@ -68,7 +67,6 @@ static void init_functionpointers(void)
GET_PROC
(
hshell32
,
SHGetFolderPathA
);
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
);
GET_PROC
(
hadvapi32
,
GetTokenInformation
);
GET_PROC
(
hadvapi32
,
OpenProcessToken
);
GET_PROC
(
hadvapi32
,
RegDeleteKeyExA
)
GET_PROC
(
hadvapi32
,
RegDeleteKeyExW
)
...
...
@@ -87,7 +85,7 @@ static BOOL is_process_limited(void)
{
HANDLE
token
;
if
(
!
pOpenProcessToken
||
!
pGetTokenInformation
)
return
FALSE
;
if
(
!
pOpenProcessToken
)
return
FALSE
;
if
(
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
))
{
...
...
@@ -95,7 +93,7 @@ static BOOL is_process_limited(void)
TOKEN_ELEVATION_TYPE
type
=
TokenElevationTypeDefault
;
DWORD
size
;
ret
=
p
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
ret
=
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
CloseHandle
(
token
);
return
(
ret
&&
type
==
TokenElevationTypeLimited
);
}
...
...
dlls/msi/tests/patch.c
View file @
a7e1b7c6
...
...
@@ -35,7 +35,6 @@ static UINT (WINAPI *pMsiGetPatchInfoExA)( LPCSTR, LPCSTR, LPCSTR, MSIINSTALLCON
LPCSTR
,
LPSTR
,
DWORD
*
);
static
UINT
(
WINAPI
*
pMsiEnumPatchesExA
)(
LPCSTR
,
LPCSTR
,
DWORD
,
DWORD
,
DWORD
,
LPSTR
,
LPSTR
,
MSIINSTALLCONTEXT
*
,
LPSTR
,
LPDWORD
);
static
BOOL
(
WINAPI
*
pGetTokenInformation
)(
HANDLE
,
TOKEN_INFORMATION_CLASS
,
LPVOID
,
DWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pOpenProcessToken
)(
HANDLE
,
DWORD
,
PHANDLE
);
static
const
char
*
msifile
=
"winetest-patch.msi"
;
...
...
@@ -152,7 +151,6 @@ static void init_function_pointers( void )
GET_PROC
(
hmsi
,
MsiGetPatchInfoExA
);
GET_PROC
(
hmsi
,
MsiEnumPatchesExA
);
GET_PROC
(
hadvapi32
,
GetTokenInformation
);
GET_PROC
(
hadvapi32
,
OpenProcessToken
);
#undef GET_PROC
}
...
...
@@ -161,7 +159,7 @@ static BOOL is_process_limited(void)
{
HANDLE
token
;
if
(
!
pOpenProcessToken
||
!
pGetTokenInformation
)
return
FALSE
;
if
(
!
pOpenProcessToken
)
return
FALSE
;
if
(
pOpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
))
{
...
...
@@ -169,7 +167,7 @@ static BOOL is_process_limited(void)
TOKEN_ELEVATION_TYPE
type
=
TokenElevationTypeDefault
;
DWORD
size
;
ret
=
p
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
ret
=
GetTokenInformation
(
token
,
TokenElevationType
,
&
type
,
sizeof
(
type
),
&
size
);
CloseHandle
(
token
);
return
(
ret
&&
type
==
TokenElevationTypeLimited
);
}
...
...
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