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
663444cc
Commit
663444cc
authored
Jan 17, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd: Implement ITaskFolder::get_Path.
parent
fe55cb10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
8 deletions
+48
-8
folder.c
dlls/taskschd/folder.c
+48
-3
scheduler.c
dlls/taskschd/tests/scheduler.c
+0
-5
No files found.
dlls/taskschd/folder.c
View file @
663444cc
...
...
@@ -35,6 +35,7 @@ typedef struct
{
ITaskFolder
ITaskFolder_iface
;
LONG
ref
;
WCHAR
*
path
;
}
TaskFolder
;
static
inline
TaskFolder
*
impl_from_ITaskFolder
(
ITaskFolder
*
iface
)
...
...
@@ -56,6 +57,7 @@ static ULONG WINAPI TaskFolder_Release(ITaskFolder *iface)
if
(
!
ref
)
{
TRACE
(
"destroying %p
\n
"
,
iface
);
HeapFree
(
GetProcessHeap
(),
0
,
folder
->
path
);
HeapFree
(
GetProcessHeap
(),
0
,
folder
);
}
...
...
@@ -116,8 +118,16 @@ static HRESULT WINAPI TaskFolder_get_Name(ITaskFolder *iface, BSTR *name)
static
HRESULT
WINAPI
TaskFolder_get_Path
(
ITaskFolder
*
iface
,
BSTR
*
path
)
{
FIXME
(
"%p,%p: stub
\n
"
,
iface
,
path
);
return
E_NOTIMPL
;
TaskFolder
*
folder
=
impl_from_ITaskFolder
(
iface
);
TRACE
(
"%p,%p
\n
"
,
iface
,
path
);
if
(
!
path
)
return
E_POINTER
;
*
path
=
SysAllocString
(
folder
->
path
);
if
(
!*
path
)
return
E_OUTOFMEMORY
;
return
S_OK
;
}
static
HRESULT
WINAPI
TaskFolder_GetFolder
(
ITaskFolder
*
iface
,
BSTR
path
,
ITaskFolder
**
folder
)
...
...
@@ -218,13 +228,48 @@ static const ITaskFolderVtbl TaskFolder_vtbl =
HRESULT
TaskFolder_create
(
const
WCHAR
*
parent
,
const
WCHAR
*
path
,
ITaskFolder
**
obj
)
{
static
const
WCHAR
bslash
[]
=
{
'\\'
,
0
};
TaskFolder
*
folder
;
WCHAR
*
folder_path
;
int
len
=
0
;
if
(
path
)
{
len
=
strlenW
(
path
);
if
(
len
&&
path
[
len
-
1
]
==
'\\'
)
return
ERROR_INVALID_NAME
;
}
if
(
parent
)
len
+=
strlenW
(
parent
);
/* +1 if parent is not '\' terminated */
folder_path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
len
+
2
)
*
sizeof
(
WCHAR
));
if
(
!
folder_path
)
return
E_OUTOFMEMORY
;
folder_path
[
0
]
=
0
;
if
(
parent
)
strcpyW
(
folder_path
,
parent
);
len
=
strlenW
(
folder_path
);
if
(
!
len
||
folder_path
[
len
-
1
]
!=
'\\'
)
strcatW
(
folder_path
,
bslash
);
if
(
path
)
{
while
(
*
path
==
'\\'
)
path
++
;
strcatW
(
folder_path
,
path
);
}
folder
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
folder
));
if
(
!
folder
)
return
E_OUTOFMEMORY
;
if
(
!
folder
)
{
HeapFree
(
GetProcessHeap
(),
0
,
folder_path
);
return
E_OUTOFMEMORY
;
}
folder
->
ITaskFolder_iface
.
lpVtbl
=
&
TaskFolder_vtbl
;
folder
->
ref
=
1
;
folder
->
path
=
folder_path
;
*
obj
=
&
folder
->
ITaskFolder_iface
;
TRACE
(
"created %p
\n
"
,
*
obj
);
...
...
dlls/taskschd/tests/scheduler.c
View file @
663444cc
...
...
@@ -182,17 +182,12 @@ if (hr == S_OK)
}
hr
=
ITaskFolder_get_Path
(
folder
,
NULL
);
todo_wine
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Path
(
folder
,
&
bstr
);
todo_wine
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpW
(
bstr
,
bslash
),
"expected '
\\
', got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
}
hr
=
ITaskFolder_CreateFolder
(
folder
,
NULL
,
v_null
,
&
subfolder
);
todo_wine
...
...
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