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
215fd0b8
Commit
215fd0b8
authored
Apr 07, 2009
by
Ge van Geldorp
Committed by
Alexandre Julliard
Apr 07, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Handle running the tests as a domain user.
parent
c98513f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
source.c
dlls/msi/tests/source.c
+15
-6
No files found.
dlls/msi/tests/source.c
View file @
215fd0b8
...
...
@@ -27,10 +27,12 @@
#include <msidefs.h>
#include <msi.h>
#include <sddl.h>
#include <secext.h>
#include "wine/test.h"
static
BOOL
(
WINAPI
*
pConvertSidToStringSidA
)(
PSID
,
LPSTR
*
);
static
BOOLEAN
(
WINAPI
*
pGetUserNameExA
)(
EXTENDED_NAME_FORMAT
,
LPSTR
,
PULONG
);
static
UINT
(
WINAPI
*
pMsiSourceListAddMediaDiskA
)
(
LPCSTR
,
LPCSTR
,
MSIINSTALLCONTEXT
,
DWORD
,
DWORD
,
LPCSTR
,
LPCSTR
);
static
UINT
(
WINAPI
*
pMsiSourceListAddSourceExA
)
...
...
@@ -51,6 +53,7 @@ static void init_functionpointers(void)
{
HMODULE
hmsi
=
GetModuleHandleA
(
"msi.dll"
);
HMODULE
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
HMODULE
hsecur32
=
LoadLibraryA
(
"secur32.dll"
);
#define GET_PROC(dll, func) \
p ## func = (void *)GetProcAddress(dll, #func); \
...
...
@@ -67,6 +70,8 @@ static void init_functionpointers(void)
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
)
GET_PROC
(
hsecur32
,
GetUserNameExA
)
#undef GET_PROC
}
...
...
@@ -3139,12 +3144,16 @@ static void test_MsiSourceListAddSource(void)
/* MACHINENAME\username */
size
=
MAX_PATH
;
GetComputerNameA
(
username
,
&
size
);
lstrcatA
(
username
,
"
\\
"
);
ptr
=
username
+
lstrlenA
(
username
);
size
=
MAX_PATH
;
GetUserNameA
(
ptr
,
&
size
);
if
(
pGetUserNameExA
!=
NULL
)
pGetUserNameExA
(
NameSamCompatible
,
username
,
&
size
);
else
{
GetComputerNameA
(
username
,
&
size
);
lstrcatA
(
username
,
"
\\
"
);
ptr
=
username
+
lstrlenA
(
username
);
size
=
MAX_PATH
-
(
ptr
-
username
);
GetUserNameA
(
ptr
,
&
size
);
}
trace
(
"username: %s
\n
"
,
username
);
/* GetLastError is not set by the function */
...
...
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