From bd6a253c92b91cb8f56463b03d2811f810035428 Mon Sep 17 00:00:00 2001 From: Justin Miller Date: Sun, 8 Sep 2024 01:14:39 -0700 Subject: [PATCH] [KERNELBASE] Volume.c now builds --- dll/win32/KernelBase/wine/CMakeLists.txt | 3 ++- dll/win32/KernelBase/wine/hacks.h | 20 ++++++++++++++++++++ dll/win32/KernelBase/wine/volume.c | 11 ++++++++--- sdk/include/reactos/wine/winioctl.h | 2 +- 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/dll/win32/KernelBase/wine/CMakeLists.txt b/dll/win32/KernelBase/wine/CMakeLists.txt index 9cdf69af987b3..42710bcaecdb7 100644 --- a/dll/win32/KernelBase/wine/CMakeLists.txt +++ b/dll/win32/KernelBase/wine/CMakeLists.txt @@ -3,6 +3,7 @@ add_definitions( -D__WINESRC__ -D_WINE -D__ROS_LONG64__ + -Dwcsnicmp=_wcsnicmp -D_KERNELBASE_) remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502) @@ -13,7 +14,7 @@ include_directories(BEFORE ${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine) list(APPEND SOURCE_STATIC #console.c #looks like ReactOS console.c is nothing like wine. loader.c - ) + volume.c) add_library(kernelbase_static ${SOURCE_STATIC}) target_link_libraries(kernelbase_static ${PSEH_LIB}) diff --git a/dll/win32/KernelBase/wine/hacks.h b/dll/win32/KernelBase/wine/hacks.h index 54b7dedf9ea8d..4e5e79a1eab99 100644 --- a/dll/win32/KernelBase/wine/hacks.h +++ b/dll/win32/KernelBase/wine/hacks.h @@ -7,7 +7,27 @@ #define RESOURCE_ENUM_MUI_SYSTEM 0x0004 #define RESOURCE_ENUM_VALIDATE 0x0008 +//ddk +#define SYMBOLIC_LINK_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1) +//def ndk NTSYSAPI NTSTATUS WINAPI RtlQueryActivationContextApplicationSettings(DWORD,HANDLE,const WCHAR*,const WCHAR*,WCHAR*,SIZE_T,SIZE_T*); NTSYSAPI NTSTATUS WINAPI LdrSetDefaultDllDirectories(ULONG); NTSYSAPI NTSTATUS WINAPI LdrRemoveDllDirectory(void*); + +//rtl types +// +// Constant String Macro +// +#define RTL_CONSTANT_STRING(__SOURCE_STRING__) \ +{ \ + sizeof(__SOURCE_STRING__) - sizeof((__SOURCE_STRING__)[0]), \ + sizeof(__SOURCE_STRING__), \ + (__SOURCE_STRING__) \ +} + +//kernel32 + +BOOL WINAPI GetVolumeInformationByHandleW( HANDLE handle, WCHAR *label, DWORD label_len, + DWORD *serial, DWORD *filename_len, DWORD *flags, + WCHAR *fsname, DWORD fsname_len ); diff --git a/dll/win32/KernelBase/wine/volume.c b/dll/win32/KernelBase/wine/volume.c index d489522852566..3492e027d5ad9 100644 --- a/dll/win32/KernelBase/wine/volume.c +++ b/dll/win32/KernelBase/wine/volume.c @@ -33,10 +33,14 @@ #include "winnls.h" #include "winternl.h" #include "winioctl.h" +#ifdef __REACTOS__ +#include +#else #include "ntddcdrm.h" #define WINE_MOUNTMGR_EXTENSIONS #include "ddk/mountmgr.h" #include "ddk/wdm.h" +#endif #include "kernelbase.h" #include "wine/debug.h" @@ -119,6 +123,7 @@ static BOOL open_device_root( LPCWSTR root, HANDLE *handle ) return set_ntstatus( status ); } +#ifndef __REACTOS__ /* query the type of a drive from the mount manager */ static DWORD get_mountmgr_drive_type( LPCWSTR root ) { @@ -147,7 +152,7 @@ static DWORD get_mountmgr_drive_type( LPCWSTR root ) CloseHandle( mgr ); return data.type; } - +#endif /*********************************************************************** * GetVolumeInformationW (kernelbase.@) @@ -568,7 +573,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetLogicalDriveStringsW( UINT len, LPWSTR buffer ) return count * 4; } - +#ifndef __REACTOS__ /*********************************************************************** * GetDriveTypeW (kernelbase.@) */ @@ -629,7 +634,7 @@ UINT WINAPI DECLSPEC_HOTPATCH GetDriveTypeA( LPCSTR root ) if (root && !(rootW = file_name_AtoW( root, FALSE ))) return DRIVE_NO_ROOT_DIR; return GetDriveTypeW( rootW ); } - +#endif /*********************************************************************** * GetDiskFreeSpaceExW (kernelbase.@) diff --git a/sdk/include/reactos/wine/winioctl.h b/sdk/include/reactos/wine/winioctl.h index 269f771b57ea4..4eac18dbc55cb 100644 --- a/sdk/include/reactos/wine/winioctl.h +++ b/sdk/include/reactos/wine/winioctl.h @@ -433,7 +433,7 @@ typedef struct _FILE_FS_DEVICE_INFORMATION { /* FileFsAttributeInformation = 5 */ typedef struct _FILE_FS_ATTRIBUTE_INFORMATION { - ULONG FileSystemAttribute; + ULONG FileSystemAttributes; LONG MaximumComponentNameLength; ULONG FileSystemNameLength; WCHAR FileSystemName[1];