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
7ddec087
Commit
7ddec087
authored
May 13, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
May 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Implement GetDiskInfoA.
parent
ca1a979c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
4 deletions
+62
-4
urlcache.c
dlls/wininet/tests/urlcache.c
+41
-0
urlcache.c
dlls/wininet/urlcache.c
+19
-3
wininet.spec
dlls/wininet/wininet.spec
+1
-1
winineti.h
include/winineti.h
+1
-0
No files found.
dlls/wininet/tests/urlcache.c
View file @
7ddec087
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wininet.h"
#include "wininet.h"
#include "winineti.h"
#include "wine/test.h"
#include "wine/test.h"
...
@@ -219,6 +220,45 @@ static void test_FindCloseUrlCache(void)
...
@@ -219,6 +220,45 @@ static void test_FindCloseUrlCache(void)
ok
(
ERROR_INVALID_HANDLE
==
err
,
"expected %d, got %d
\n
"
,
ERROR_INVALID_HANDLE
,
err
);
ok
(
ERROR_INVALID_HANDLE
==
err
,
"expected %d, got %d
\n
"
,
ERROR_INVALID_HANDLE
,
err
);
}
}
static
void
test_GetDiskInfoA
(
void
)
{
BOOL
ret
;
DWORD
error
,
cluster_size
;
DWORDLONG
free
,
total
;
char
path
[
MAX_PATH
],
*
p
;
GetSystemDirectoryA
(
path
,
MAX_PATH
);
if
((
p
=
strchr
(
path
,
'\\'
)))
*++
p
=
0
;
ret
=
GetDiskInfoA
(
path
,
&
cluster_size
,
&
free
,
&
total
);
ok
(
ret
,
"GetDiskInfoA failed %u
\n
"
,
GetLastError
());
ret
=
GetDiskInfoA
(
path
,
&
cluster_size
,
&
free
,
NULL
);
ok
(
ret
,
"GetDiskInfoA failed %u
\n
"
,
GetLastError
());
ret
=
GetDiskInfoA
(
path
,
&
cluster_size
,
NULL
,
NULL
);
ok
(
ret
,
"GetDiskInfoA failed %u
\n
"
,
GetLastError
());
ret
=
GetDiskInfoA
(
path
,
NULL
,
NULL
,
NULL
);
ok
(
ret
,
"GetDiskInfoA failed %u
\n
"
,
GetLastError
());
ret
=
GetDiskInfoA
(
path
,
NULL
,
NULL
,
NULL
);
ok
(
ret
,
"GetDiskInfoA failed %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
strcpy
(
p
,
"
\\
non
\\
existing
\\
path"
);
ret
=
GetDiskInfoA
(
path
,
NULL
,
NULL
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"GetDiskInfoA succeeded
\n
"
);
ok
(
error
==
ERROR_PATH_NOT_FOUND
,
"got %u expected ERROR_PATH_NOT_FOUND
\n
"
,
error
);
SetLastError
(
0xdeadbeef
);
ret
=
GetDiskInfoA
(
NULL
,
NULL
,
NULL
,
NULL
);
error
=
GetLastError
();
ok
(
!
ret
,
"GetDiskInfoA succeeded
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"got %u expected ERROR_INVALID_PARAMETER
\n
"
,
error
);
}
START_TEST
(
urlcache
)
START_TEST
(
urlcache
)
{
{
HMODULE
hdll
;
HMODULE
hdll
;
...
@@ -227,4 +267,5 @@ START_TEST(urlcache)
...
@@ -227,4 +267,5 @@ START_TEST(urlcache)
pUnlockUrlCacheEntryFileA
=
(
void
*
)
GetProcAddress
(
hdll
,
"UnlockUrlCacheEntryFileA"
);
pUnlockUrlCacheEntryFileA
=
(
void
*
)
GetProcAddress
(
hdll
,
"UnlockUrlCacheEntryFileA"
);
test_urlcacheA
();
test_urlcacheA
();
test_FindCloseUrlCache
();
test_FindCloseUrlCache
();
test_GetDiskInfoA
();
}
}
dlls/wininet/urlcache.c
View file @
7ddec087
...
@@ -3624,10 +3624,26 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
...
@@ -3624,10 +3624,26 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
/***********************************************************************
/***********************************************************************
* GetDiskInfoA (WININET.@)
* GetDiskInfoA (WININET.@)
*/
*/
DWORD
WINAPI
GetDiskInfoA
(
void
*
p0
,
void
*
p1
,
void
*
p2
,
void
*
p3
)
BOOL
WINAPI
GetDiskInfoA
(
PCSTR
path
,
PDWORD
cluster_size
,
PDWORDLONG
free
,
PDWORDLONG
total
)
{
{
FIXME
(
"(%p, %p, %p, %p)
\n
"
,
p0
,
p1
,
p2
,
p3
);
BOOL
ret
;
return
0
;
ULARGE_INTEGER
bytes_free
,
bytes_total
;
TRACE
(
"(%s, %p, %p, %p)
\n
"
,
debugstr_a
(
path
),
cluster_size
,
free
,
total
);
if
(
!
path
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
((
ret
=
GetDiskFreeSpaceExA
(
path
,
NULL
,
&
bytes_total
,
&
bytes_free
)))
{
if
(
cluster_size
)
*
cluster_size
=
1
;
if
(
free
)
*
free
=
bytes_free
.
QuadPart
;
if
(
total
)
*
total
=
bytes_total
.
QuadPart
;
}
return
ret
;
}
}
/***********************************************************************
/***********************************************************************
...
...
dlls/wininet/wininet.spec
View file @
7ddec087
101 stub -noname DoConnectoidsExist
101 stub -noname DoConnectoidsExist
102 stdcall -noname GetDiskInfoA(
p
tr ptr ptr ptr)
102 stdcall -noname GetDiskInfoA(
s
tr ptr ptr ptr)
103 stub -noname PerformOperationOverUrlCacheA
103 stub -noname PerformOperationOverUrlCacheA
104 stub -noname HttpCheckDavComplianceA
104 stub -noname HttpCheckDavComplianceA
105 stub -noname HttpCheckDavComplianceW
105 stub -noname HttpCheckDavComplianceW
...
...
include/winineti.h
View file @
7ddec087
...
@@ -90,6 +90,7 @@ extern "C" {
...
@@ -90,6 +90,7 @@ extern "C" {
#endif
#endif
DWORD
WINAPI
DeleteIE3Cache
(
HWND
,
HINSTANCE
,
LPSTR
,
int
);
DWORD
WINAPI
DeleteIE3Cache
(
HWND
,
HINSTANCE
,
LPSTR
,
int
);
BOOL
WINAPI
GetDiskInfoA
(
PCSTR
,
PDWORD
,
PDWORDLONG
,
PDWORDLONG
);
BOOL
WINAPI
GetUrlCacheConfigInfoA
(
LPINTERNET_CACHE_CONFIG_INFOA
,
LPDWORD
,
DWORD
);
BOOL
WINAPI
GetUrlCacheConfigInfoA
(
LPINTERNET_CACHE_CONFIG_INFOA
,
LPDWORD
,
DWORD
);
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
,
LPDWORD
,
DWORD
);
BOOL
WINAPI
GetUrlCacheConfigInfoW
(
LPINTERNET_CACHE_CONFIG_INFOW
,
LPDWORD
,
DWORD
);
#define GetUrlCacheConfigInfo WINELIB_NAME_AW(GetUrlCacheConfigInfo)
#define GetUrlCacheConfigInfo WINELIB_NAME_AW(GetUrlCacheConfigInfo)
...
...
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