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
f76f34ca
Commit
f76f34ca
authored
Jan 02, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Implement GetFolder().
parent
2ca39611
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
3 deletions
+53
-3
filesystem.c
dlls/scrrun/filesystem.c
+16
-3
filesystem.c
dlls/scrrun/tests/filesystem.c
+37
-0
No files found.
dlls/scrrun/filesystem.c
View file @
f76f34ca
...
...
@@ -1410,11 +1410,24 @@ static HRESULT WINAPI filesys_GetFile(IFileSystem3 *iface, BSTR FilePath,
}
static
HRESULT
WINAPI
filesys_GetFolder
(
IFileSystem3
*
iface
,
BSTR
FolderPath
,
IFolder
**
pp
folder
)
IFolder
**
folder
)
{
FIXME
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
FolderPath
),
ppfolder
)
;
DWORD
attrs
;
return
E_NOTIMPL
;
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
FolderPath
),
folder
);
if
(
!
folder
)
return
E_POINTER
;
*
folder
=
NULL
;
if
(
!
FolderPath
)
return
E_INVALIDARG
;
attrs
=
GetFileAttributesW
(
FolderPath
);
if
((
attrs
==
INVALID_FILE_ATTRIBUTES
)
||
!
(
attrs
&
FILE_ATTRIBUTE_DIRECTORY
))
return
CTL_E_PATHNOTFOUND
;
return
create_folder
(
FolderPath
,
folder
);
}
static
HRESULT
WINAPI
filesys_GetSpecialFolder
(
IFileSystem3
*
iface
,
...
...
dlls/scrrun/tests/filesystem.c
View file @
f76f34ca
...
...
@@ -739,6 +739,42 @@ static void test_BuildPath(void)
}
}
static
void
test_GetFolder
(
void
)
{
static
const
WCHAR
dummyW
[]
=
{
'd'
,
'u'
,
'm'
,
'm'
,
'y'
,
0
};
WCHAR
buffW
[
MAX_PATH
];
IFolder
*
folder
;
HRESULT
hr
;
BSTR
str
;
folder
=
(
void
*
)
0xdeadbeef
;
hr
=
IFileSystem3_GetFolder
(
fs3
,
NULL
,
&
folder
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
ok
(
folder
==
NULL
,
"got %p
\n
"
,
folder
);
hr
=
IFileSystem3_GetFolder
(
fs3
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
/* something that doesn't exist */
str
=
SysAllocString
(
dummyW
);
hr
=
IFileSystem3_GetFolder
(
fs3
,
str
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x
\n
"
,
hr
);
folder
=
(
void
*
)
0xdeadbeef
;
hr
=
IFileSystem3_GetFolder
(
fs3
,
str
,
&
folder
);
ok
(
hr
==
CTL_E_PATHNOTFOUND
,
"got 0x%08x
\n
"
,
hr
);
ok
(
folder
==
NULL
,
"got %p
\n
"
,
folder
);
SysFreeString
(
str
);
GetWindowsDirectoryW
(
buffW
,
MAX_PATH
);
str
=
SysAllocString
(
buffW
);
hr
=
IFileSystem3_GetFolder
(
fs3
,
str
,
&
folder
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
SysFreeString
(
str
);
IFolder_Release
(
folder
);
}
START_TEST
(
filesystem
)
{
HRESULT
hr
;
...
...
@@ -763,6 +799,7 @@ START_TEST(filesystem)
test_GetFile
();
test_CopyFolder
();
test_BuildPath
();
test_GetFolder
();
IFileSystem3_Release
(
fs3
);
...
...
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