Author: ion
Date: Thu Jul 21 17:02:48 2011
New Revision: 52761
URL:
http://svn.reactos.org/svn/reactos?rev=52761&view=rev
Log:
[KERNEL32]: Add the #defines only to Winesynched code. Should fix CMAKE build...
[KERNEL32]: Move more Vista APIs out of the way and un-export some functions. Reset the
WINNT_VERSION to 0x502 instead of 0x600, except for synch.c (TBD).
[KERNEL32]: Fix casts and math in GetTickCount and GetTickCount64. GetTickCount64 is
Vista, but Wine-synched DLLs need it, so leave it exported.
Modified:
trunk/reactos/dll/win32/kernel32/CMakeLists.txt
trunk/reactos/dll/win32/kernel32/client/file/console.c
trunk/reactos/dll/win32/kernel32/client/file/create.c
trunk/reactos/dll/win32/kernel32/client/file/file.c
trunk/reactos/dll/win32/kernel32/client/misc/comm.c
trunk/reactos/dll/win32/kernel32/client/misc/lzexpand.c
trunk/reactos/dll/win32/kernel32/client/misc/profile.c
trunk/reactos/dll/win32/kernel32/client/misc/res.c
trunk/reactos/dll/win32/kernel32/client/misc/time.c
trunk/reactos/dll/win32/kernel32/client/synch.c
trunk/reactos/dll/win32/kernel32/client/vista.c
trunk/reactos/dll/win32/kernel32/kernel32.pspec
trunk/reactos/dll/win32/kernel32/kernel32.rbuild
trunk/reactos/dll/win32/kernel32/kernel32.spec
trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
trunk/reactos/dll/win32/kernel32/winnls/string/lang.c
trunk/reactos/dll/win32/kernel32/winnls/string/lcformat.c
Modified: trunk/reactos/dll/win32/kernel32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/CMakeLi…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/CMakeLists.txt [iso-8859-1] Thu Jul 21 17:02:48 2011
@@ -1,12 +1,5 @@
add_definitions(-D_KERNEL32_)
-
-add_definitions(-DHeapAlloc=RtlAllocateHeap)
-add_definitions(-DHeapFree=RtlFreeHeap)
-add_definitions(-DGetProcessHeap=RtlGetProcessHeap)
-
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys)
Modified: trunk/reactos/dll/win32/kernel32/client/file/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/console.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/console.c [iso-8859-1] Thu Jul 21
17:02:48 2011
@@ -4195,145 +4195,4 @@
return Ret;
}
-
-/*--------------------------------------------------------------
- * GetConsoleHistoryInfo
- *
- * @implemented
- */
-BOOL
-WINAPI
-GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
-{
- CSR_API_MESSAGE Request;
- ULONG CsrRequest = MAKE_CSR_API(GET_HISTORY_INFO, CSR_CONSOLE);
- NTSTATUS Status;
- if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- Status = CsrClientCallServer(&Request, NULL, CsrRequest,
sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- SetLastErrorByStatus(Status);
- return FALSE;
- }
- lpConsoleHistoryInfo->HistoryBufferSize =
Request.Data.GetHistoryInfo.HistoryBufferSize;
- lpConsoleHistoryInfo->NumberOfHistoryBuffers =
Request.Data.GetHistoryInfo.NumberOfHistoryBuffers;
- lpConsoleHistoryInfo->dwFlags =
Request.Data.GetHistoryInfo.dwFlags;
- return TRUE;
-}
-
-
-/*--------------------------------------------------------------
- * SetConsoleHistoryInfo
- *
- * @implemented
- */
-BOOL
-WINAPI
-SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
-{
- CSR_API_MESSAGE Request;
- ULONG CsrRequest = MAKE_CSR_API(GET_HISTORY_INFO, CSR_CONSOLE);
- NTSTATUS Status;
- if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
- Request.Data.SetHistoryInfo.HistoryBufferSize =
lpConsoleHistoryInfo->HistoryBufferSize;
- Request.Data.SetHistoryInfo.NumberOfHistoryBuffers =
lpConsoleHistoryInfo->NumberOfHistoryBuffers;
- Request.Data.SetHistoryInfo.dwFlags =
lpConsoleHistoryInfo->dwFlags;
- Status = CsrClientCallServer(&Request, NULL, CsrRequest,
sizeof(CSR_API_MESSAGE));
- if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
- {
- SetLastErrorByStatus(Status);
- return FALSE;
- }
- return TRUE;
-}
-
-
-/*--------------------------------------------------------------
- * GetConsoleOriginalTitleW
- *
- * @unimplemented
- */
-DWORD
-WINAPI
-GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle,
- IN DWORD nSize)
-{
- DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n",
lpConsoleTitle, nSize);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*--------------------------------------------------------------
- * GetConsoleOriginalTitleA
- *
- * @unimplemented
- */
-DWORD
-WINAPI
-GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle,
- IN DWORD nSize)
-{
- DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n",
lpConsoleTitle, nSize);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*--------------------------------------------------------------
- * GetConsoleScreenBufferInfoEx
- *
- * @unimplemented
- */
-BOOL
-WINAPI
-GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
- OUT PCONSOLE_SCREEN_BUFFER_INFOEX
lpConsoleScreenBufferInfoEx)
-{
- DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, lpConsoleScreenBufferInfoEx);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*--------------------------------------------------------------
- * SetConsoleScreenBufferInfoEx
- *
- * @unimplemented
- */
-BOOL
-WINAPI
-SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
- IN PCONSOLE_SCREEN_BUFFER_INFOEX
lpConsoleScreenBufferInfoEx)
-{
- DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, lpConsoleScreenBufferInfoEx);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*--------------------------------------------------------------
- * GetCurrentConsoleFontEx
- *
- * @unimplemented
- */
-BOOL
-WINAPI
-GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput,
- IN BOOL bMaximumWindow,
- OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx)
-{
- DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
/* EOF */
Modified: trunk/reactos/dll/win32/kernel32/client/file/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -371,243 +371,4 @@
return FileHandle;
}
-
-/*
- * @implemented
- */
-BOOLEAN
-WINAPI
-CreateSymbolicLinkW(IN LPCWSTR lpSymlinkFileName,
- IN LPCWSTR lpTargetFileName,
- IN DWORD dwFlags)
-{
- IO_STATUS_BLOCK IoStatusBlock;
- OBJECT_ATTRIBUTES ObjectAttributes;
- HANDLE hSymlink = NULL;
- UNICODE_STRING SymlinkFileName = { 0, 0, NULL };
- UNICODE_STRING TargetFileName = { 0, 0, NULL };
- BOOLEAN bAllocatedTarget = FALSE, bRelativePath = FALSE;
- LPWSTR lpTargetFullFileName = NULL;
- SIZE_T cbPrintName;
- SIZE_T cbReparseData;
- PREPARSE_DATA_BUFFER pReparseData = NULL;
- PBYTE pBufTail;
- NTSTATUS Status;
- ULONG dwCreateOptions;
- DWORD dwErr;
-
- if(!lpSymlinkFileName || !lpTargetFileName || (dwFlags |
SYMBOLIC_LINK_FLAG_DIRECTORY) != SYMBOLIC_LINK_FLAG_DIRECTORY)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- if(dwFlags & SYMBOLIC_LINK_FLAG_DIRECTORY)
- dwCreateOptions = FILE_DIRECTORY_FILE;
- else
- dwCreateOptions = FILE_NON_DIRECTORY_FILE;
-
- switch(RtlDetermineDosPathNameType_U(lpTargetFileName))
- {
- case RtlPathTypeUnknown:
- case RtlPathTypeRooted:
- case RtlPathTypeRelative:
- bRelativePath = TRUE;
- RtlInitUnicodeString(&TargetFileName, lpTargetFileName);
- break;
-
- case RtlPathTypeDriveRelative:
- {
- LPWSTR FilePart;
- SIZE_T cchTargetFullFileName;
-
- cchTargetFullFileName = GetFullPathNameW(lpTargetFileName, 0, NULL,
&FilePart);
-
- if(cchTargetFullFileName == 0)
- {
- dwErr = GetLastError();
- goto Cleanup;
- }
-
- lpTargetFullFileName = RtlAllocateHeap(RtlGetProcessHeap(), 0,
cchTargetFullFileName * sizeof(WCHAR));
-
- if(lpTargetFullFileName == NULL)
- {
- dwErr = ERROR_NOT_ENOUGH_MEMORY;
- goto Cleanup;
- }
-
- if(GetFullPathNameW(lpTargetFileName, cchTargetFullFileName,
lpTargetFullFileName, &FilePart) == 0)
- {
- dwErr = GetLastError();
- goto Cleanup;
- }
- }
-
- lpTargetFileName = lpTargetFullFileName;
-
- // fallthrough
-
- case RtlPathTypeUncAbsolute:
- case RtlPathTypeDriveAbsolute:
- case RtlPathTypeLocalDevice:
- case RtlPathTypeRootLocalDevice:
- default:
- if(!RtlDosPathNameToNtPathName_U(lpTargetFileName, &TargetFileName, NULL,
NULL))
- {
- bAllocatedTarget = TRUE;
- dwErr = ERROR_INVALID_PARAMETER;
- goto Cleanup;
- }
- }
-
- cbPrintName = wcslen(lpTargetFileName) * sizeof(WCHAR);
- cbReparseData = FIELD_OFFSET(REPARSE_DATA_BUFFER,
SymbolicLinkReparseBuffer.PathBuffer) + TargetFileName.Length + cbPrintName;
- pReparseData = RtlAllocateHeap(RtlGetProcessHeap(), 0, cbReparseData);
-
- if(pReparseData == NULL)
- {
- dwErr = ERROR_NOT_ENOUGH_MEMORY;
- goto Cleanup;
- }
-
- pBufTail = (PBYTE)(pReparseData->SymbolicLinkReparseBuffer.PathBuffer);
-
- pReparseData->ReparseTag = (ULONG)IO_REPARSE_TAG_SYMLINK;
- pReparseData->ReparseDataLength = (USHORT)cbReparseData -
REPARSE_DATA_BUFFER_HEADER_SIZE;
- pReparseData->Reserved = 0;
-
- pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset = 0;
- pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength =
TargetFileName.Length;
- pBufTail += pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset;
- RtlCopyMemory(pBufTail, TargetFileName.Buffer, TargetFileName.Length);
-
- pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset =
pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength;
- pReparseData->SymbolicLinkReparseBuffer.PrintNameLength = (USHORT)cbPrintName;
- pBufTail += pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset;
- RtlCopyMemory(pBufTail, lpTargetFileName, cbPrintName);
-
- pReparseData->SymbolicLinkReparseBuffer.Flags = 0;
-
- if(bRelativePath)
- pReparseData->SymbolicLinkReparseBuffer.Flags |= 1; // TODO! give this lone
flag a name
-
- if(!RtlDosPathNameToNtPathName_U(lpSymlinkFileName, &SymlinkFileName, NULL,
NULL))
- {
- dwErr = ERROR_PATH_NOT_FOUND;
- goto Cleanup;
- }
-
- InitializeObjectAttributes(&ObjectAttributes, &SymlinkFileName,
OBJ_CASE_INSENSITIVE, NULL, NULL);
-
- Status = NtCreateFile
- (
- &hSymlink,
- FILE_WRITE_ATTRIBUTES | DELETE | SYNCHRONIZE,
- &ObjectAttributes,
- &IoStatusBlock,
- NULL,
- FILE_ATTRIBUTE_NORMAL,
- 0,
- FILE_CREATE,
- FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_REPARSE_POINT | dwCreateOptions,
- NULL,
- 0
- );
-
- if(!NT_SUCCESS(Status))
- {
- dwErr = RtlNtStatusToDosError(Status);
- goto Cleanup;
- }
-
- Status = NtFsControlFile
- (
- hSymlink,
- NULL,
- NULL,
- NULL,
- &IoStatusBlock,
- FSCTL_SET_REPARSE_POINT,
- pReparseData,
- cbReparseData,
- NULL,
- 0
- );
-
- if(!NT_SUCCESS(Status))
- {
- FILE_DISPOSITION_INFORMATION DispInfo;
- DispInfo.DeleteFile = TRUE;
- NtSetInformationFile(hSymlink, &IoStatusBlock, &DispInfo,
sizeof(DispInfo), FileDispositionInformation);
-
- dwErr = RtlNtStatusToDosError(Status);
- goto Cleanup;
- }
-
- dwErr = NO_ERROR;
-
-Cleanup:
- if(hSymlink)
- NtClose(hSymlink);
-
- RtlFreeUnicodeString(&SymlinkFileName);
- if (bAllocatedTarget)
- {
- RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- TargetFileName.Buffer);
- }
-
- if(lpTargetFullFileName)
- RtlFreeHeap(RtlGetProcessHeap(), 0, lpTargetFullFileName);
-
- if(pReparseData)
- RtlFreeHeap(RtlGetProcessHeap(), 0, pReparseData);
-
- if(dwErr)
- {
- SetLastError(dwErr);
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * @implemented
- */
-BOOLEAN
-NTAPI
-CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName,
- IN LPCSTR lpTargetFileName,
- IN DWORD dwFlags)
-{
- PWCHAR SymlinkW, TargetW;
- BOOLEAN Ret;
-
- if(!lpSymlinkFileName || !lpTargetFileName)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- if (!(SymlinkW = FilenameA2W(lpSymlinkFileName, FALSE)))
- return FALSE;
-
- if (!(TargetW = FilenameA2W(lpTargetFileName, TRUE)))
- return FALSE;
-
- Ret = CreateSymbolicLinkW(SymlinkW,
- TargetW,
- dwFlags);
-
- RtlFreeHeap(RtlGetProcessHeap(), 0, SymlinkW);
- RtlFreeHeap(RtlGetProcessHeap(), 0, TargetW);
-
- return Ret;
-}
-
-
/* EOF */
Modified: trunk/reactos/dll/win32/kernel32/client/file/file.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/file.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/file.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -1816,166 +1816,6 @@
return TRUE;
}
-
-/*
- * @implemented
- */
-DWORD
-WINAPI
-GetFinalPathNameByHandleA(IN HANDLE hFile,
- OUT LPSTR lpszFilePath,
- IN DWORD cchFilePath,
- IN DWORD dwFlags)
-{
- WCHAR FilePathW[MAX_PATH];
- UNICODE_STRING FilePathU;
- DWORD PrevLastError;
- DWORD Ret = 0;
-
- if (cchFilePath != 0 &&
- cchFilePath > sizeof(FilePathW) / sizeof(FilePathW[0]))
- {
- FilePathU.Length = 0;
- FilePathU.MaximumLength = (USHORT)cchFilePath * sizeof(WCHAR);
- FilePathU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
- 0,
- FilePathU.MaximumLength);
- if (FilePathU.Buffer == NULL)
- {
- SetLastError(ERROR_NOT_ENOUGH_MEMORY);
- return 0;
- }
- }
- else
- {
- FilePathU.Length = 0;
- FilePathU.MaximumLength = sizeof(FilePathW);
- FilePathU.Buffer = FilePathW;
- }
-
- /* save the last error code */
- PrevLastError = GetLastError();
- SetLastError(ERROR_SUCCESS);
-
- /* call the unicode version that does all the work */
- Ret = GetFinalPathNameByHandleW(hFile,
- FilePathU.Buffer,
- cchFilePath,
- dwFlags);
-
- if (GetLastError() == ERROR_SUCCESS)
- {
- /* no error, restore the last error code and convert the string */
- SetLastError(PrevLastError);
-
- Ret = FilenameU2A_FitOrFail(lpszFilePath,
- cchFilePath,
- &FilePathU);
- }
-
- /* free allocated memory if necessary */
- if (FilePathU.Buffer != FilePathW)
- {
- RtlFreeHeap(RtlGetProcessHeap(),
- 0,
- FilePathU.Buffer);
- }
-
- return Ret;
-}
-
-
-/*
- * @unimplemented
- */
-DWORD
-WINAPI
-GetFinalPathNameByHandleW(IN HANDLE hFile,
- OUT LPWSTR lpszFilePath,
- IN DWORD cchFilePath,
- IN DWORD dwFlags)
-{
- if (dwFlags & ~(VOLUME_NAME_DOS | VOLUME_NAME_GUID | VOLUME_NAME_NT |
- VOLUME_NAME_NONE | FILE_NAME_NORMALIZED | FILE_NAME_OPENED))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
-
- UNIMPLEMENTED;
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetFileBandwidthReservation(IN HANDLE hFile,
- IN DWORD nPeriodMilliseconds,
- IN DWORD nBytesPerPeriod,
- IN BOOL bDiscardable,
- OUT LPDWORD lpTransferSize,
- OUT LPDWORD lpNumOutstandingRequests)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-GetFileBandwidthReservation(IN HANDLE hFile,
- OUT LPDWORD lpPeriodMilliseconds,
- OUT LPDWORD lpBytesPerPeriod,
- OUT LPBOOL pDiscardable,
- OUT LPDWORD lpTransferSize,
- OUT LPDWORD lpNumOutstandingRequests)
-{
- UNIMPLEMENTED;
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-WINAPI
-SetFileCompletionNotificationModes(IN HANDLE FileHandle,
- IN UCHAR Flags)
-{
- if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS |
FILE_SKIP_SET_EVENT_ON_HANDLE))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- UNIMPLEMENTED;
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-HANDLE
-WINAPI
-OpenFileById(IN HANDLE hFile,
- IN LPFILE_ID_DESCRIPTOR lpFileID,
- IN DWORD dwDesiredAccess,
- IN DWORD dwShareMode,
- IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
- IN DWORD dwFlags)
-{
- UNIMPLEMENTED;
- return INVALID_HANDLE_VALUE;
-}
-
/*
* @implemented
*/
Modified: trunk/reactos/dll/win32/kernel32/client/misc/comm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/misc/comm.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/misc/comm.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -59,6 +59,9 @@
#include "wine/debug.h"
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(comm);
/***********************************************************************
Modified: trunk/reactos/dll/win32/kernel32/client/misc/lzexpand.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/misc/lzexpand.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/misc/lzexpand.c [iso-8859-1] Thu Jul 21
17:02:48 2011
@@ -52,6 +52,10 @@
#include "wine/unicode.h"
#include "wine/debug.h"
+#include "winternl.h"
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(file);
/* The readahead length of the decompressor. Reading single bytes
Modified: trunk/reactos/dll/win32/kernel32/client/misc/profile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/misc/profile.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/misc/profile.c [iso-8859-1] Thu Jul 21
17:02:48 2011
@@ -34,6 +34,9 @@
#include "wine/library.h"
#include "wine/debug.h"
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(profile);
static const char bom_utf8[] = {0xEF,0xBB,0xBF};
Modified: trunk/reactos/dll/win32/kernel32/client/misc/res.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/misc/res.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/misc/res.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -37,6 +37,9 @@
#include "wine/unicode.h"
#include "wine/list.h"
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(resource);
/* we don't want to include winuser.h just for this */
Modified: trunk/reactos/dll/win32/kernel32/client/misc/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/misc/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/misc/time.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -602,39 +602,23 @@
WINAPI
GetTickCount(VOID)
{
- /* Call the 64-bit version */
- return (DWORD)GetTickCount64();
-}
-
-
-/*
- * @implemented
- */
-ULONGLONG
-WINAPI
-GetTickCount64(VOID)
-{
- ULONG Multiplier;
- LARGE_INTEGER TickCount;
-
- /* Loop until we get a perfect match */
- for (;;)
- {
- /* Read the tick count value */
- TickCount.HighPart = SharedUserData->TickCount.High1Time;
+ ULARGE_INTEGER TickCount;
+
+ while (TRUE)
+ {
+ TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
TickCount.LowPart = SharedUserData->TickCount.LowPart;
- if (TickCount.HighPart == SharedUserData->TickCount.High2Time) break;
+
+ if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time)
+ break;
+
YieldProcessor();
}
- /* Get the multiplier */
- Multiplier = SharedUserData->TickCountMultiplier;
-
- /* Convert to milliseconds and return */
- return (Int64ShrlMod32(UInt32x32To64(Multiplier, TickCount.LowPart), 24) +
- (Multiplier * (TickCount.HighPart << 8)));
-}
-
+ return (ULONG)((UInt32x32To64(TickCount.LowPart,
SharedUserData->TickCountMultiplier) >> 24) +
+ UInt32x32To64((TickCount.HighPart << 8) & 0xFFFFFFFF,
SharedUserData->TickCountMultiplier));
+
+}
/*
* @implemented
Modified: trunk/reactos/dll/win32/kernel32/client/synch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/synch.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/synch.c [iso-8859-1] Thu Jul 21 17:02:48 2011
@@ -7,7 +7,8 @@
*/
/* INCLUDES *****************************************************************/
-
+#undef _WIN32_WINNT
+#define _WIN32_WINNT 0x600
#include <k32.h>
#define NDEBUG
Modified: trunk/reactos/dll/win32/kernel32/client/vista.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] Thu Jul 21 17:02:48 2011
@@ -8,6 +8,8 @@
#define NDEBUG
#include <debug.h>
+
+#if _WIN32_WINNT >= 0x600
/* FIXME: Move these RTL declarations to the NDK */
NTSTATUS
@@ -307,3 +309,563 @@
return E_FAIL;
}
+/*
+ * @implemented
+ */
+ULONGLONG
+WINAPI
+GetTickCount64(VOID)
+{
+ ULARGE_INTEGER TickCount;
+
+ while (TRUE)
+ {
+ TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
+ TickCount.LowPart = SharedUserData->TickCount.LowPart;
+
+ if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time) break;
+
+ YieldProcessor();
+ }
+
+ return (UInt32x32To64(TickCount.LowPart, SharedUserData->TickCountMultiplier)
>> 24) +
+ (UInt32x32To64(TickCount.HighPart, SharedUserData->TickCountMultiplier)
<< 8);
+}
+
+/*--------------------------------------------------------------
+ * GetConsoleHistoryInfo
+ *
+ * @implemented
+ */
+BOOL
+WINAPI
+GetConsoleHistoryInfo(PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
+{
+ CSR_API_MESSAGE Request;
+ ULONG CsrRequest = MAKE_CSR_API(GET_HISTORY_INFO, CSR_CONSOLE);
+ NTSTATUS Status;
+ if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ Status = CsrClientCallServer(&Request, NULL, CsrRequest,
sizeof(CSR_API_MESSAGE));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ {
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+ lpConsoleHistoryInfo->HistoryBufferSize =
Request.Data.GetHistoryInfo.HistoryBufferSize;
+ lpConsoleHistoryInfo->NumberOfHistoryBuffers =
Request.Data.GetHistoryInfo.NumberOfHistoryBuffers;
+ lpConsoleHistoryInfo->dwFlags =
Request.Data.GetHistoryInfo.dwFlags;
+ return TRUE;
+}
+
+
+/*--------------------------------------------------------------
+ * SetConsoleHistoryInfo
+ *
+ * @implemented
+ */
+BOOL
+WINAPI
+SetConsoleHistoryInfo(IN PCONSOLE_HISTORY_INFO lpConsoleHistoryInfo)
+{
+ CSR_API_MESSAGE Request;
+ ULONG CsrRequest = MAKE_CSR_API(GET_HISTORY_INFO, CSR_CONSOLE);
+ NTSTATUS Status;
+ if (lpConsoleHistoryInfo->cbSize != sizeof(CONSOLE_HISTORY_INFO))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+ Request.Data.SetHistoryInfo.HistoryBufferSize =
lpConsoleHistoryInfo->HistoryBufferSize;
+ Request.Data.SetHistoryInfo.NumberOfHistoryBuffers =
lpConsoleHistoryInfo->NumberOfHistoryBuffers;
+ Request.Data.SetHistoryInfo.dwFlags =
lpConsoleHistoryInfo->dwFlags;
+ Status = CsrClientCallServer(&Request, NULL, CsrRequest,
sizeof(CSR_API_MESSAGE));
+ if (!NT_SUCCESS(Status) || !NT_SUCCESS(Status = Request.Status))
+ {
+ SetLastErrorByStatus(Status);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/*--------------------------------------------------------------
+ * GetConsoleOriginalTitleW
+ *
+ * @unimplemented
+ */
+DWORD
+WINAPI
+GetConsoleOriginalTitleW(OUT LPWSTR lpConsoleTitle,
+ IN DWORD nSize)
+{
+ DPRINT1("GetConsoleOriginalTitleW(0x%p, 0x%x) UNIMPLEMENTED!\n",
lpConsoleTitle, nSize);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return 0;
+}
+
+
+/*--------------------------------------------------------------
+ * GetConsoleOriginalTitleA
+ *
+ * @unimplemented
+ */
+DWORD
+WINAPI
+GetConsoleOriginalTitleA(OUT LPSTR lpConsoleTitle,
+ IN DWORD nSize)
+{
+ DPRINT1("GetConsoleOriginalTitleA(0x%p, 0x%x) UNIMPLEMENTED!\n",
lpConsoleTitle, nSize);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return 0;
+}
+
+
+/*--------------------------------------------------------------
+ * GetConsoleScreenBufferInfoEx
+ *
+ * @unimplemented
+ */
+BOOL
+WINAPI
+GetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
+ OUT PCONSOLE_SCREEN_BUFFER_INFOEX
lpConsoleScreenBufferInfoEx)
+{
+ DPRINT1("GetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, lpConsoleScreenBufferInfoEx);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+
+/*--------------------------------------------------------------
+ * SetConsoleScreenBufferInfoEx
+ *
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetConsoleScreenBufferInfoEx(IN HANDLE hConsoleOutput,
+ IN PCONSOLE_SCREEN_BUFFER_INFOEX
lpConsoleScreenBufferInfoEx)
+{
+ DPRINT1("SetConsoleScreenBufferInfoEx(0x%p, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, lpConsoleScreenBufferInfoEx);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+
+/*--------------------------------------------------------------
+ * GetCurrentConsoleFontEx
+ *
+ * @unimplemented
+ */
+BOOL
+WINAPI
+GetCurrentConsoleFontEx(IN HANDLE hConsoleOutput,
+ IN BOOL bMaximumWindow,
+ OUT PCONSOLE_FONT_INFOEX lpConsoleCurrentFontEx)
+{
+ DPRINT1("GetCurrentConsoleFontEx(0x%p, 0x%x, 0x%p) UNIMPLEMENTED!\n",
hConsoleOutput, bMaximumWindow, lpConsoleCurrentFontEx);
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return FALSE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOLEAN
+WINAPI
+CreateSymbolicLinkW(IN LPCWSTR lpSymlinkFileName,
+ IN LPCWSTR lpTargetFileName,
+ IN DWORD dwFlags)
+{
+ IO_STATUS_BLOCK IoStatusBlock;
+ OBJECT_ATTRIBUTES ObjectAttributes;
+ HANDLE hSymlink = NULL;
+ UNICODE_STRING SymlinkFileName = { 0, 0, NULL };
+ UNICODE_STRING TargetFileName = { 0, 0, NULL };
+ BOOLEAN bAllocatedTarget = FALSE, bRelativePath = FALSE;
+ LPWSTR lpTargetFullFileName = NULL;
+ SIZE_T cbPrintName;
+ SIZE_T cbReparseData;
+ PREPARSE_DATA_BUFFER pReparseData = NULL;
+ PBYTE pBufTail;
+ NTSTATUS Status;
+ ULONG dwCreateOptions;
+ DWORD dwErr;
+
+ if(!lpSymlinkFileName || !lpTargetFileName || (dwFlags |
SYMBOLIC_LINK_FLAG_DIRECTORY) != SYMBOLIC_LINK_FLAG_DIRECTORY)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if(dwFlags & SYMBOLIC_LINK_FLAG_DIRECTORY)
+ dwCreateOptions = FILE_DIRECTORY_FILE;
+ else
+ dwCreateOptions = FILE_NON_DIRECTORY_FILE;
+
+ switch(RtlDetermineDosPathNameType_U(lpTargetFileName))
+ {
+ case RtlPathTypeUnknown:
+ case RtlPathTypeRooted:
+ case RtlPathTypeRelative:
+ bRelativePath = TRUE;
+ RtlInitUnicodeString(&TargetFileName, lpTargetFileName);
+ break;
+
+ case RtlPathTypeDriveRelative:
+ {
+ LPWSTR FilePart;
+ SIZE_T cchTargetFullFileName;
+
+ cchTargetFullFileName = GetFullPathNameW(lpTargetFileName, 0, NULL,
&FilePart);
+
+ if(cchTargetFullFileName == 0)
+ {
+ dwErr = GetLastError();
+ goto Cleanup;
+ }
+
+ lpTargetFullFileName = RtlAllocateHeap(RtlGetProcessHeap(), 0,
cchTargetFullFileName * sizeof(WCHAR));
+
+ if(lpTargetFullFileName == NULL)
+ {
+ dwErr = ERROR_NOT_ENOUGH_MEMORY;
+ goto Cleanup;
+ }
+
+ if(GetFullPathNameW(lpTargetFileName, cchTargetFullFileName,
lpTargetFullFileName, &FilePart) == 0)
+ {
+ dwErr = GetLastError();
+ goto Cleanup;
+ }
+ }
+
+ lpTargetFileName = lpTargetFullFileName;
+
+ // fallthrough
+
+ case RtlPathTypeUncAbsolute:
+ case RtlPathTypeDriveAbsolute:
+ case RtlPathTypeLocalDevice:
+ case RtlPathTypeRootLocalDevice:
+ default:
+ if(!RtlDosPathNameToNtPathName_U(lpTargetFileName, &TargetFileName, NULL,
NULL))
+ {
+ bAllocatedTarget = TRUE;
+ dwErr = ERROR_INVALID_PARAMETER;
+ goto Cleanup;
+ }
+ }
+
+ cbPrintName = wcslen(lpTargetFileName) * sizeof(WCHAR);
+ cbReparseData = FIELD_OFFSET(REPARSE_DATA_BUFFER,
SymbolicLinkReparseBuffer.PathBuffer) + TargetFileName.Length + cbPrintName;
+ pReparseData = RtlAllocateHeap(RtlGetProcessHeap(), 0, cbReparseData);
+
+ if(pReparseData == NULL)
+ {
+ dwErr = ERROR_NOT_ENOUGH_MEMORY;
+ goto Cleanup;
+ }
+
+ pBufTail = (PBYTE)(pReparseData->SymbolicLinkReparseBuffer.PathBuffer);
+
+ pReparseData->ReparseTag = (ULONG)IO_REPARSE_TAG_SYMLINK;
+ pReparseData->ReparseDataLength = (USHORT)cbReparseData -
REPARSE_DATA_BUFFER_HEADER_SIZE;
+ pReparseData->Reserved = 0;
+
+ pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset = 0;
+ pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength =
TargetFileName.Length;
+ pBufTail += pReparseData->SymbolicLinkReparseBuffer.SubstituteNameOffset;
+ RtlCopyMemory(pBufTail, TargetFileName.Buffer, TargetFileName.Length);
+
+ pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset =
pReparseData->SymbolicLinkReparseBuffer.SubstituteNameLength;
+ pReparseData->SymbolicLinkReparseBuffer.PrintNameLength = (USHORT)cbPrintName;
+ pBufTail += pReparseData->SymbolicLinkReparseBuffer.PrintNameOffset;
+ RtlCopyMemory(pBufTail, lpTargetFileName, cbPrintName);
+
+ pReparseData->SymbolicLinkReparseBuffer.Flags = 0;
+
+ if(bRelativePath)
+ pReparseData->SymbolicLinkReparseBuffer.Flags |= 1; // TODO! give this lone
flag a name
+
+ if(!RtlDosPathNameToNtPathName_U(lpSymlinkFileName, &SymlinkFileName, NULL,
NULL))
+ {
+ dwErr = ERROR_PATH_NOT_FOUND;
+ goto Cleanup;
+ }
+
+ InitializeObjectAttributes(&ObjectAttributes, &SymlinkFileName,
OBJ_CASE_INSENSITIVE, NULL, NULL);
+
+ Status = NtCreateFile
+ (
+ &hSymlink,
+ FILE_WRITE_ATTRIBUTES | DELETE | SYNCHRONIZE,
+ &ObjectAttributes,
+ &IoStatusBlock,
+ NULL,
+ FILE_ATTRIBUTE_NORMAL,
+ 0,
+ FILE_CREATE,
+ FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_REPARSE_POINT | dwCreateOptions,
+ NULL,
+ 0
+ );
+
+ if(!NT_SUCCESS(Status))
+ {
+ dwErr = RtlNtStatusToDosError(Status);
+ goto Cleanup;
+ }
+
+ Status = NtFsControlFile
+ (
+ hSymlink,
+ NULL,
+ NULL,
+ NULL,
+ &IoStatusBlock,
+ FSCTL_SET_REPARSE_POINT,
+ pReparseData,
+ cbReparseData,
+ NULL,
+ 0
+ );
+
+ if(!NT_SUCCESS(Status))
+ {
+ FILE_DISPOSITION_INFORMATION DispInfo;
+ DispInfo.DeleteFile = TRUE;
+ NtSetInformationFile(hSymlink, &IoStatusBlock, &DispInfo,
sizeof(DispInfo), FileDispositionInformation);
+
+ dwErr = RtlNtStatusToDosError(Status);
+ goto Cleanup;
+ }
+
+ dwErr = NO_ERROR;
+
+Cleanup:
+ if(hSymlink)
+ NtClose(hSymlink);
+
+ RtlFreeUnicodeString(&SymlinkFileName);
+ if (bAllocatedTarget)
+ {
+ RtlFreeHeap(RtlGetProcessHeap(),
+ 0,
+ TargetFileName.Buffer);
+ }
+
+ if(lpTargetFullFileName)
+ RtlFreeHeap(RtlGetProcessHeap(), 0, lpTargetFullFileName);
+
+ if(pReparseData)
+ RtlFreeHeap(RtlGetProcessHeap(), 0, pReparseData);
+
+ if(dwErr)
+ {
+ SetLastError(dwErr);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/*
+ * @implemented
+ */
+BOOLEAN
+NTAPI
+CreateSymbolicLinkA(IN LPCSTR lpSymlinkFileName,
+ IN LPCSTR lpTargetFileName,
+ IN DWORD dwFlags)
+{
+ PWCHAR SymlinkW, TargetW;
+ BOOLEAN Ret;
+
+ if(!lpSymlinkFileName || !lpTargetFileName)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if (!(SymlinkW = FilenameA2W(lpSymlinkFileName, FALSE)))
+ return FALSE;
+
+ if (!(TargetW = FilenameA2W(lpTargetFileName, TRUE)))
+ return FALSE;
+
+ Ret = CreateSymbolicLinkW(SymlinkW,
+ TargetW,
+ dwFlags);
+
+ RtlFreeHeap(RtlGetProcessHeap(), 0, SymlinkW);
+ RtlFreeHeap(RtlGetProcessHeap(), 0, TargetW);
+
+ return Ret;
+}
+
+/*
+ * @unimplemented
+ */
+DWORD
+WINAPI
+GetFinalPathNameByHandleW(IN HANDLE hFile,
+ OUT LPWSTR lpszFilePath,
+ IN DWORD cchFilePath,
+ IN DWORD dwFlags)
+{
+ if (dwFlags & ~(VOLUME_NAME_DOS | VOLUME_NAME_GUID | VOLUME_NAME_NT |
+ VOLUME_NAME_NONE | FILE_NAME_NORMALIZED | FILE_NAME_OPENED))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ UNIMPLEMENTED;
+ return 0;
+}
+
+/*
+ * @implemented
+ */
+DWORD
+WINAPI
+GetFinalPathNameByHandleA(IN HANDLE hFile,
+ OUT LPSTR lpszFilePath,
+ IN DWORD cchFilePath,
+ IN DWORD dwFlags)
+{
+ WCHAR FilePathW[MAX_PATH];
+ UNICODE_STRING FilePathU;
+ DWORD PrevLastError;
+ DWORD Ret = 0;
+
+ if (cchFilePath != 0 &&
+ cchFilePath > sizeof(FilePathW) / sizeof(FilePathW[0]))
+ {
+ FilePathU.Length = 0;
+ FilePathU.MaximumLength = (USHORT)cchFilePath * sizeof(WCHAR);
+ FilePathU.Buffer = RtlAllocateHeap(RtlGetProcessHeap(),
+ 0,
+ FilePathU.MaximumLength);
+ if (FilePathU.Buffer == NULL)
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
+ }
+ else
+ {
+ FilePathU.Length = 0;
+ FilePathU.MaximumLength = sizeof(FilePathW);
+ FilePathU.Buffer = FilePathW;
+ }
+
+ /* save the last error code */
+ PrevLastError = GetLastError();
+ SetLastError(ERROR_SUCCESS);
+
+ /* call the unicode version that does all the work */
+ Ret = GetFinalPathNameByHandleW(hFile,
+ FilePathU.Buffer,
+ cchFilePath,
+ dwFlags);
+
+ if (GetLastError() == ERROR_SUCCESS)
+ {
+ /* no error, restore the last error code and convert the string */
+ SetLastError(PrevLastError);
+
+ Ret = FilenameU2A_FitOrFail(lpszFilePath,
+ cchFilePath,
+ &FilePathU);
+ }
+
+ /* free allocated memory if necessary */
+ if (FilePathU.Buffer != FilePathW)
+ {
+ RtlFreeHeap(RtlGetProcessHeap(),
+ 0,
+ FilePathU.Buffer);
+ }
+
+ return Ret;
+}
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetFileBandwidthReservation(IN HANDLE hFile,
+ IN DWORD nPeriodMilliseconds,
+ IN DWORD nBytesPerPeriod,
+ IN BOOL bDiscardable,
+ OUT LPDWORD lpTransferSize,
+ OUT LPDWORD lpNumOutstandingRequests)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+GetFileBandwidthReservation(IN HANDLE hFile,
+ OUT LPDWORD lpPeriodMilliseconds,
+ OUT LPDWORD lpBytesPerPeriod,
+ OUT LPBOOL pDiscardable,
+ OUT LPDWORD lpTransferSize,
+ OUT LPDWORD lpNumOutstandingRequests)
+{
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+BOOL
+WINAPI
+SetFileCompletionNotificationModes(IN HANDLE FileHandle,
+ IN UCHAR Flags)
+{
+ if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS |
FILE_SKIP_SET_EVENT_ON_HANDLE))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ UNIMPLEMENTED;
+ return FALSE;
+}
+
+
+/*
+ * @unimplemented
+ */
+HANDLE
+WINAPI
+OpenFileById(IN HANDLE hFile,
+ IN LPFILE_ID_DESCRIPTOR lpFileID,
+ IN DWORD dwDesiredAccess,
+ IN DWORD dwShareMode,
+ IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL,
+ IN DWORD dwFlags)
+{
+ UNIMPLEMENTED;
+ return INVALID_HANDLE_VALUE;
+}
+
+#endif
+
Modified: trunk/reactos/dll/win32/kernel32/kernel32.pspec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.pspec [iso-8859-1] Thu Jul 21 17:02:48 2011
@@ -186,10 +186,8 @@
@ stdcall CreateSemaphoreExW(ptr long long wstr long long)
@ stdcall CreateSemaphoreW(ptr long long wstr)
@ stdcall CreateSocketHandle()
-@ stdcall CreateSymbolicLinkA(str str long)
;@ stdcall CreateSymbolicLinkTransactedA ; Win 7
;@ stdcall CreateSymbolicLinkTransactedW ; Win 7
-@ stdcall CreateSymbolicLinkW(wstr wstr long)
@ stdcall CreateTapePartition(long long long long)
@ stdcall CreateThread(ptr long ptr long long ptr)
;@ stdcall CreateThreadpool ; Win 7
@@ -441,7 +439,6 @@
@ stdcall GetConsoleFontInfo(long long long ptr)
@ stdcall GetConsoleFontSize(long long)
@ stdcall GetConsoleHardwareState(long long ptr)
-@ stdcall GetConsoleHistoryInfo(ptr)
@ stdcall GetConsoleInputExeNameA(long ptr)
@ stdcall GetConsoleInputExeNameW(long ptr)
@ stdcall GetConsoleInputWaitHandle()
@@ -514,7 +511,6 @@
;@ stdcall GetFileAttributesTransactedA ; Win 7
;@ stdcall GetFileAttributesTransactedW ; Win 7
@ stdcall GetFileAttributesW(wstr)
-@ stdcall GetFileBandwidthReservation(long ptr ptr ptr ptr ptr)
@ stdcall GetFileInformationByHandle(long ptr)
;@ stdcall GetFileInformationByHandleEx ; Win 7
;@ stdcall GetFileMUIInfo ; Win 7
@@ -523,8 +519,6 @@
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFileType(long)
-@ stdcall GetFinalPathNameByHandleA(long str long long)
-@ stdcall GetFinalPathNameByHandleW(long wstr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
@@ -693,7 +687,7 @@
@ stdcall GetThreadTimes(long ptr ptr ptr ptr)
;@ stdcall GetThreadUILanguage ; Win 7
@ stdcall GetTickCount()
-@ stdcall -ret64 GetTickCount64()
+@ stdcall GetTickCount64() ; FOR WINE
@ stdcall GetTimeFormatA(long long ptr str ptr long)
;@ stdcall GetTimeFormatEx ; Win 7
@ stdcall GetTimeFormatW(long long ptr wstr ptr long)
@@ -1144,7 +1138,6 @@
@ stdcall SetConsoleDisplayMode(long long ptr)
@ stdcall SetConsoleFont(long long)
@ stdcall SetConsoleHardwareState(long long long)
-@ stdcall SetConsoleHistoryInfo(ptr)
@ stdcall SetConsoleIcon(ptr)
@ stdcall SetConsoleInputExeNameA(ptr)
@ stdcall SetConsoleInputExeNameW(ptr)
Modified: trunk/reactos/dll/win32/kernel32/kernel32.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.rbuild [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -10,7 +10,6 @@
<library>wine</library>
<library>ntdll</library>
<define name="_KERNEL32_" />
- <redefine name="_WIN32_WINNT">0x0600</redefine>
<dependency>errcodes</dependency>
<pch>k32.h</pch>
<directory name="client">
Modified: trunk/reactos/dll/win32/kernel32/kernel32.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/kernel3…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/kernel32.spec [iso-8859-1] Thu Jul 21 17:02:48 2011
@@ -184,10 +184,8 @@
@ stdcall CreateSemaphoreExW(ptr long long wstr long long)
@ stdcall CreateSemaphoreW(ptr long long wstr)
@ stdcall CreateSocketHandle()
-@ stdcall CreateSymbolicLinkA(str str long)
;@ stdcall CreateSymbolicLinkTransactedA ; Win 7
;@ stdcall CreateSymbolicLinkTransactedW ; Win 7
-@ stdcall CreateSymbolicLinkW(wstr wstr long)
@ stdcall CreateTapePartition(long long long long)
@ stdcall CreateThread(ptr long ptr long long ptr)
;@ stdcall CreateThreadpool ; Win 7
@@ -439,7 +437,6 @@
@ stdcall GetConsoleFontInfo(long long long ptr)
@ stdcall GetConsoleFontSize(long long)
@ stdcall GetConsoleHardwareState(long long ptr)
-@ stdcall GetConsoleHistoryInfo(ptr)
@ stdcall GetConsoleInputExeNameA(long ptr)
@ stdcall GetConsoleInputExeNameW(long ptr)
@ stdcall GetConsoleInputWaitHandle()
@@ -512,7 +509,6 @@
;@ stdcall GetFileAttributesTransactedA ; Win 7
;@ stdcall GetFileAttributesTransactedW ; Win 7
@ stdcall GetFileAttributesW(wstr)
-@ stdcall GetFileBandwidthReservation(long ptr ptr ptr ptr ptr)
@ stdcall GetFileInformationByHandle(long ptr)
;@ stdcall GetFileInformationByHandleEx ; Win 7
;@ stdcall GetFileMUIInfo ; Win 7
@@ -521,8 +517,6 @@
@ stdcall GetFileSizeEx(long ptr)
@ stdcall GetFileTime(long ptr ptr ptr)
@ stdcall GetFileType(long)
-@ stdcall GetFinalPathNameByHandleA(long str long long)
-@ stdcall GetFinalPathNameByHandleW(long wstr long long)
@ stdcall GetFirmwareEnvironmentVariableA(str str ptr long)
@ stdcall GetFirmwareEnvironmentVariableW(wstr wstr ptr long)
@ stdcall GetFullPathNameA(str long ptr ptr)
@@ -691,7 +685,7 @@
@ stdcall GetThreadTimes(long ptr ptr ptr ptr)
;@ stdcall GetThreadUILanguage ; Win 7
@ stdcall GetTickCount()
-@ stdcall -ret64 GetTickCount64()
+@ stdcall GetTickCount64() ; FOR WINE
@ stdcall GetTimeFormatA(long long ptr str ptr long)
;@ stdcall GetTimeFormatEx ; Win 7
@ stdcall GetTimeFormatW(long long ptr wstr ptr long)
@@ -1142,7 +1136,6 @@
@ stdcall SetConsoleDisplayMode(long long ptr)
@ stdcall SetConsoleFont(long long)
@ stdcall SetConsoleHardwareState(long long long)
-@ stdcall SetConsoleHistoryInfo(ptr)
@ stdcall SetConsoleIcon(ptr)
@ stdcall SetConsoleInputExeNameA(ptr)
@ stdcall SetConsoleInputExeNameW(ptr)
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/format_msg.c [iso-8859-1] Thu Jul 21
17:02:48 2011
@@ -36,6 +36,9 @@
extern HMODULE kernel32_handle;
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(resource);
struct format_args
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/lang.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] Thu Jul 21 17:02:48
2011
@@ -55,6 +55,9 @@
return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)];
}
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(nls);
extern HMODULE kernel32_handle;
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/lcformat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/lcformat.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/lcformat.c [iso-8859-1] Thu Jul 21
17:02:48 2011
@@ -39,6 +39,10 @@
#define CRITICAL_SECTION RTL_CRITICAL_SECTION
#define CRITICAL_SECTION_DEBUG RTL_CRITICAL_SECTION_DEBUG
#define CALINFO_MAX_YEAR 2029
+
+#define HeapAlloc RtlAllocateHeap
+#define HeapReAlloc RtlReAllocateHeap
+#define HeapFree RtlFreeHeap
WINE_DEFAULT_DEBUG_CHANNEL(nls);