On 27.04.2016 08:58, Austin English wrote:
I used DWORD * / WCHAR * to avoid adding LP* obfuscations, which is usually discouraged.
Try 3: fix formatting
-- -Austin
0001-kernel32-add-GetVolumeInformationByHandleW-stub-try-.patch
From e96e61749556454fb97c382f5f2452d1a825c053 Mon Sep 17 00:00:00 2001 From: Austin English austinenglish@gmail.com Date: Mon, 4 Apr 2016 13:22:44 -0500 Subject: [PATCH] kernel32: add GetVolumeInformationByHandleW stub (try 3)
Signed-off-by: Austin English austinenglish@gmail.com
dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/volume.c | 12 ++++++++++++ include/winbase.h | 1 + 3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 71dbe4d..2ad9ad4 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -875,7 +875,7 @@ @ stdcall GetVersionExA(ptr) @ stdcall GetVersionExW(ptr) @ stdcall GetVolumeInformationA(str ptr long ptr ptr ptr ptr long) -# @ stub GetVolumeInformationByHandleW +@ stdcall GetVolumeInformationByHandleW(ptr wstr long ptr ptr ptr wstr long)
HANDLEs should be marked as "long" in the spec file.
@ stdcall GetVolumeInformationW(wstr ptr long ptr ptr ptr ptr long) @ stdcall GetVolumeNameForVolumeMountPointA(str ptr long) @ stdcall GetVolumeNameForVolumeMountPointW(wstr ptr long) diff --git a/dlls/kernel32/volume.c b/dlls/kernel32/volume.c index 4f01c99..81905e8 100644 --- a/dlls/kernel32/volume.c +++ b/dlls/kernel32/volume.c @@ -2309,3 +2309,15 @@ BOOL WINAPI SetVolumeMountPointW(LPCWSTR path, LPCWSTR volume) SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; }
+/***********************************************************************
GetVolumeInformationByHandleW (KERNEL32.@)
- */
+BOOL WINAPI GetVolumeInformationByHandleW(HANDLE handle, WCHAR *volnamebuf, DWORD volnamesize, DWORD *volserial,
DWORD *maxlength, DWORD *flags, WCHAR *fsnamebuf, DWORD fsnamesize)
+{
- FIXME("%p %s %d %p %p %p %s %d\n", handle, debugstr_w(volnamebuf), volnamesize, volserial, maxlength, flags,
debugstr_w(fsnamebuf), fsnamesize);
According to MSDN, those WCHAR arguments should be output parameters. It doesn't really make sense to trace them with debugstr_w.
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+} diff --git a/include/winbase.h b/include/winbase.h index c5332c0..fac6c29 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2167,6 +2167,7 @@ WINBASEAPI BOOL WINAPI GetVersionExW(OSVERSIONINFOW*); WINBASEAPI BOOL WINAPI GetVolumeInformationA(LPCSTR,LPSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPSTR,DWORD); WINBASEAPI BOOL WINAPI GetVolumeInformationW(LPCWSTR,LPWSTR,DWORD,LPDWORD,LPDWORD,LPDWORD,LPWSTR,DWORD); #define GetVolumeInformation WINELIB_NAME_AW(GetVolumeInformation) +WINBASEAPI BOOL WINAPI GetVolumeInformationByHandleW(HANDLE,WCHAR *,DWORD,DWORD *,DWORD *,DWORD *,WCHAR *,DWORD); WINBASEAPI BOOL WINAPI GetVolumeNameForVolumeMountPointA(LPCSTR,LPSTR,DWORD); WINBASEAPI BOOL WINAPI GetVolumeNameForVolumeMountPointW(LPCWSTR,LPWSTR,DWORD); #define GetVolumeNameForVolumeMountPoint WINELIB_NAME_AW(GetVolumeNameForVolumeMountPoint) -- 2.8.0.rc3