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
8a779540
Commit
8a779540
authored
Feb 24, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added a IDriveCollection stub.
parent
4da741da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
170 additions
and
9 deletions
+170
-9
filesystem.c
dlls/scrrun/filesystem.c
+162
-3
scrrun.c
dlls/scrrun/scrrun.c
+4
-3
scrrun.idl
dlls/scrrun/scrrun.idl
+1
-1
scrrun_private.h
dlls/scrrun/scrrun_private.h
+3
-2
No files found.
dlls/scrrun/filesystem.c
View file @
8a779540
...
...
@@ -50,6 +50,11 @@ struct filecollection {
BSTR
path
;
};
struct
drivecollection
{
IDriveCollection
IDriveCollection_iface
;
LONG
ref
;
};
struct
enumdata
{
union
{
...
...
@@ -123,6 +128,11 @@ static inline struct filecollection *impl_from_IFileCollection(IFileCollection *
return
CONTAINING_RECORD
(
iface
,
struct
filecollection
,
IFileCollection_iface
);
}
static
inline
struct
drivecollection
*
impl_from_IDriveCollection
(
IDriveCollection
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
drivecollection
,
IDriveCollection_iface
);
}
static
inline
struct
enumvariant
*
impl_from_IEnumVARIANT
(
IEnumVARIANT
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
enumvariant
,
IEnumVARIANT_iface
);
...
...
@@ -1150,6 +1160,156 @@ static HRESULT create_filecoll(BSTR path, IFileCollection **files)
return
S_OK
;
}
static
HRESULT
WINAPI
drivecoll_QueryInterface
(
IDriveCollection
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
obj
);
*
obj
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IDriveCollection
)
||
IsEqualIID
(
riid
,
&
IID_IDispatch
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
obj
=
iface
;
IDriveCollection_AddRef
(
iface
);
}
else
return
E_NOINTERFACE
;
return
S_OK
;
}
static
ULONG
WINAPI
drivecoll_AddRef
(
IDriveCollection
*
iface
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
drivecoll_Release
(
IDriveCollection
*
iface
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
ref
);
if
(
!
ref
)
heap_free
(
This
);
return
ref
;
}
static
HRESULT
WINAPI
drivecoll_GetTypeInfoCount
(
IDriveCollection
*
iface
,
UINT
*
pctinfo
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
*
pctinfo
=
1
;
return
S_OK
;
}
static
HRESULT
WINAPI
drivecoll_GetTypeInfo
(
IDriveCollection
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
get_typeinfo
(
IDriveCollection_tid
,
ppTInfo
);
}
static
HRESULT
WINAPI
drivecoll_GetIDsOfNames
(
IDriveCollection
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
ITypeInfo
*
typeinfo
;
HRESULT
hr
;
TRACE
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
hr
=
get_typeinfo
(
IDriveCollection_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_GetIDsOfNames
(
typeinfo
,
rgszNames
,
cNames
,
rgDispId
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
drivecoll_Invoke
(
IDriveCollection
*
iface
,
DISPID
dispIdMember
,
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
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
(
IDriveCollection_tid
,
&
typeinfo
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
ITypeInfo_Invoke
(
typeinfo
,
iface
,
dispIdMember
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
ITypeInfo_Release
(
typeinfo
);
}
return
hr
;
}
static
HRESULT
WINAPI
drivecoll_get_Item
(
IDriveCollection
*
iface
,
VARIANT
key
,
IDrive
**
drive
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
drive
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
drivecoll_get__NewEnum
(
IDriveCollection
*
iface
,
IUnknown
**
penum
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
penum
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
drivecoll_get_Count
(
IDriveCollection
*
iface
,
LONG
*
count
)
{
struct
drivecollection
*
This
=
impl_from_IDriveCollection
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
count
);
return
E_NOTIMPL
;
}
static
const
IDriveCollectionVtbl
drivecollectionvtbl
=
{
drivecoll_QueryInterface
,
drivecoll_AddRef
,
drivecoll_Release
,
drivecoll_GetTypeInfoCount
,
drivecoll_GetTypeInfo
,
drivecoll_GetIDsOfNames
,
drivecoll_Invoke
,
drivecoll_get_Item
,
drivecoll_get__NewEnum
,
drivecoll_get_Count
};
static
HRESULT
create_drivecoll
(
IDriveCollection
**
drives
)
{
struct
drivecollection
*
This
;
*
drives
=
NULL
;
This
=
heap_alloc
(
sizeof
(
*
This
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
This
->
IDriveCollection_iface
.
lpVtbl
=
&
drivecollectionvtbl
;
This
->
ref
=
1
;
*
drives
=
&
This
->
IDriveCollection_iface
;
return
S_OK
;
}
static
HRESULT
WINAPI
folder_QueryInterface
(
IFolder
*
iface
,
REFIID
riid
,
void
**
obj
)
{
struct
folder
*
This
=
impl_from_IFolder
(
iface
);
...
...
@@ -1944,9 +2104,8 @@ static HRESULT WINAPI filesys_Invoke(IFileSystem3 *iface, DISPID dispIdMember,
static
HRESULT
WINAPI
filesys_get_Drives
(
IFileSystem3
*
iface
,
IDriveCollection
**
ppdrives
)
{
FIXME
(
"%p %p
\n
"
,
iface
,
ppdrives
);
return
E_NOTIMPL
;
TRACE
(
"%p %p
\n
"
,
iface
,
ppdrives
);
return
create_drivecoll
(
ppdrives
);
}
static
HRESULT
WINAPI
filesys_BuildPath
(
IFileSystem3
*
iface
,
BSTR
Path
,
...
...
dlls/scrrun/scrrun.c
View file @
8a779540
...
...
@@ -103,12 +103,13 @@ static ITypeInfo *typeinfos[LAST_tid];
static
REFIID
tid_ids
[]
=
{
&
IID_NULL
,
&
IID_IDictionary
,
&
IID_IDriveCollection
,
&
IID_IFile
,
&
IID_IFileCollection
,
&
IID_IFileSystem3
,
&
IID_IFolder
,
&
IID_IFolderCollection
,
&
IID_ITextStream
,
&
IID_IFile
,
&
IID_IFileCollection
&
IID_ITextStream
};
static
HRESULT
load_typelib
(
void
)
...
...
dlls/scrrun/scrrun.idl
View file @
8a779540
...
...
@@ -263,7 +263,7 @@ library Scripting
oleautomation
]
interface
IDriveCollection
:
IDispatch
{
[
id
(
DISPID_VALUE
)
]
[
id
(
DISPID_VALUE
)
,
propget
]
HRESULT
Item
(
[
in
]
VARIANT
Key
,
[
out
,
retval
]
IDrive
**
ppdrive
)
;
[
id
(
DISPID_NEWENUM
),
propget
,
restricted
,
hidden
]
...
...
dlls/scrrun/scrrun_private.h
View file @
8a779540
...
...
@@ -25,12 +25,13 @@ typedef enum tid_t
{
NULL_tid
,
IDictionary_tid
,
IDriveCollection_tid
,
IFile_tid
,
IFileCollection_tid
,
IFileSystem3_tid
,
IFolder_tid
,
IFolderCollection_tid
,
ITextStream_tid
,
IFile_tid
,
IFileCollection_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