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
9d3e458c
Commit
9d3e458c
authored
Mar 15, 2024
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom/network: Implement UserDomain property.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56434
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
e63da6ea
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
9 deletions
+27
-9
network.c
dlls/wshom.ocx/network.c
+5
-2
shell.c
dlls/wshom.ocx/shell.c
+13
-7
wshom.c
dlls/wshom.ocx/tests/wshom.c
+8
-0
wshom_private.h
dlls/wshom.ocx/wshom_private.h
+1
-0
No files found.
dlls/wshom.ocx/network.c
View file @
9d3e458c
...
...
@@ -114,9 +114,12 @@ static HRESULT WINAPI WshNetwork2_Invoke(IWshNetwork2 *iface, DISPID dispIdMembe
static
HRESULT
WINAPI
WshNetwork2_get_UserDomain
(
IWshNetwork2
*
iface
,
BSTR
*
user_domain
)
{
FIXME
(
"%p stub
\n
"
,
user_domain
);
TRACE
(
"%p, %p.
\n
"
,
iface
,
user_domain
);
return
E_NOTIMPL
;
if
(
!
user_domain
)
return
E_POINTER
;
return
get_env_var
(
L"USERDOMAIN"
,
user_domain
);
}
static
HRESULT
WINAPI
WshNetwork2_get_UserName
(
IWshNetwork2
*
iface
,
BSTR
*
user_name
)
...
...
dlls/wshom.ocx/shell.c
View file @
9d3e458c
...
...
@@ -538,16 +538,10 @@ static HRESULT WINAPI WshEnvironment_Invoke(IWshEnvironment *iface, DISPID dispI
return
hr
;
}
static
HRESULT
WINAPI
WshEnvironment_get_Item
(
IWshEnvironment
*
iface
,
BSTR
name
,
BSTR
*
value
)
HRESULT
get_env_var
(
const
WCHAR
*
name
,
BSTR
*
value
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
DWORD
len
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
name
),
value
);
if
(
!
value
)
return
E_POINTER
;
len
=
GetEnvironmentVariableW
(
name
,
NULL
,
0
);
if
(
len
)
{
...
...
@@ -561,6 +555,18 @@ static HRESULT WINAPI WshEnvironment_get_Item(IWshEnvironment *iface, BSTR name,
return
*
value
?
S_OK
:
E_OUTOFMEMORY
;
}
static
HRESULT
WINAPI
WshEnvironment_get_Item
(
IWshEnvironment
*
iface
,
BSTR
name
,
BSTR
*
value
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
name
),
value
);
if
(
!
value
)
return
E_POINTER
;
return
get_env_var
(
name
,
value
);
}
static
HRESULT
WINAPI
WshEnvironment_put_Item
(
IWshEnvironment
*
iface
,
BSTR
name
,
BSTR
value
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
...
...
dlls/wshom.ocx/tests/wshom.c
View file @
9d3e458c
...
...
@@ -745,6 +745,14 @@ static void test_wshnetwork(void)
SysFreeString
(
name
);
SysFreeString
(
str
);
str
=
NULL
;
hr
=
IWshNetwork2_get_UserDomain
(
nw2
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IWshNetwork2_get_UserDomain
(
nw2
,
&
str
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
ok
(
!!
str
,
"Unexpected pointer.
\n
"
);
SysFreeString
(
str
);
IWshNetwork2_Release
(
nw2
);
IDispatch_Release
(
disp
);
}
...
...
dlls/wshom.ocx/wshom_private.h
View file @
9d3e458c
...
...
@@ -46,6 +46,7 @@ struct provideclassinfo {
};
extern
void
init_classinfo
(
const
GUID
*
guid
,
IUnknown
*
outer
,
struct
provideclassinfo
*
classinfo
);
HRESULT
get_env_var
(
const
WCHAR
*
name
,
BSTR
*
value
);
HRESULT
WINAPI
WshShellFactory_CreateInstance
(
IClassFactory
*
,
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
WINAPI
WshNetworkFactory_CreateInstance
(
IClassFactory
*
,
IUnknown
*
,
REFIID
,
void
**
);
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