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
b98c2a75
Commit
b98c2a75
authored
Nov 30, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom: Fix WshNetwork interface definition.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
61dc7de4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
278 additions
and
20 deletions
+278
-20
network.c
dlls/wshom.ocx/network.c
+119
-10
wshom.c
dlls/wshom.ocx/tests/wshom.c
+19
-4
wshom.idl
dlls/wshom.ocx/tests/wshom.idl
+70
-3
wshom.idl
dlls/wshom.ocx/wshom.idl
+70
-3
No files found.
dlls/wshom.ocx/network.c
View file @
b98c2a75
...
...
@@ -25,14 +25,13 @@ WINE_DEFAULT_DEBUG_CHANNEL(wshom);
static
HRESULT
WINAPI
WshNetwork2_QueryInterface
(
IWshNetwork2
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
TRACE
(
"(IID_IUnknown %p)
\n
"
,
ppv
);
*
ppv
=
iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IDispatch
))
{
TRACE
(
"(IID_IDispatch %p)
\n
"
,
ppv
);
*
ppv
=
iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IWshNetwork2
))
{
TRACE
(
"(IID_IWshNetwork2 %p)
\n
"
,
ppv
);
TRACE
(
"%p, %s, %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
ppv
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IWshNetwork
)
||
IsEqualGUID
(
riid
,
&
IID_IWshNetwork2
))
{
*
ppv
=
iface
;
}
else
{
FIXME
(
"Unknown iface %s
\n
"
,
debugstr_guid
(
riid
));
...
...
@@ -85,9 +84,106 @@ static HRESULT WINAPI WshNetwork2_Invoke(IWshNetwork2 *iface, DISPID dispIdMembe
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_UserDomain
(
IWshNetwork2
*
iface
,
BSTR
*
UserDomain
)
static
HRESULT
WINAPI
WshNetwork2_get_UserDomain
(
IWshNetwork2
*
iface
,
BSTR
*
user_domain
)
{
FIXME
(
"%p stub
\n
"
,
user_domain
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_UserName
(
IWshNetwork2
*
iface
,
BSTR
*
user_name
)
{
FIXME
(
"%p stub
\n
"
,
user_name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_UserProfile
(
IWshNetwork2
*
iface
,
BSTR
*
user_profile
)
{
FIXME
(
"%p stub
\n
"
,
user_profile
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_ComputerName
(
IWshNetwork2
*
iface
,
BSTR
*
name
)
{
FIXME
(
"(%p)
\n
"
,
UserDomain
);
FIXME
(
"%p stub
\n
"
,
name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_Organization
(
IWshNetwork2
*
iface
,
BSTR
*
name
)
{
FIXME
(
"%p stub
\n
"
,
name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_get_Site
(
IWshNetwork2
*
iface
,
BSTR
*
name
)
{
FIXME
(
"%p stub
\n
"
,
name
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_MapNetworkDrive
(
IWshNetwork2
*
iface
,
BSTR
local_name
,
BSTR
remote_name
,
VARIANT
*
update_profile
,
VARIANT
*
user_name
,
VARIANT
*
password
)
{
FIXME
(
"%s, %s, %s, %p, %p stub
\n
"
,
debugstr_w
(
local_name
),
debugstr_w
(
remote_name
),
debugstr_variant
(
update_profile
),
user_name
,
password
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_RemoveNetworkDrive
(
IWshNetwork2
*
iface
,
BSTR
name
,
VARIANT
*
force
,
VARIANT
*
update_profile
)
{
FIXME
(
"%s, %s, %s stub
\n
"
,
debugstr_w
(
name
),
debugstr_variant
(
force
),
debugstr_variant
(
update_profile
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_EnumNetworkDrives
(
IWshNetwork2
*
iface
,
IWshCollection
**
ret
)
{
FIXME
(
"%p stub
\n
"
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_AddPrinterConnection
(
IWshNetwork2
*
iface
,
BSTR
local_name
,
BSTR
remote_name
,
VARIANT
*
update_profile
,
VARIANT
*
user_name
,
VARIANT
*
password
)
{
FIXME
(
"%s, %s, %s, %p, %p stub
\n
"
,
debugstr_w
(
local_name
),
debugstr_w
(
remote_name
),
debugstr_variant
(
update_profile
),
user_name
,
password
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_RemovePrinterConnection
(
IWshNetwork2
*
iface
,
BSTR
name
,
VARIANT
*
force
,
VARIANT
*
update_profile
)
{
FIXME
(
"%s, %s, %s stub
\n
"
,
debugstr_w
(
name
),
debugstr_variant
(
force
),
debugstr_variant
(
update_profile
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_EnumPrinterConnections
(
IWshNetwork2
*
iface
,
IWshCollection
**
ret
)
{
FIXME
(
"%p stub
\n
"
,
ret
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_SetDefaultPrinter
(
IWshNetwork2
*
iface
,
BSTR
name
)
{
FIXME
(
"%s stub
\n
"
,
debugstr_w
(
name
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshNetwork2_AddWindowsPrinterConnection
(
IWshNetwork2
*
iface
,
BSTR
printer_name
,
BSTR
driver_name
,
BSTR
port
)
{
FIXME
(
"%s, %s, %s stub
\n
"
,
debugstr_w
(
printer_name
),
debugstr_w
(
driver_name
),
debugstr_w
(
port
));
return
E_NOTIMPL
;
}
...
...
@@ -100,6 +196,19 @@ static const IWshNetwork2Vtbl WshNetwork2Vtbl = {
WshNetwork2_GetIDsOfNames
,
WshNetwork2_Invoke
,
WshNetwork2_get_UserDomain
,
WshNetwork2_get_UserName
,
WshNetwork2_get_UserProfile
,
WshNetwork2_get_ComputerName
,
WshNetwork2_get_Organization
,
WshNetwork2_get_Site
,
WshNetwork2_MapNetworkDrive
,
WshNetwork2_RemoveNetworkDrive
,
WshNetwork2_EnumNetworkDrives
,
WshNetwork2_AddPrinterConnection
,
WshNetwork2_RemovePrinterConnection
,
WshNetwork2_EnumPrinterConnections
,
WshNetwork2_SetDefaultPrinter
,
WshNetwork2_AddWindowsPrinterConnection
,
};
static
IWshNetwork2
WshNetwork2
=
{
&
WshNetwork2Vtbl
};
...
...
dlls/wshom.ocx/tests/wshom.c
View file @
b98c2a75
...
...
@@ -28,6 +28,21 @@
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#lx, expected %#lx.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
static
void
_test_provideclassinfo
(
IDispatch
*
disp
,
const
GUID
*
guid
,
int
line
)
{
...
...
@@ -673,20 +688,20 @@ static void test_popup(void)
SysFreeString
(
text
);
IWshShell_Release
(
sh
);
}
static
void
test_wshnetwork
(
void
)
{
IDispatch
*
disp
;
IUnknown
*
network
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_WshNetwork
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
hr
=
IDispatch_QueryInterface
(
disp
,
&
IID_IWshNetwork2
,
(
void
**
)
&
network
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#lx.
\n
"
,
hr
);
check_interface
(
disp
,
&
IID_IWshNetwork
,
TRUE
);
check_interface
(
disp
,
&
IID_IWshNetwork2
,
TRUE
);
I
Unknown_Release
(
network
);
I
Dispatch_Release
(
disp
);
}
START_TEST
(
wshom
)
...
...
dlls/wshom.ocx/tests/wshom.idl
View file @
b98c2a75
...
...
@@ -610,14 +610,81 @@ library IWshRuntimeLibrary
}
;
[
uuid
(
24b
e5a31
-
edfe
-
11
d2
-
b933
-
00104b365
c9f
),
uuid
(
f935dc25
-
1
cf0
-
11
d0
-
adb9
-
00
c04fd58a0b
),
odl
,
dual
,
oleautomation
oleautomation
,
hidden
]
interface
IWshNetwork
2
:
IDispatch
{
interface
IWshNetwork
:
IDispatch
{
[
id
(
0
x60020000
),
propget
]
HRESULT
UserDomain
(
[
out
,
retval
]
BSTR
*
out_UserDomain
)
;
[
id
(
0
x60020001
),
propget
]
HRESULT
UserName
(
[
out
,
retval
]
BSTR
*
out_UserName
)
;
[
id
(
0
x60020002
),
propget
]
HRESULT
UserProfile
(
[
out
,
retval
]
BSTR
*
out_UserProfile
)
;
[
id
(
0
x60020003
),
propget
]
HRESULT
ComputerName
(
[
out
,
retval
]
BSTR
*
out_ComputerName
)
;
[
id
(
0
x60020004
),
propget
,
hidden
]
HRESULT
Organization
(
[
out
,
retval
]
BSTR
*
out_Organization
)
;
[
id
(
0
x60020005
),
propget
,
hidden
]
HRESULT
Site
(
[
out
,
retval
]
BSTR
*
out_Site
)
;
[
id
(
0
x3e8
)
]
HRESULT
MapNetworkDrive
(
[
in
]
BSTR
LocalName
,
[
in
]
BSTR
RemoteName
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
,
[
in
,
optional
]
VARIANT
*
UserName
,
[
in
,
optional
]
VARIANT
*
Password
)
;
[
id
(
0
x3e9
)
]
HRESULT
RemoveNetworkDrive
(
[
in
]
BSTR
Name
,
[
in
,
optional
]
VARIANT
*
Force
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
)
;
[
id
(
0
x3ea
)
]
HRESULT
EnumNetworkDrives
(
[
out
,
retval
]
IWshCollection
**
out_Enum
)
;
[
id
(
0
x7d0
)
]
HRESULT
AddPrinterConnection
(
[
in
]
BSTR
LocalName
,
[
in
]
BSTR
RemoteName
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
,
[
in
,
optional
]
VARIANT
*
UserName
,
[
in
,
optional
]
VARIANT
*
Password
)
;
[
id
(
0
x7d1
)
]
HRESULT
RemovePrinterConnection
(
[
in
]
BSTR
Name
,
[
in
,
optional
]
VARIANT
*
Force
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
)
;
[
id
(
0
x7d2
)
]
HRESULT
EnumPrinterConnections
(
[
out
,
retval
]
IWshCollection
**
out_Enum
)
;
[
id
(
0
x7d3
)
]
HRESULT
SetDefaultPrinter
(
[
in
]
BSTR
Name
)
;
}
[
uuid
(
24b
e5a31
-
edfe
-
11
d2
-
b933
-
00104b365
c9f
),
odl
,
dual
,
oleautomation
]
interface
IWshNetwork2
:
IWshNetwork
{
[
id
(
0
x7d4
)
]
HRESULT
AddWindowsPrinterConnection
(
[
in
]
BSTR
PrinterName
,
[
in
,
optional
,
defaultvalue
(
""
)
]
BSTR
DriverName
,
[
in
,
optional
,
defaultvalue
(
"LPT1"
)
]
BSTR
Port
)
;
}
[
...
...
dlls/wshom.ocx/wshom.idl
View file @
b98c2a75
...
...
@@ -610,14 +610,81 @@ library IWshRuntimeLibrary
}
;
[
uuid
(
24b
e5a31
-
edfe
-
11
d2
-
b933
-
00104b365
c9f
),
uuid
(
f935dc25
-
1
cf0
-
11
d0
-
adb9
-
00
c04fd58a0b
),
odl
,
dual
,
oleautomation
oleautomation
,
hidden
]
interface
IWshNetwork
2
:
IDispatch
{
interface
IWshNetwork
:
IDispatch
{
[
id
(
0
x60020000
),
propget
]
HRESULT
UserDomain
(
[
out
,
retval
]
BSTR
*
out_UserDomain
)
;
[
id
(
0
x60020001
),
propget
]
HRESULT
UserName
(
[
out
,
retval
]
BSTR
*
out_UserName
)
;
[
id
(
0
x60020002
),
propget
]
HRESULT
UserProfile
(
[
out
,
retval
]
BSTR
*
out_UserProfile
)
;
[
id
(
0
x60020003
),
propget
]
HRESULT
ComputerName
(
[
out
,
retval
]
BSTR
*
out_ComputerName
)
;
[
id
(
0
x60020004
),
propget
,
hidden
]
HRESULT
Organization
(
[
out
,
retval
]
BSTR
*
out_Organization
)
;
[
id
(
0
x60020005
),
propget
,
hidden
]
HRESULT
Site
(
[
out
,
retval
]
BSTR
*
out_Site
)
;
[
id
(
0
x3e8
)
]
HRESULT
MapNetworkDrive
(
[
in
]
BSTR
LocalName
,
[
in
]
BSTR
RemoteName
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
,
[
in
,
optional
]
VARIANT
*
UserName
,
[
in
,
optional
]
VARIANT
*
Password
)
;
[
id
(
0
x3e9
)
]
HRESULT
RemoveNetworkDrive
(
[
in
]
BSTR
Name
,
[
in
,
optional
]
VARIANT
*
Force
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
)
;
[
id
(
0
x3ea
)
]
HRESULT
EnumNetworkDrives
(
[
out
,
retval
]
IWshCollection
**
out_Enum
)
;
[
id
(
0
x7d0
)
]
HRESULT
AddPrinterConnection
(
[
in
]
BSTR
LocalName
,
[
in
]
BSTR
RemoteName
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
,
[
in
,
optional
]
VARIANT
*
UserName
,
[
in
,
optional
]
VARIANT
*
Password
)
;
[
id
(
0
x7d1
)
]
HRESULT
RemovePrinterConnection
(
[
in
]
BSTR
Name
,
[
in
,
optional
]
VARIANT
*
Force
,
[
in
,
optional
]
VARIANT
*
UpdateProfile
)
;
[
id
(
0
x7d2
)
]
HRESULT
EnumPrinterConnections
(
[
out
,
retval
]
IWshCollection
**
out_Enum
)
;
[
id
(
0
x7d3
)
]
HRESULT
SetDefaultPrinter
(
[
in
]
BSTR
Name
)
;
}
[
uuid
(
24b
e5a31
-
edfe
-
11
d2
-
b933
-
00104b365
c9f
),
odl
,
dual
,
oleautomation
]
interface
IWshNetwork2
:
IWshNetwork
{
[
id
(
0
x7d4
)
]
HRESULT
AddWindowsPrinterConnection
(
[
in
]
BSTR
PrinterName
,
[
in
,
optional
,
defaultvalue
(
""
)
]
BSTR
DriverName
,
[
in
,
optional
,
defaultvalue
(
"LPT1"
)
]
BSTR
Port
)
;
}
[
...
...
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