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
b10c237c
Commit
b10c237c
authored
Apr 17, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wshom: Added a stub for IWshEnvironment.
parent
60742676
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
191 additions
and
9 deletions
+191
-9
shell.c
dlls/wshom.ocx/shell.c
+183
-3
wshom.idl
dlls/wshom.ocx/tests/wshom.idl
+2
-2
wshom.idl
dlls/wshom.ocx/wshom.idl
+2
-2
wshom_main.c
dlls/wshom.ocx/wshom_main.c
+2
-1
wshom_private.h
dlls/wshom.ocx/wshom_private.h
+2
-1
No files found.
dlls/wshom.ocx/shell.c
View file @
b10c237c
...
...
@@ -77,6 +77,12 @@ typedef struct
BSTR
path_link
;
}
WshShortcut
;
typedef
struct
{
IWshEnvironment
IWshEnvironment_iface
;
LONG
ref
;
}
WshEnvironment
;
static
inline
WshCollection
*
impl_from_IWshCollection
(
IWshCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WshCollection
,
IWshCollection_iface
);
...
...
@@ -87,6 +93,180 @@ static inline WshShortcut *impl_from_IWshShortcut( IWshShortcut *iface )
return
CONTAINING_RECORD
(
iface
,
WshShortcut
,
IWshShortcut_iface
);
}
static
inline
WshEnvironment
*
impl_from_IWshEnvironment
(
IWshEnvironment
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
WshEnvironment
,
IWshEnvironment_iface
);
}
static
HRESULT
WINAPI
WshEnvironment_QueryInterface
(
IWshEnvironment
*
iface
,
REFIID
riid
,
void
**
obj
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
TRACE
(
"(%p)->(%s, %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_IDispatch
)
||
IsEqualGUID
(
riid
,
&
IID_IWshEnvironment
))
{
*
obj
=
iface
;
}
else
{
FIXME
(
"Unknown iface %s
\n
"
,
debugstr_guid
(
riid
));
*
obj
=
NULL
;
return
E_NOINTERFACE
;
}
IUnknown_AddRef
((
IUnknown
*
)
*
obj
);
return
S_OK
;
}
static
ULONG
WINAPI
WshEnvironment_AddRef
(
IWshEnvironment
*
iface
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
WshEnvironment_Release
(
IWshEnvironment
*
iface
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref = %d
\n
"
,
This
,
ref
);
if
(
!
ref
)
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
ref
;
}
static
HRESULT
WINAPI
WshEnvironment_GetTypeInfoCount
(
IWshEnvironment
*
iface
,
UINT
*
pctinfo
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
*
pctinfo
=
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
WshEnvironment_GetTypeInfo
(
IWshEnvironment
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
get_typeinfo
(
IWshEnvironment_tid
,
ppTInfo
);
}
static
HRESULT
WINAPI
WshEnvironment_GetIDsOfNames
(
IWshEnvironment
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
hr
=
get_typeinfo
(
IWshEnvironment_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
rgszNames
,
cNames
,
rgDispId
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
WshEnvironment_Invoke
(
IWshEnvironment
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
hr
=
get_typeinfo
(
IWshEnvironment_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
&
This
->
IWshEnvironment_iface
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
WshEnvironment_get_Item
(
IWshEnvironment
*
iface
,
BSTR
name
,
BSTR
*
value
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%s %p): stub
\n
"
,
This
,
debugstr_w
(
name
),
value
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshEnvironment_put_Item
(
IWshEnvironment
*
iface
,
BSTR
name
,
BSTR
value
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%s %s): stub
\n
"
,
This
,
debugstr_w
(
name
),
debugstr_w
(
value
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshEnvironment_Count
(
IWshEnvironment
*
iface
,
LONG
*
count
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshEnvironment_get_length
(
IWshEnvironment
*
iface
,
LONG
*
len
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
len
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshEnvironment__NewEnum
(
IWshEnvironment
*
iface
,
IUnknown
**
penum
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
penum
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
WshEnvironment_Remove
(
IWshEnvironment
*
iface
,
BSTR
name
)
{
WshEnvironment
*
This
=
impl_from_IWshEnvironment
(
iface
);
FIXME
(
"(%p)->(%s): stub
\n
"
,
This
,
debugstr_w
(
name
));
return
E_NOTIMPL
;
}
static
const
IWshEnvironmentVtbl
WshEnvironmentVtbl
=
{
WshEnvironment_QueryInterface
,
WshEnvironment_AddRef
,
WshEnvironment_Release
,
WshEnvironment_GetTypeInfoCount
,
WshEnvironment_GetTypeInfo
,
WshEnvironment_GetIDsOfNames
,
WshEnvironment_Invoke
,
WshEnvironment_get_Item
,
WshEnvironment_put_Item
,
WshEnvironment_Count
,
WshEnvironment_get_length
,
WshEnvironment__NewEnum
,
WshEnvironment_Remove
};
static
HRESULT
WshEnvironment_Create
(
IWshEnvironment
**
env
)
{
WshEnvironment
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IWshEnvironment_iface
.
lpVtbl
=
&
WshEnvironmentVtbl
;
This
->
ref
=
1
;
*
env
=
&
This
->
IWshEnvironment_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
WshCollection_QueryInterface
(
IWshCollection
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
WshCollection
*
This
=
impl_from_IWshCollection
(
iface
);
...
...
@@ -744,10 +924,10 @@ static HRESULT WINAPI WshShell3_get_SpecialFolders(IWshShell3 *iface, IWshCollec
return
WshCollection_Create
(
folders
);
}
static
HRESULT
WINAPI
WshShell3_get_Environment
(
IWshShell3
*
iface
,
VARIANT
*
Type
,
IWshEnvironment
**
out_E
nv
)
static
HRESULT
WINAPI
WshShell3_get_Environment
(
IWshShell3
*
iface
,
VARIANT
*
type
,
IWshEnvironment
**
e
nv
)
{
FIXME
(
"(%
p %p): stub
\n
"
,
Type
,
out_E
nv
);
return
E_NOTIMPL
;
FIXME
(
"(%
s %p): semi-stub
\n
"
,
debugstr_variant
(
type
),
e
nv
);
return
WshEnvironment_Create
(
env
)
;
}
static
HRESULT
WINAPI
WshShell3_Run
(
IWshShell3
*
iface
,
BSTR
cmd
,
VARIANT
*
style
,
VARIANT
*
WaitOnReturn
,
int
*
exit_code
)
...
...
dlls/wshom.ocx/tests/wshom.idl
View file @
b10c237c
...
...
@@ -399,7 +399,7 @@ library IWshRuntimeLibrary
[
id
(
DISPID_VALUE
),
propput
]
HRESULT
Item
(
[
in
]
BSTR
Name
,
[
in
]
BSTR
out_
Value
)
;
[
in
]
BSTR
Value
)
;
[
id
(
1
)
]
HRESULT
Count
(
[
out
,
retval
]
long
*
out_Count
)
;
...
...
@@ -408,7 +408,7 @@ library IWshRuntimeLibrary
HRESULT
length
(
[
out
,
retval
]
long
*
out_Count
)
;
[
id
(
DISPID_NEWENUM
)
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
*
out_Enum
)
;
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
*
*
out_Enum
)
;
[
id
(
0
x03e9
)
]
HRESULT
Remove
(
[
in
]
BSTR
Name
)
;
...
...
dlls/wshom.ocx/wshom.idl
View file @
b10c237c
...
...
@@ -401,7 +401,7 @@ library IWshRuntimeLibrary
[
id
(
DISPID_VALUE
),
propput
]
HRESULT
Item
(
[
in
]
BSTR
Name
,
[
in
]
BSTR
out_
Value
)
;
[
in
]
BSTR
Value
)
;
[
id
(
1
)
]
HRESULT
Count
(
[
out
,
retval
]
long
*
out_Count
)
;
...
...
@@ -410,7 +410,7 @@ library IWshRuntimeLibrary
HRESULT
length
(
[
out
,
retval
]
long
*
out_Count
)
;
[
id
(
DISPID_NEWENUM
)
]
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
*
out_Enum
)
;
HRESULT
_NewEnum
(
[
out
,
retval
]
IUnknown
*
*
out_Enum
)
;
[
id
(
0
x03e9
)
]
HRESULT
Remove
(
[
in
]
BSTR
Name
)
;
...
...
dlls/wshom.ocx/wshom_main.c
View file @
b10c237c
...
...
@@ -33,8 +33,9 @@ static ITypeInfo *typeinfos[LAST_tid];
static
REFIID
tid_ids
[]
=
{
&
IID_NULL
,
&
IID_IWshShell3
,
&
IID_IWshCollection
,
&
IID_IWshEnvironment
,
&
IID_IWshShell3
,
&
IID_IWshShortcut
};
...
...
dlls/wshom.ocx/wshom_private.h
View file @
b10c237c
...
...
@@ -27,8 +27,9 @@
/* typelibs */
typedef
enum
tid_t
{
NULL_tid
,
IWshShell3_tid
,
IWshCollection_tid
,
IWshEnvironment_tid
,
IWshShell3_tid
,
IWshShortcut_tid
,
LAST_tid
}
tid_t
;
...
...
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