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
1ca6cacd
Commit
1ca6cacd
authored
Jul 12, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun: Added IFileSystem3_FileExists implementation.
parent
6c5588f9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
filesystem.c
dlls/scrrun/filesystem.c
+6
-4
Makefile.in
dlls/scrrun/tests/Makefile.in
+1
-1
filesystem.c
dlls/scrrun/tests/filesystem.c
+20
-1
No files found.
dlls/scrrun/filesystem.c
View file @
1ca6cacd
...
...
@@ -213,12 +213,14 @@ static HRESULT WINAPI filesys_DriveExists(IFileSystem3 *iface, BSTR DriveSpec,
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
filesys_FileExists
(
IFileSystem3
*
iface
,
BSTR
FileSpec
,
VARIANT_BOOL
*
pfExists
)
static
HRESULT
WINAPI
filesys_FileExists
(
IFileSystem3
*
iface
,
BSTR
path
,
VARIANT_BOOL
*
ret
)
{
FIXME
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
FileSpec
),
pfExists
);
TRACE
(
"%p %s %p
\n
"
,
iface
,
debugstr_w
(
path
),
ret
);
return
E_NOTIMPL
;
if
(
!
ret
)
return
E_POINTER
;
*
ret
=
GetFileAttributesW
(
path
)
!=
INVALID_FILE_ATTRIBUTES
?
VARIANT_TRUE
:
VARIANT_FALSE
;
return
S_OK
;
}
static
HRESULT
WINAPI
filesys_FolderExists
(
IFileSystem3
*
iface
,
BSTR
FolderSpec
,
...
...
dlls/scrrun/tests/Makefile.in
View file @
1ca6cacd
TESTDLL
=
scrrun.dll
IMPORTS
=
ole32 shlwapi uuid
IMPORTS
=
ole32 shlwapi uuid
oleaut32
C_SRCS
=
\
filesystem.c
...
...
dlls/scrrun/tests/filesystem.c
View file @
1ca6cacd
...
...
@@ -22,6 +22,7 @@
#include "windows.h"
#include "ole2.h"
#include "oleauto.h"
#include "dispex.h"
#include "wine/test.h"
...
...
@@ -31,11 +32,14 @@
static
void
test_interfaces
(
void
)
{
static
const
WCHAR
pathW
[]
=
{
'p'
,
'a'
,
't'
,
'h'
,
0
};
HRESULT
hr
;
IDispatch
*
disp
;
IDispatchEx
*
dispex
;
IFileSystem3
*
fs3
;
IObjectWithSite
*
site
;
VARIANT_BOOL
b
;
BSTR
path
;
hr
=
CoCreateInstance
(
&
CLSID_FileSystemObject
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IDispatch
,
(
void
**
)
&
disp
);
...
...
@@ -46,7 +50,6 @@ static void test_interfaces(void)
hr
=
IDispatch_QueryInterface
(
disp
,
&
IID_IFileSystem3
,
(
void
**
)
&
fs3
);
ok
(
hr
==
S_OK
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
S_OK
);
IFileSystem3_Release
(
fs3
);
hr
=
IDispatch_QueryInterface
(
disp
,
&
IID_IObjectWithSite
,
(
void
**
)
&
site
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
E_NOINTERFACE
);
...
...
@@ -54,6 +57,22 @@ static void test_interfaces(void)
hr
=
IDispatch_QueryInterface
(
disp
,
&
IID_IDispatchEx
,
(
void
**
)
&
dispex
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
E_NOINTERFACE
);
b
=
VARIANT_TRUE
;
hr
=
IFileSystem3_FileExists
(
fs3
,
NULL
,
&
b
);
ok
(
hr
==
S_OK
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
S_OK
);
ok
(
b
==
VARIANT_FALSE
,
"got %x
\n
"
,
b
);
hr
=
IFileSystem3_FileExists
(
fs3
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
E_POINTER
);
path
=
SysAllocString
(
pathW
);
b
=
VARIANT_TRUE
;
hr
=
IFileSystem3_FileExists
(
fs3
,
path
,
&
b
);
ok
(
hr
==
S_OK
,
"got 0x%08x, expected 0x%08x
\n
"
,
hr
,
S_OK
);
ok
(
b
==
VARIANT_FALSE
,
"got %x
\n
"
,
b
);
SysFreeString
(
path
);
IFileSystem3_Release
(
fs3
);
IDispatch_Release
(
disp
);
}
...
...
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