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
42d2b519
Commit
42d2b519
authored
Jan 06, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Implement Name() property for Folder.
parent
b99b69aa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
filesystem.c
dlls/scrrun/filesystem.c
+22
-2
filesystem.c
dlls/scrrun/tests/filesystem.c
+6
-0
No files found.
dlls/scrrun/filesystem.c
View file @
42d2b519
...
@@ -892,8 +892,26 @@ static HRESULT WINAPI folder_get_Path(IFolder *iface, BSTR *path)
...
@@ -892,8 +892,26 @@ static HRESULT WINAPI folder_get_Path(IFolder *iface, BSTR *path)
static
HRESULT
WINAPI
folder_get_Name
(
IFolder
*
iface
,
BSTR
*
name
)
static
HRESULT
WINAPI
folder_get_Name
(
IFolder
*
iface
,
BSTR
*
name
)
{
{
struct
folder
*
This
=
impl_from_IFolder
(
iface
);
struct
folder
*
This
=
impl_from_IFolder
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
name
);
WCHAR
*
ptr
;
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
name
);
if
(
!
name
)
return
E_POINTER
;
*
name
=
NULL
;
ptr
=
strrchrW
(
This
->
path
,
'\\'
);
if
(
ptr
)
{
*
name
=
SysAllocString
(
ptr
+
1
);
TRACE
(
"%s
\n
"
,
debugstr_w
(
*
name
));
if
(
!*
name
)
return
E_OUTOFMEMORY
;
}
else
return
E_FAIL
;
return
S_OK
;
}
}
static
HRESULT
WINAPI
folder_put_Name
(
IFolder
*
iface
,
BSTR
name
)
static
HRESULT
WINAPI
folder_put_Name
(
IFolder
*
iface
,
BSTR
name
)
...
@@ -1072,6 +1090,8 @@ HRESULT create_folder(const WCHAR *path, IFolder **folder)
...
@@ -1072,6 +1090,8 @@ HRESULT create_folder(const WCHAR *path, IFolder **folder)
*
folder
=
NULL
;
*
folder
=
NULL
;
TRACE
(
"%s
\n
"
,
debugstr_w
(
path
));
This
=
heap_alloc
(
sizeof
(
struct
folder
));
This
=
heap_alloc
(
sizeof
(
struct
folder
));
if
(
!
This
)
return
E_OUTOFMEMORY
;
if
(
!
This
)
return
E_OUTOFMEMORY
;
...
...
dlls/scrrun/tests/filesystem.c
View file @
42d2b519
...
@@ -882,6 +882,12 @@ if (hr == S_OK) {
...
@@ -882,6 +882,12 @@ if (hr == S_OK) {
hr
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IFolder
,
(
void
**
)
&
folder
);
hr
=
IDispatch_QueryInterface
(
V_DISPATCH
(
&
var
),
&
IID_IFolder
,
(
void
**
)
&
folder
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
str
=
NULL
;
hr
=
IFolder_get_Name
(
folder
,
&
str
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
SysFreeString
(
str
);
IFolder_Release
(
folder
);
IFolder_Release
(
folder
);
VariantClear
(
&
var
);
VariantClear
(
&
var
);
...
...
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