From 18d3ad837c1380e31247024691e260ade063b695 Mon Sep 17 00:00:00 2001 From: Dave Pickles Date: Sat, 5 Jun 1999 15:19:30 +0000 Subject: [PATCH] Stub for SetVolumeLabel(). --- files/drive.c | 22 +++++++++++++++++++++- include/winbase.h | 3 +++ relay32/kernel32.spec | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/files/drive.c b/files/drive.c index 85dc6889ac7..df9c4a9061c 100644 --- a/files/drive.c +++ b/files/drive.c @@ -1202,7 +1202,27 @@ BOOL WINAPI GetVolumeInformationW( LPCWSTR root, LPWSTR label, return ret; } -BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) { +/*********************************************************************** + * SetVolumeLabelA (KERNEL32.675) + */ +BOOL WINAPI SetVolumeLabelA(LPCSTR rootpath,LPCSTR volname) +{ FIXME_(dosfs)("(%s,%s),stub!\n",rootpath,volname); return TRUE; } + +/*********************************************************************** + * SetVolumeLabelW (KERNEL32.676) + */ +BOOL WINAPI SetVolumeLabelW(LPCWSTR rootpath,LPCWSTR volname) +{ + LPSTR xroot, xvol; + BOOL ret; + + xroot = HEAP_strdupWtoA( GetProcessHeap(), 0, rootpath); + xvol = HEAP_strdupWtoA( GetProcessHeap(), 0, volname); + ret = SetVolumeLabelA( xroot, xvol ); + HeapFree( GetProcessHeap(), 0, xroot ); + HeapFree( GetProcessHeap(), 0, xvol ); + return ret; +} diff --git a/include/winbase.h b/include/winbase.h index 282c2a974a3..eeae4303be5 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1680,6 +1680,9 @@ BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD); #define SetFileAttributes WINELIB_NAME_AW(SetFileAttributes) UINT WINAPI SetHandleCount(UINT); #define SetSwapAreaSize(w) (w) +BOOL WINAPI SetVolumeLabelA(LPCSTR,LPCSTR); +BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR); +#define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel) DWORD WINAPI SizeofResource(HMODULE,HRSRC); #define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle)) DWORD WINAPI VerLanguageNameA(UINT,LPSTR,UINT); diff --git a/relay32/kernel32.spec b/relay32/kernel32.spec index 058fbbfb7ec..b2eb1e21d4d 100644 --- a/relay32/kernel32.spec +++ b/relay32/kernel32.spec @@ -694,7 +694,7 @@ import ntdll.dll 673 stdcall SetTimeZoneInformation(ptr) SetTimeZoneInformation 674 stdcall SetUnhandledExceptionFilter(ptr) SetUnhandledExceptionFilter 675 stdcall SetVolumeLabelA(str str) SetVolumeLabelA -676 stub SetVolumeLabelW +676 stdcall SetVolumeLabelW(wstr wstr) SetVolumeLabelW 677 stdcall SetupComm(long long long) SetupComm 678 stdcall SizeofResource(long long) SizeofResource 679 stdcall Sleep(long) Sleep