- Compile kernel32 using w32api.

- Fixed some packing issues in DDK headers (more to come).

svn path=/trunk/; revision=9664
This commit is contained in:
Filip Navara 2004-06-13 20:04:56 +00:00
parent 3aa5dd5be2
commit 6435dec245
29 changed files with 338 additions and 383 deletions

View file

@ -72,9 +72,8 @@ typedef struct _KUSER_SHARED_DATA
#endif #endif
#define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA) #define SharedUserData ((KUSER_SHARED_DATA * const)KI_USER_SHARED_DATA)
#else #else
#ifndef __USE_W32API #undef SharedUserData
#define SharedUserData ((KUSER_SHARED_DATA * const)USER_SHARED_DATA) #define SharedUserData ((KUSER_SHARED_DATA * const)USER_SHARED_DATA)
#endif /* !__USE_W32API */
#endif #endif

View file

@ -1,4 +1,4 @@
/* $Id: except.c,v 1.13 2004/05/29 11:51:33 navaraf Exp $ /* $Id: except.c,v 1.14 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -12,18 +12,9 @@
#include <k32.h> #include <k32.h>
typedef LONG (STDCALL *LPTOP_LEVEL_EXCEPTION_FILTER)(
struct _EXCEPTION_POINTERS *ExceptionInfo
);
UINT GlobalErrMode; UINT GlobalErrMode;
LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter; LPTOP_LEVEL_EXCEPTION_FILTER GlobalTopLevelExceptionFilter;
UINT GetErrorMode(void);
UINT GetErrorMode(void) UINT GetErrorMode(void)
{ {
return GlobalErrMode; return GlobalErrMode;

View file

@ -1,4 +1,4 @@
/* $Id: iocompl.c,v 1.13 2004/01/23 16:37:11 ekohl Exp $ /* $Id: iocompl.c,v 1.14 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -57,8 +57,13 @@ CreateIoCompletionPort(
if ( FileHandle != INVALID_HANDLE_VALUE ) if ( FileHandle != INVALID_HANDLE_VALUE )
{ {
#ifdef __USE_W32API
CompletionInformation.Port = CompletionPort;
CompletionInformation.Key = CompletionKey;
#else
CompletionInformation.IoCompletionHandle = CompletionPort; CompletionInformation.IoCompletionHandle = CompletionPort;
CompletionInformation.CompletionKey = CompletionKey; CompletionInformation.CompletionKey = CompletionKey;
#endif
errCode = NtSetInformationFile(FileHandle, errCode = NtSetInformationFile(FileHandle,
&IoStatusBlock, &IoStatusBlock,

View file

@ -1,4 +1,4 @@
/* $Id: mailslot.c,v 1.10 2004/01/23 21:16:03 ekohl Exp $ /* $Id: mailslot.c,v 1.11 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -131,19 +131,19 @@ GetMailslotInfo(HANDLE hMailslot,
if (lpMaxMessageSize != NULL) if (lpMaxMessageSize != NULL)
{ {
*lpMaxMessageSize = Buffer.MaxMessageSize; *lpMaxMessageSize = Buffer.MaximumMessageSize;
} }
if (lpNextSize != NULL) if (lpNextSize != NULL)
{ {
*lpNextSize = Buffer.NextSize; *lpNextSize = Buffer.NextMessageSize;
} }
if (lpMessageCount != NULL) if (lpMessageCount != NULL)
{ {
*lpMessageCount = Buffer.MessageCount; *lpMessageCount = Buffer.MessagesAvailable;
} }
if (lpReadTimeout != NULL) if (lpReadTimeout != NULL)
{ {
*lpReadTimeout = (DWORD)(Buffer.Timeout.QuadPart / -10000); *lpReadTimeout = (DWORD)(Buffer.ReadTimeout.QuadPart / -10000);
} }
return(TRUE); return(TRUE);
@ -161,7 +161,7 @@ SetMailslotInfo(HANDLE hMailslot,
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
NTSTATUS Status; NTSTATUS Status;
Buffer.Timeout.QuadPart = lReadTimeout * -10000; Buffer.ReadTimeout.QuadPart = lReadTimeout * -10000;
Status = NtSetInformationFile(hMailslot, Status = NtSetInformationFile(hMailslot,
&Iosb, &Iosb,

View file

@ -1,4 +1,4 @@
/* $Id: move.c,v 1.13 2004/01/23 21:16:03 ekohl Exp $ /* $Id: move.c,v 1.14 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -22,138 +22,6 @@
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
/*
* @implemented
*/
BOOL
STDCALL
MoveFileA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName
)
{
return MoveFileExA (lpExistingFileName,
lpNewFileName,
MOVEFILE_COPY_ALLOWED);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileExA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
DWORD dwFlags
)
{
return MoveFileWithProgressA (lpExistingFileName,
lpNewFileName,
NULL,
NULL,
dwFlags);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileWithProgressA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags
)
{
UNICODE_STRING ExistingFileNameU;
UNICODE_STRING NewFileNameU;
ANSI_STRING ExistingFileName;
ANSI_STRING NewFileName;
BOOL Result;
RtlInitAnsiString (&ExistingFileName,
(LPSTR)lpExistingFileName);
RtlInitAnsiString (&NewFileName,
(LPSTR)lpNewFileName);
/* convert ansi (or oem) string to unicode */
if (bIsFileApiAnsi)
{
RtlAnsiStringToUnicodeString (&ExistingFileNameU,
&ExistingFileName,
TRUE);
RtlAnsiStringToUnicodeString (&NewFileNameU,
&NewFileName,
TRUE);
}
else
{
RtlOemStringToUnicodeString (&ExistingFileNameU,
&ExistingFileName,
TRUE);
RtlOemStringToUnicodeString (&NewFileNameU,
&NewFileName,
TRUE);
}
Result = MoveFileWithProgressW (ExistingFileNameU.Buffer,
NewFileNameU.Buffer,
lpProgressRoutine,
lpData,
dwFlags);
RtlFreeHeap (RtlGetProcessHeap (),
0,
ExistingFileNameU.Buffer);
RtlFreeHeap (RtlGetProcessHeap (),
0,
NewFileNameU.Buffer);
return Result;
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileW (
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName
)
{
return MoveFileExW (lpExistingFileName,
lpNewFileName,
MOVEFILE_COPY_ALLOWED);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileExW (
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
DWORD dwFlags
)
{
return MoveFileWithProgressW (lpExistingFileName,
lpNewFileName,
NULL,
NULL,
dwFlags);
}
static BOOL static BOOL
AdjustFileAttributes ( AdjustFileAttributes (
LPCWSTR ExistingFileName, LPCWSTR ExistingFileName,
@ -312,10 +180,9 @@ MoveFileWithProgressW (
FileRename = (FILE_RENAME_INFORMATION *)Buffer; FileRename = (FILE_RENAME_INFORMATION *)Buffer;
if ((dwFlags & MOVEFILE_REPLACE_EXISTING) == MOVEFILE_REPLACE_EXISTING) if ((dwFlags & MOVEFILE_REPLACE_EXISTING) == MOVEFILE_REPLACE_EXISTING)
FileRename->Replace = TRUE; FileRename->ReplaceIfExists = TRUE;
else else
FileRename->Replace = FALSE; FileRename->ReplaceIfExists = FALSE;
FileRename->FileNameLength = wcslen (lpNewFileName); FileRename->FileNameLength = wcslen (lpNewFileName);
memcpy (FileRename->FileName, memcpy (FileRename->FileName,
lpNewFileName, lpNewFileName,
@ -346,7 +213,7 @@ MoveFileWithProgressW (
lpProgressRoutine, lpProgressRoutine,
lpData, lpData,
NULL, NULL,
FileRename->Replace ? 0 : COPY_FILE_FAIL_IF_EXISTS) && FileRename->ReplaceIfExists ? 0 : COPY_FILE_FAIL_IF_EXISTS) &&
AdjustFileAttributes(lpExistingFileName, lpNewFileName) && AdjustFileAttributes(lpExistingFileName, lpNewFileName) &&
DeleteFileW (lpExistingFileName); DeleteFileW (lpExistingFileName);
if (! Result) if (! Result)
@ -379,4 +246,136 @@ MoveFileWithProgressW (
return Result; return Result;
} }
/*
* @implemented
*/
BOOL
STDCALL
MoveFileWithProgressA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
LPPROGRESS_ROUTINE lpProgressRoutine,
LPVOID lpData,
DWORD dwFlags
)
{
UNICODE_STRING ExistingFileNameU;
UNICODE_STRING NewFileNameU;
ANSI_STRING ExistingFileName;
ANSI_STRING NewFileName;
BOOL Result;
RtlInitAnsiString (&ExistingFileName,
(LPSTR)lpExistingFileName);
RtlInitAnsiString (&NewFileName,
(LPSTR)lpNewFileName);
/* convert ansi (or oem) string to unicode */
if (bIsFileApiAnsi)
{
RtlAnsiStringToUnicodeString (&ExistingFileNameU,
&ExistingFileName,
TRUE);
RtlAnsiStringToUnicodeString (&NewFileNameU,
&NewFileName,
TRUE);
}
else
{
RtlOemStringToUnicodeString (&ExistingFileNameU,
&ExistingFileName,
TRUE);
RtlOemStringToUnicodeString (&NewFileNameU,
&NewFileName,
TRUE);
}
Result = MoveFileWithProgressW (ExistingFileNameU.Buffer,
NewFileNameU.Buffer,
lpProgressRoutine,
lpData,
dwFlags);
RtlFreeHeap (RtlGetProcessHeap (),
0,
ExistingFileNameU.Buffer);
RtlFreeHeap (RtlGetProcessHeap (),
0,
NewFileNameU.Buffer);
return Result;
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileW (
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName
)
{
return MoveFileExW (lpExistingFileName,
lpNewFileName,
MOVEFILE_COPY_ALLOWED);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileExW (
LPCWSTR lpExistingFileName,
LPCWSTR lpNewFileName,
DWORD dwFlags
)
{
return MoveFileWithProgressW (lpExistingFileName,
lpNewFileName,
NULL,
NULL,
dwFlags);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName
)
{
return MoveFileExA (lpExistingFileName,
lpNewFileName,
MOVEFILE_COPY_ALLOWED);
}
/*
* @implemented
*/
BOOL
STDCALL
MoveFileExA (
LPCSTR lpExistingFileName,
LPCSTR lpNewFileName,
DWORD dwFlags
)
{
return MoveFileWithProgressA (lpExistingFileName,
lpNewFileName,
NULL,
NULL,
dwFlags);
}
/* EOF */ /* EOF */

View file

@ -44,6 +44,8 @@ extern CRITICAL_SECTION DllLock;
BOOL STDCALL IsConsoleHandle(HANDLE Handle); BOOL STDCALL IsConsoleHandle(HANDLE Handle);
BOOL STDCALL VerifyConsoleIoHandle(HANDLE Handle);
BOOL STDCALL CloseConsoleHandle(HANDLE Handle); BOOL STDCALL CloseConsoleHandle(HANDLE Handle);
HANDLE STDCALL OpenConsoleW (LPWSTR wsName, HANDLE STDCALL OpenConsoleW (LPWSTR wsName,

View file

@ -1,3 +1,5 @@
#define _WIN32_WINNT 0x0501
#define __USE_W32API
#define NTOS_MODE_USER #define NTOS_MODE_USER
#include <ntos.h> #include <ntos.h>
#include <stdarg.h> #include <stdarg.h>
@ -24,5 +26,7 @@
#include <reactos/buildno.h> #include <reactos/buildno.h>
#include <rosrtl/thread.h> #include <rosrtl/thread.h>
#include <rosrtl/string.h> #include <rosrtl/string.h>
#include <ntos/ldrtypes.h>
#include <ddk/ldrfuncs.h>
#include "include/kernel32.h" #include "include/kernel32.h"

View file

@ -1,4 +1,4 @@
/* $Id: global.c,v 1.24 2004/05/31 16:54:04 jimtabor Exp $ /* $Id: global.c,v 1.25 2004/06/13 20:04:55 navaraf Exp $
* *
* Win32 Global/Local heap functions (GlobalXXX, LocalXXX). * Win32 Global/Local heap functions (GlobalXXX, LocalXXX).
* These functions included in Win32 for compatibility with 16 bit Windows * These functions included in Win32 for compatibility with 16 bit Windows
@ -144,7 +144,7 @@ GlobalAlloc(UINT uFlags,
/* /*
* @implemented * @implemented
*/ */
UINT STDCALL SIZE_T STDCALL
GlobalCompact(DWORD dwMinFree) GlobalCompact(DWORD dwMinFree)
{ {
return RtlCompactHeap(hProcessHeap, 0); return RtlCompactHeap(hProcessHeap, 0);

View file

@ -1,4 +1,4 @@
/* $Id: heap.c,v 1.26 2004/01/23 21:16:03 ekohl Exp $ /* $Id: heap.c,v 1.27 2004/06/13 20:04:55 navaraf Exp $
* *
* kernel/heap.c * kernel/heap.c
* Copyright (C) 1996, Onno Hovers, All rights reserved * Copyright (C) 1996, Onno Hovers, All rights reserved
@ -110,7 +110,7 @@ BOOL WINAPI HeapUnlock(HANDLE hheap)
/* /*
* @implemented * @implemented
*/ */
UINT WINAPI HeapCompact(HANDLE hheap, DWORD flags) SIZE_T WINAPI HeapCompact(HANDLE hheap, DWORD flags)
{ {
return RtlCompactHeap(hheap, flags); return RtlCompactHeap(hheap, flags);
} }

View file

@ -1,4 +1,4 @@
/* $Id: local.c,v 1.10 2004/01/23 21:16:03 ekohl Exp $ /* $Id: local.c,v 1.11 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* Copyright (C) 1996, Onno Hovers, All rights reserved * Copyright (C) 1996, Onno Hovers, All rights reserved
@ -34,7 +34,7 @@
*/ */
HLOCAL STDCALL HLOCAL STDCALL
LocalAlloc(UINT uFlags, LocalAlloc(UINT uFlags,
UINT uBytes) SIZE_T uBytes)
{ {
return (HLOCAL)GlobalAlloc(uFlags, uBytes); return (HLOCAL)GlobalAlloc(uFlags, uBytes);
} }
@ -43,7 +43,7 @@ LocalAlloc(UINT uFlags,
/* /*
* @implemented * @implemented
*/ */
UINT STDCALL SIZE_T STDCALL
LocalCompact(UINT uMinFree) LocalCompact(UINT uMinFree)
{ {
return RtlCompactHeap(hProcessHeap, 0); return RtlCompactHeap(hProcessHeap, 0);
@ -95,7 +95,7 @@ LocalLock(HLOCAL hMem)
*/ */
HLOCAL STDCALL HLOCAL STDCALL
LocalReAlloc(HLOCAL hMem, LocalReAlloc(HLOCAL hMem,
UINT uBytes, SIZE_T uBytes,
UINT uFlags) UINT uFlags)
{ {
return (HLOCAL)GlobalReAlloc((HGLOBAL)hMem, uBytes, uFlags); return (HLOCAL)GlobalReAlloc((HGLOBAL)hMem, uBytes, uFlags);
@ -105,7 +105,7 @@ LocalReAlloc(HLOCAL hMem,
/* /*
* @implemented * @implemented
*/ */
UINT STDCALL SIZE_T STDCALL
LocalShrink(HLOCAL hMem, UINT cbNewSize) LocalShrink(HLOCAL hMem, UINT cbNewSize)
{ {
return RtlCompactHeap(hProcessHeap, 0); return RtlCompactHeap(hProcessHeap, 0);

View file

@ -1,4 +1,4 @@
/* $Id: procmem.c,v 1.7 2004/01/23 17:13:36 ekohl Exp $ /* $Id: procmem.c,v 1.8 2004/06/13 20:04:55 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -48,16 +48,16 @@ ReadProcessMemory (
BOOL BOOL
STDCALL STDCALL
WriteProcessMemory ( WriteProcessMemory (
HANDLE hProcess, HANDLE hProcess,
LPVOID lpBaseAddress, LPVOID lpBaseAddress,
LPVOID lpBuffer, LPCVOID lpBuffer,
DWORD nSize, SIZE_T nSize,
LPDWORD lpNumberOfBytesWritten SIZE_T *lpNumberOfBytesWritten
) )
{ {
NTSTATUS Status; NTSTATUS Status;
Status = NtWriteVirtualMemory( hProcess, lpBaseAddress,lpBuffer, nSize, Status = NtWriteVirtualMemory( hProcess, lpBaseAddress, (LPVOID)lpBuffer, nSize,
(PULONG)lpNumberOfBytesWritten (PULONG)lpNumberOfBytesWritten
); );

View file

@ -1,4 +1,4 @@
/* $Id: console.c,v 1.75 2004/05/28 13:17:32 weiden Exp $ /* $Id: console.c,v 1.76 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -1016,7 +1016,7 @@ GetStdHandle(DWORD nStdHandle)
/* /*
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
SetStdHandle(DWORD nStdHandle, SetStdHandle(DWORD nStdHandle,
HANDLE hHandle) HANDLE hHandle)
/* /*
@ -1234,7 +1234,7 @@ BOOL STDCALL AllocConsole(VOID)
if(NtCurrentPeb()->ProcessParameters->hConsole) if(NtCurrentPeb()->ProcessParameters->hConsole)
{ {
DPRINT("AllocConsole: Allocate duplicate console to the same Process\n"); DPRINT("AllocConsole: Allocate duplicate console to the same Process\n");
SetLastErrorByStatus (STATUS_OBJECT_EXISTS); SetLastErrorByStatus (STATUS_OBJECT_NAME_EXISTS);
return FALSE; return FALSE;
} }
@ -1403,7 +1403,6 @@ FillConsoleOutputCharacterW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PeekConsoleInputA( PeekConsoleInputA(
@ -1474,7 +1473,6 @@ PeekConsoleInputA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
PeekConsoleInputW( PeekConsoleInputW(
@ -1494,7 +1492,7 @@ PeekConsoleInputW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
ReadConsoleInputA(HANDLE hConsoleInput, ReadConsoleInputA(HANDLE hConsoleInput,
PINPUT_RECORD lpBuffer, PINPUT_RECORD lpBuffer,
DWORD nLength, DWORD nLength,
@ -1572,7 +1570,6 @@ ReadConsoleInputA(HANDLE hConsoleInput,
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleInputW( ReadConsoleInputW(
@ -1592,7 +1589,6 @@ ReadConsoleInputW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleInputA( WriteConsoleInputA(
@ -1659,7 +1655,6 @@ WriteConsoleInputA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleInputW( WriteConsoleInputW(
@ -1679,7 +1674,6 @@ WriteConsoleInputW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputA( ReadConsoleOutputA(
@ -1754,7 +1748,6 @@ ReadConsoleOutputA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputW( ReadConsoleOutputW(
@ -1774,7 +1767,7 @@ ReadConsoleOutputW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
WriteConsoleOutputA(HANDLE hConsoleOutput, WriteConsoleOutputA(HANDLE hConsoleOutput,
CONST CHAR_INFO *lpBuffer, CONST CHAR_INFO *lpBuffer,
COORD dwBufferSize, COORD dwBufferSize,
@ -1839,7 +1832,6 @@ WriteConsoleOutputA(HANDLE hConsoleOutput,
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputW( WriteConsoleOutputW(
@ -1860,7 +1852,6 @@ WriteConsoleOutputW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputCharacterA( ReadConsoleOutputCharacterA(
@ -1929,7 +1920,6 @@ ReadConsoleOutputCharacterA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputCharacterW( ReadConsoleOutputCharacterW(
@ -1950,7 +1940,6 @@ ReadConsoleOutputCharacterW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleOutputAttribute( ReadConsoleOutputAttribute(
@ -2021,7 +2010,7 @@ ReadConsoleOutputAttribute(
* *
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
WriteConsoleOutputCharacterA(HANDLE hConsoleOutput, WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,
LPCSTR lpCharacter, LPCSTR lpCharacter,
DWORD nLength, DWORD nLength,
@ -2075,7 +2064,7 @@ WriteConsoleOutputCharacterA(HANDLE hConsoleOutput,
* *
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
WriteConsoleOutputCharacterW(HANDLE hConsoleOutput, WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,
LPCWSTR lpCharacter, LPCWSTR lpCharacter,
DWORD nLength, DWORD nLength,
@ -2138,7 +2127,6 @@ WriteConsoleOutputCharacterW(HANDLE hConsoleOutput,
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleOutputAttribute( WriteConsoleOutputAttribute(
@ -2196,7 +2184,6 @@ WriteConsoleOutputAttribute(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FillConsoleOutputAttribute( FillConsoleOutputAttribute(
@ -2233,7 +2220,6 @@ FillConsoleOutputAttribute(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleMode( GetConsoleMode(
@ -2263,7 +2249,6 @@ GetConsoleMode(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumberOfConsoleInputEvents( GetNumberOfConsoleInputEvents(
@ -2301,7 +2286,6 @@ GetNumberOfConsoleInputEvents(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
COORD COORD
WINAPI WINAPI
GetLargestConsoleWindowSize( GetLargestConsoleWindowSize(
@ -2322,7 +2306,6 @@ GetLargestConsoleWindowSize(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetConsoleCursorInfo( GetConsoleCursorInfo(
@ -2353,7 +2336,6 @@ GetConsoleCursorInfo(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
GetNumberOfConsoleMouseButtons( GetNumberOfConsoleMouseButtons(
@ -2370,7 +2352,6 @@ GetNumberOfConsoleMouseButtons(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleMode( SetConsoleMode(
@ -2400,7 +2381,6 @@ SetConsoleMode(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleActiveScreenBuffer( SetConsoleActiveScreenBuffer(
@ -2428,7 +2408,6 @@ SetConsoleActiveScreenBuffer(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
FlushConsoleInputBuffer( FlushConsoleInputBuffer(
@ -2456,7 +2435,6 @@ FlushConsoleInputBuffer(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleScreenBufferSize( SetConsoleScreenBufferSize(
@ -2473,7 +2451,6 @@ SetConsoleScreenBufferSize(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCursorInfo( SetConsoleCursorInfo(
@ -2504,7 +2481,6 @@ SetConsoleCursorInfo(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ScrollConsoleScreenBufferA( ScrollConsoleScreenBufferA(
@ -2551,7 +2527,6 @@ ScrollConsoleScreenBufferA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ScrollConsoleScreenBufferW( ScrollConsoleScreenBufferW(
@ -2572,7 +2547,6 @@ ScrollConsoleScreenBufferW(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleWindowInfo( SetConsoleWindowInfo(
@ -2591,7 +2565,6 @@ SetConsoleWindowInfo(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTextAttribute( SetConsoleTextAttribute(
@ -2679,7 +2652,7 @@ RemoveConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine)
/* /*
* @implemented * @implemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine, SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,
BOOL Add) BOOL Add)
{ {
@ -2704,7 +2677,7 @@ SetConsoleCtrlHandler(PHANDLER_ROUTINE HandlerRoutine,
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI BOOL WINAPI BOOL WINAPI
GenerateConsoleCtrlEvent( GenerateConsoleCtrlEvent(
DWORD dwCtrlEvent, DWORD dwCtrlEvent,
DWORD dwProcessGroupId DWORD dwProcessGroupId
@ -2720,7 +2693,6 @@ GenerateConsoleCtrlEvent(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleTitleW( GetConsoleTitleW(
@ -2783,7 +2755,6 @@ GetConsoleTitleW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
DWORD DWORD
WINAPI WINAPI
GetConsoleTitleA( GetConsoleTitleA(
@ -2823,7 +2794,6 @@ GetConsoleTitleA(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTitleW( SetConsoleTitleW(
@ -2884,7 +2854,6 @@ SetConsoleTitleW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleTitleA( SetConsoleTitleA(
@ -2943,7 +2912,6 @@ SetConsoleTitleA(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
ReadConsoleW( ReadConsoleW(
@ -2964,7 +2932,6 @@ ReadConsoleW(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
WriteConsoleW( WriteConsoleW(
@ -3030,7 +2997,6 @@ WriteConsoleW(
* *
* @implemented * @implemented
*/ */
WINBASEAPI
HANDLE HANDLE
WINAPI WINAPI
CreateConsoleScreenBuffer( CreateConsoleScreenBuffer(
@ -3062,7 +3028,6 @@ CreateConsoleScreenBuffer(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
UINT UINT
WINAPI WINAPI
GetConsoleCP( VOID ) GetConsoleCP( VOID )
@ -3077,7 +3042,6 @@ GetConsoleCP( VOID )
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleCP( SetConsoleCP(
@ -3094,7 +3058,6 @@ SetConsoleCP(
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
UINT UINT
WINAPI WINAPI
GetConsoleOutputCP( VOID ) GetConsoleOutputCP( VOID )
@ -3109,7 +3072,6 @@ GetConsoleOutputCP( VOID )
* *
* @unimplemented * @unimplemented
*/ */
WINBASEAPI
BOOL BOOL
WINAPI WINAPI
SetConsoleOutputCP( SetConsoleOutputCP(

View file

@ -1,4 +1,4 @@
/* $Id: errormsg.c,v 1.16 2004/01/23 21:16:03 ekohl Exp $ /* $Id: errormsg.c,v 1.17 2004/06/13 20:04:56 navaraf Exp $
* *
* reactos/lib/kernel32/misc/errormsg.c * reactos/lib/kernel32/misc/errormsg.c
* *
@ -45,35 +45,6 @@ inline static LPSTR HEAP_strdupWtoA( HANDLE heap, DWORD flags, LPCWSTR str )
return ret; return ret;
} }
/* INTERNAL */
typedef struct tagMESSAGE_RESOURCE_ENTRY {
WORD Length;
WORD Flags;
BYTE Text[1];
} MESSAGE_RESOURCE_ENTRY,*PMESSAGE_RESOURCE_ENTRY;
#define MESSAGE_RESOURCE_UNICODE 0x0001
typedef struct tagMESSAGE_RESOURCE_BLOCK {
DWORD LowId;
DWORD HighId;
DWORD OffsetToEntries;
} MESSAGE_RESOURCE_BLOCK,*PMESSAGE_RESOURCE_BLOCK;
typedef struct tagMESSAGE_RESOURCE_DATA {
DWORD NumberOfBlocks;
MESSAGE_RESOURCE_BLOCK Blocks[ 1 ];
} MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
//#define RT_RCDATAA MAKEINTRESOURCEA(10)
//#define RT_RCDATAW MAKEINTRESOURCEW(10)
////#define RT_RCDATA WINELIB_NAME_AW(RT_RCDATA)
//#define RT_MESSAGETABLEA MAKEINTRESOURCEA(11)
//#define RT_MESSAGETABLEW MAKEINTRESOURCEW(11)
////#define RT_MESSAGETABLE WINELIB_NAME_AW(RT_MESSAGETABLE)
/* Messages...used by FormatMessage32* (KERNEL32.something) /* Messages...used by FormatMessage32* (KERNEL32.something)
* *
* They can be specified either directly or using a message ID and * They can be specified either directly or using a message ID and
@ -112,7 +83,7 @@ static INT load_messageA( HMODULE instance, UINT id, WORD lang,
//TRACE("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen); //TRACE("instance = %08lx, id = %08lx, buffer = %p, length = %ld\n", (DWORD)instance, (DWORD)id, buffer, (DWORD)buflen);
/*FIXME: I am not sure about the '1' ... But I've only seen those entries*/ /*FIXME: I am not sure about the '1' ... But I've only seen those entries*/
hrsrc = FindResourceExW(instance,RT_MESSAGETABLEW,(LPWSTR)1,lang); hrsrc = FindResourceExW(instance,(LPWSTR)RT_MESSAGETABLE,(LPWSTR)1,lang);
if (!hrsrc) return 0; if (!hrsrc) return 0;
hmem = LoadResource( instance, hrsrc ); hmem = LoadResource( instance, hrsrc );
if (!hmem) return 0; if (!hmem) return 0;

View file

@ -1,4 +1,4 @@
/* $Id: lang.c,v 1.18 2004/05/03 17:12:27 weiden Exp $ /* $Id: lang.c,v 1.19 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries * PROJECT : ReactOS user mode libraries
@ -20,8 +20,6 @@
#define LOCALE_RETURN_NUMBER 0x20000000 #define LOCALE_RETURN_NUMBER 0x20000000
#define LOCALE_USE_CP_ACP 0x40000000 #define LOCALE_USE_CP_ACP 0x40000000
#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|LOCALE_RETURN_NUMBER) #define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|LOCALE_RETURN_NUMBER)
#define LOCALE_NEUTRAL (MAKELCID(MAKELANGID(LANG_NEUTRAL,SUBLANG_NEUTRAL),SORT_DEFAULT))
#define LOCALE_FONTSIGNATURE 0x00000058
static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT); static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT);
@ -674,7 +672,7 @@ HKEY RosCreateRegistryKey(void)
{ {
OBJECT_ATTRIBUTES objAttr; OBJECT_ATTRIBUTES objAttr;
UNICODE_STRING nameW; UNICODE_STRING nameW;
HKEY hKey; HANDLE hKey;
if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hKey ) != STATUS_SUCCESS) return 0; if (RtlOpenCurrentUser( KEY_ALL_ACCESS, &hKey ) != STATUS_SUCCESS) return 0;
@ -796,7 +794,7 @@ GetLocaleInfoW (
liLangID = MAKELANGID(PRIMARYLANGID(liLangID), SUBLANG_DEFAULT); liLangID = MAKELANGID(PRIMARYLANGID(liLangID), SUBLANG_DEFAULT);
hModule = GetModuleHandleW( L"kernel32.dll" ); hModule = GetModuleHandleW( L"kernel32.dll" );
if (!(hRsrc = FindResourceExW( hModule, RT_STRINGW, (LPCWSTR)((LCType >> 4) + 1), liLangID ))) if (!(hRsrc = FindResourceExW( hModule, (LPWSTR)RT_STRING, (LPCWSTR)((LCType >> 4) + 1), liLangID )))
{ {
SetLastError( ERROR_INVALID_FLAGS ); SetLastError( ERROR_INVALID_FLAGS );
return 0; return 0;

View file

@ -1,4 +1,4 @@
/* $Id: ldr.c,v 1.20 2004/05/03 14:34:44 weiden Exp $ /* $Id: ldr.c,v 1.21 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries * PROJECT : ReactOS user mode libraries
@ -12,6 +12,12 @@
#define NDEBUG #define NDEBUG
#include "../include/debug.h" #include "../include/debug.h"
typedef struct tagLOADPARMS32 {
LPSTR lpEnvAddress;
LPSTR lpCmdLine;
LPSTR lpCmdShow;
DWORD dwReserved;
} LOADPARMS32;
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
@ -202,7 +208,8 @@ FreeLibraryAndExitThread (
{ {
if ( FreeLibrary(hLibModule) ) if ( FreeLibrary(hLibModule) )
ExitThread(dwExitCode); ExitThread(dwExitCode);
return; for (;;)
;
} }

View file

@ -1,4 +1,4 @@
/* $Id: profile.c,v 1.11 2004/01/31 23:52:42 gvg Exp $ /* $Id: profile.c,v 1.12 2004/06/13 20:04:56 navaraf Exp $
* *
* Imported from Wine * Imported from Wine
* Copyright 1993 Miguel de Icaza * Copyright 1993 Miguel de Icaza
@ -1384,13 +1384,13 @@ GetPrivateProfileStringA(
/* /*
* @unimplemented * @unimplemented
*/ */
DWORD STDCALL BOOL STDCALL
GetPrivateProfileStructW ( GetPrivateProfileStructW (
DWORD Unknown0, IN LPCWSTR Section,
DWORD Unknown1, IN LPCWSTR Key,
DWORD Unknown2, OUT LPVOID Struct,
DWORD Unknown3, IN UINT StructSize,
DWORD Unknown4 IN LPCWSTR File
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -1401,13 +1401,13 @@ GetPrivateProfileStructW (
/* /*
* @unimplemented * @unimplemented
*/ */
DWORD STDCALL BOOL STDCALL
GetPrivateProfileStructA ( GetPrivateProfileStructA (
DWORD Unknown0, IN LPCSTR Section,
DWORD Unknown1, IN LPCSTR Key,
DWORD Unknown2, OUT LPVOID Struct,
DWORD Unknown3, IN UINT StructSize,
DWORD Unknown4 IN LPCSTR File
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -1672,11 +1672,11 @@ WritePrivateProfileStringW(LPCWSTR AppName,
*/ */
BOOL STDCALL BOOL STDCALL
WritePrivateProfileStructA ( WritePrivateProfileStructA (
DWORD Unknown0, IN LPCSTR Section,
DWORD Unknown1, IN LPCSTR Key,
DWORD Unknown2, IN LPVOID Struct,
DWORD Unknown3, IN UINT StructSize,
DWORD Unknown4 IN LPCSTR File
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -1689,11 +1689,11 @@ WritePrivateProfileStructA (
*/ */
BOOL STDCALL BOOL STDCALL
WritePrivateProfileStructW ( WritePrivateProfileStructW (
DWORD Unknown0, IN LPCWSTR Section,
DWORD Unknown1, IN LPCWSTR Key,
DWORD Unknown2, IN LPVOID Struct,
DWORD Unknown3, IN UINT StructSize,
DWORD Unknown4 IN LPCWSTR File
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);

View file

@ -1,4 +1,4 @@
/* $Id: res.c,v 1.20 2004/01/23 21:16:03 ekohl Exp $ /* $Id: res.c,v 1.21 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries * PROJECT : ReactOS user mode libraries
@ -149,7 +149,7 @@ FindResourceExW (
return NULL; return NULL;
} }
return ResourceDataEntry; return (HRSRC)ResourceDataEntry;
} }
@ -165,13 +165,14 @@ LoadResource (
{ {
NTSTATUS Status; NTSTATUS Status;
PVOID Data; PVOID Data;
PIMAGE_RESOURCE_DATA_ENTRY ResInfo = (PIMAGE_RESOURCE_DATA_ENTRY)hResInfo;
if (hModule == NULL) if (hModule == NULL)
{ {
hModule = (HINSTANCE)GetModuleHandleW(NULL); hModule = (HINSTANCE)GetModuleHandleW(NULL);
} }
Status = LdrAccessResource (hModule, hResInfo, &Data, NULL); Status = LdrAccessResource (hModule, ResInfo, &Data, NULL);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
SetLastErrorByStatus (Status); SetLastErrorByStatus (Status);

View file

@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.76 2004/05/13 20:42:28 navaraf Exp $ /* $Id: stubs.c,v 1.77 2004/06/13 20:04:56 navaraf Exp $
* *
* KERNEL32.DLL stubs (unimplemented functions) * KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them. * Remove from this file, if you implement them.
@ -305,7 +305,7 @@ GetStringTypeA (
BOOL BOOL
STDCALL STDCALL
GetSystemPowerStatus ( GetSystemPowerStatus (
DWORD Unknown0 LPSYSTEM_POWER_STATUS PowerStatus
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
@ -1632,7 +1632,7 @@ FindActCtxSectionStringW(
HANDLE HANDLE
STDCALL STDCALL
FindFirstVolumeW( FindFirstVolumeW(
LPWSTR lpszVolumeName, LPCWSTR lpszVolumeName,
DWORD cchBufferLength DWORD cchBufferLength
) )
{ {
@ -1646,7 +1646,7 @@ FindFirstVolumeW(
HANDLE HANDLE
STDCALL STDCALL
FindFirstVolumeMountPointW( FindFirstVolumeMountPointW(
LPCWSTR lpszRootPathName, LPWSTR lpszRootPathName,
LPWSTR lpszVolumeMountPoint, LPWSTR lpszVolumeMountPoint,
DWORD cchBufferLength DWORD cchBufferLength
) )
@ -1992,7 +1992,7 @@ FindActCtxSectionStringA(
HANDLE HANDLE
STDCALL STDCALL
FindFirstVolumeA( FindFirstVolumeA(
LPSTR lpszVolumeName, LPCSTR lpszVolumeName,
DWORD cchBufferLength DWORD cchBufferLength
) )
{ {
@ -2006,7 +2006,7 @@ FindFirstVolumeA(
HANDLE HANDLE
STDCALL STDCALL
FindFirstVolumeMountPointA( FindFirstVolumeMountPointA(
LPCSTR lpszRootPathName, LPSTR lpszRootPathName,
LPSTR lpszVolumeMountPoint, LPSTR lpszVolumeMountPoint,
DWORD cchBufferLength DWORD cchBufferLength
) )
@ -2022,7 +2022,7 @@ BOOL
STDCALL STDCALL
FindNextVolumeA( FindNextVolumeA(
HANDLE hFindVolume, HANDLE hFindVolume,
LPSTR lpszVolumeName, LPCSTR lpszVolumeName,
DWORD cchBufferLength DWORD cchBufferLength
) )
{ {
@ -2385,7 +2385,11 @@ VOID STDCALL UTUnRegister( HMODULE hModule )
/* /*
* @unimplemented * @unimplemented
*/ */
#if 0
FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli) FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PDelayLoadInfo pdli)
#else
FARPROC STDCALL DelayLoadFailureHook(unsigned int dliNotify, PVOID pdli)
#endif
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0; return 0;

View file

@ -1,4 +1,4 @@
/* $Id: sysinfo.c,v 1.12 2004/05/31 11:41:14 ekohl Exp $ /* $Id: sysinfo.c,v 1.13 2004/06/13 20:04:56 navaraf Exp $
* *
* reactos/lib/kernel32/misc/sysinfo.c * reactos/lib/kernel32/misc/sysinfo.c
* *
@ -55,9 +55,9 @@ GetSystemInfo (
* PROCESSOR_ARCHITECTURE_PPC 3 * PROCESSOR_ARCHITECTURE_PPC 3
* PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF * PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
*/ */
Si->u.s.wProcessorArchitecture = Spi.ProcessorArchitecture; Si->wProcessorArchitecture = Spi.ProcessorArchitecture;
/* For future use: always zero */ /* For future use: always zero */
Si->u.s.wReserved = 0; Si->wReserved = 0;
Si->dwPageSize = Sbi.PhysicalPageSize; Si->dwPageSize = Sbi.PhysicalPageSize;
Si->lpMinimumApplicationAddress = (PVOID)Sbi.LowestUserAddress; Si->lpMinimumApplicationAddress = (PVOID)Sbi.LowestUserAddress;
Si->lpMaximumApplicationAddress = (PVOID)Sbi.HighestUserAddress; Si->lpMaximumApplicationAddress = (PVOID)Sbi.HighestUserAddress;

View file

@ -1,4 +1,4 @@
/* $Id: time.c,v 1.26 2004/01/23 21:16:03 ekohl Exp $ /* $Id: time.c,v 1.27 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -366,16 +366,6 @@ SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation)
} }
/*
* @implemented
*/
DWORD STDCALL
GetCurrentTime(VOID)
{
return GetTickCount();
}
/* /*
* @implemented * @implemented
*/ */

View file

@ -123,14 +123,14 @@ InterlockedExchange(LPLONG target, LONG value )
* *
* @implemented * @implemented
*/ */
PVOID LONG
STDCALL STDCALL
InterlockedCompareExchange( InterlockedCompareExchange(
PVOID *Destination, PLONG Destination,
PVOID Exchange, LONG Exchange,
PVOID Comperand ) LONG Comperand )
{ {
PVOID ret; LONG ret;
__asm__ ( /* lock for SMP systems */ __asm__ ( /* lock for SMP systems */
"lock\n\t" "lock\n\t"
"cmpxchgl %2,(%1)" "cmpxchgl %2,(%1)"
@ -138,7 +138,6 @@ InterlockedCompareExchange(
:"r" (Destination),"r" (Exchange), "0" (Comperand) :"r" (Destination),"r" (Exchange), "0" (Comperand)
:"memory" ); :"memory" );
return ret; return ret;
} }
/************************************************************************ /************************************************************************

View file

@ -1,4 +1,4 @@
/* $Id: timer.c,v 1.15 2004/01/23 21:16:04 ekohl Exp $ /* $Id: timer.c,v 1.16 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -23,7 +23,7 @@
HANDLE STDCALL HANDLE STDCALL
CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes, CreateWaitableTimerW(LPSECURITY_ATTRIBUTES lpTimerAttributes,
BOOL bManualReset, BOOL bManualReset,
LPWSTR lpTimerName) LPCWSTR lpTimerName)
{ {
NTSTATUS Status; NTSTATUS Status;
HANDLE TimerHandle; HANDLE TimerHandle;

View file

@ -1,4 +1,4 @@
/* $Id: fiber.c,v 1.10 2004/03/07 20:07:05 hyperion Exp $ /* $Id: fiber.c,v 1.11 2004/06/13 20:04:56 navaraf Exp $
* *
* FILE: lib/kernel32/thread/fiber.c * FILE: lib/kernel32/thread/fiber.c
* *
@ -68,15 +68,6 @@ BOOL WINAPI ConvertFiberToThread(void)
} }
/*
* @implemented
*/
LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter)
{
return ConvertThreadToFiberEx(lpParameter, 0);
}
/* /*
* @implemented * @implemented
*/ */
@ -116,6 +107,15 @@ LPVOID WINAPI ConvertThreadToFiberEx(LPVOID lpParameter, DWORD dwFlags)
} }
/*
* @implemented
*/
LPVOID WINAPI ConvertThreadToFiber(LPVOID lpParameter)
{
return ConvertThreadToFiberEx(lpParameter, 0);
}
/* /*
* @implemented * @implemented
*/ */

View file

@ -1,4 +1,4 @@
/* $Id: thread.c,v 1.49 2004/01/23 21:16:04 ekohl Exp $ /* $Id: thread.c,v 1.50 2004/06/13 20:04:56 navaraf Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries * PROJECT: ReactOS system libraries
@ -640,26 +640,23 @@ GetThreadSelectorEntry(IN HANDLE hThread,
/* /*
* @implemented * @implemented
*/ */
BOOL STDCALL DWORD STDCALL
SetThreadIdealProcessor(HANDLE hThread, SetThreadIdealProcessor(HANDLE hThread,
DWORD dwIdealProcessor) DWORD dwIdealProcessor)
{ {
ULONG IdealProcessor;
NTSTATUS Status; NTSTATUS Status;
IdealProcessor = (ULONG)dwIdealProcessor;
Status = NtSetInformationThread(hThread, Status = NtSetInformationThread(hThread,
ThreadIdealProcessor, ThreadIdealProcessor,
&IdealProcessor, &dwIdealProcessor,
sizeof(ULONG)); sizeof(ULONG));
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
SetLastErrorByStatus(Status); SetLastErrorByStatus(Status);
return(FALSE); return -1;
} }
return(TRUE); return dwIdealProcessor;
} }
/* EOF */ /* EOF */

View file

@ -35,8 +35,6 @@
extern "C" { extern "C" {
#endif #endif
#pragma pack(push,4)
#include <stdarg.h> #include <stdarg.h>
#include <windef.h> #include <windef.h>
#include <ntdef.h> #include <ntdef.h>
@ -81,8 +79,6 @@ typedef CONST char *PCSZ;
/* Definitions only in Windows NT 4 */ /* Definitions only in Windows NT 4 */
#include "winnt4.h" #include "winnt4.h"
#pragma pack(pop)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -31,8 +31,6 @@
extern "C" { extern "C" {
#endif #endif
#pragma pack(push,4)
/* /*
** Definitions specific to this Device Driver Kit ** Definitions specific to this Device Driver Kit
*/ */
@ -1094,6 +1092,7 @@ typedef struct _EISA_MEMORY_TYPE {
UCHAR MoreEntries : 1; UCHAR MoreEntries : 1;
} EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE; } EISA_MEMORY_TYPE, *PEISA_MEMORY_TYPE;
#include <pshpack1.h>
typedef struct _EISA_MEMORY_CONFIGURATION { typedef struct _EISA_MEMORY_CONFIGURATION {
EISA_MEMORY_TYPE ConfigurationByte; EISA_MEMORY_TYPE ConfigurationByte;
UCHAR DataSize; UCHAR DataSize;
@ -1101,6 +1100,7 @@ typedef struct _EISA_MEMORY_CONFIGURATION {
UCHAR AddressHighByte; UCHAR AddressHighByte;
USHORT MemorySize; USHORT MemorySize;
} EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION; } EISA_MEMORY_CONFIGURATION, *PEISA_MEMORY_CONFIGURATION;
#include <poppack.h>
typedef struct _EISA_IRQ_DESCRIPTOR { typedef struct _EISA_IRQ_DESCRIPTOR {
UCHAR Interrupt : 4; UCHAR Interrupt : 4;
@ -1134,6 +1134,7 @@ typedef struct _EISA_DMA_CONFIGURATION {
DMA_CONFIGURATION_BYTE1 ConfigurationByte1; DMA_CONFIGURATION_BYTE1 ConfigurationByte1;
} EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION; } EISA_DMA_CONFIGURATION, *PEISA_DMA_CONFIGURATION;
#include <pshpack1.h>
typedef struct _EISA_PORT_DESCRIPTOR { typedef struct _EISA_PORT_DESCRIPTOR {
UCHAR NumberPorts : 5; UCHAR NumberPorts : 5;
UCHAR Reserved : 1; UCHAR Reserved : 1;
@ -1145,6 +1146,7 @@ typedef struct _EISA_PORT_CONFIGURATION {
EISA_PORT_DESCRIPTOR Configuration; EISA_PORT_DESCRIPTOR Configuration;
USHORT PortAddress; USHORT PortAddress;
} EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION; } EISA_PORT_CONFIGURATION, *PEISA_PORT_CONFIGURATION;
#include <poppack.h>
typedef struct _CM_EISA_FUNCTION_INFORMATION { typedef struct _CM_EISA_FUNCTION_INFORMATION {
ULONG CompressedId; ULONG CompressedId;
@ -1243,6 +1245,7 @@ typedef struct _PNP_BUS_INFORMATION {
ULONG BusNumber; ULONG BusNumber;
} PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION; } PNP_BUS_INFORMATION, *PPNP_BUS_INFORMATION;
#include <pshpack1.h>
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR { typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
UCHAR Type; UCHAR Type;
UCHAR ShareDisposition; UCHAR ShareDisposition;
@ -1373,6 +1376,7 @@ typedef struct _CM_INT13_DRIVE_PARAMETER {
USHORT MaxHeads; USHORT MaxHeads;
USHORT NumberDrives; USHORT NumberDrives;
} CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER; } CM_INT13_DRIVE_PARAMETER, *PCM_INT13_DRIVE_PARAMETER;
#include <poppack.h>
typedef struct _CM_KEYBOARD_DEVICE_DATA { typedef struct _CM_KEYBOARD_DEVICE_DATA {
USHORT Version; USHORT Version;
@ -1966,7 +1970,7 @@ typedef struct _FILE_NAME_INFORMATION {
WCHAR FileName[1]; WCHAR FileName[1];
} FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION; } FILE_NAME_INFORMATION, *PFILE_NAME_INFORMATION;
typedef struct FILE_BASIC_INFORMATION { typedef struct _FILE_BASIC_INFORMATION {
LARGE_INTEGER CreationTime; LARGE_INTEGER CreationTime;
LARGE_INTEGER LastAccessTime; LARGE_INTEGER LastAccessTime;
LARGE_INTEGER LastWriteTime; LARGE_INTEGER LastWriteTime;
@ -2442,6 +2446,7 @@ typedef struct _SECURITY_SUBJECT_CONTEXT {
PVOID ProcessAuditId; PVOID ProcessAuditId;
} SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT; } SECURITY_SUBJECT_CONTEXT, *PSECURITY_SUBJECT_CONTEXT;
#include <pshpack4.h>
typedef struct _ACCESS_STATE { typedef struct _ACCESS_STATE {
LUID OperationID; LUID OperationID;
BOOLEAN SecurityEvaluated; BOOLEAN SecurityEvaluated;
@ -2464,6 +2469,7 @@ typedef struct _ACCESS_STATE {
UNICODE_STRING ObjectName; UNICODE_STRING ObjectName;
UNICODE_STRING ObjectTypeName; UNICODE_STRING ObjectTypeName;
} ACCESS_STATE, *PACCESS_STATE; } ACCESS_STATE, *PACCESS_STATE;
#include <poppack.h>
typedef struct _IO_SECURITY_CONTEXT { typedef struct _IO_SECURITY_CONTEXT {
PSECURITY_QUALITY_OF_SERVICE SecurityQos; PSECURITY_QUALITY_OF_SERVICE SecurityQos;
@ -2522,6 +2528,7 @@ typedef struct _IO_CSQ {
PVOID ReservePointer; PVOID ReservePointer;
} IO_CSQ, *PIO_CSQ; } IO_CSQ, *PIO_CSQ;
#include <pshpack4.h>
typedef struct _IO_STACK_LOCATION { typedef struct _IO_STACK_LOCATION {
UCHAR MajorFunction; UCHAR MajorFunction;
UCHAR MinorFunction; UCHAR MinorFunction;
@ -2662,6 +2669,7 @@ typedef struct _IO_STACK_LOCATION {
PIO_COMPLETION_ROUTINE CompletionRoutine; PIO_COMPLETION_ROUTINE CompletionRoutine;
PVOID Context; PVOID Context;
} IO_STACK_LOCATION, *PIO_STACK_LOCATION; } IO_STACK_LOCATION, *PIO_STACK_LOCATION;
#include <poppack.h>
/* IO_STACK_LOCATION.Control */ /* IO_STACK_LOCATION.Control */
@ -3720,31 +3728,31 @@ typedef struct _KPCR_TIB {
DWORD Version; /* 10 */ DWORD Version; /* 10 */
} DUMMYUNIONNAME; } DUMMYUNIONNAME;
PVOID ArbitraryUserPointer; /* 14 */ PVOID ArbitraryUserPointer; /* 14 */
} KPCR_TIB, *PKPCR_TIB; /* 18 */ struct _NT_TIB *Self; /* 18 */
} KPCR_TIB, *PKPCR_TIB; /* 1C */
#define PCR_MINOR_VERSION 1 #define PCR_MINOR_VERSION 1
#define PCR_MAJOR_VERSION 1 #define PCR_MAJOR_VERSION 1
typedef struct _KPCR { typedef struct _KPCR {
KPCR_TIB Tib; /* 00 */ KPCR_TIB Tib; /* 00 */
struct _KPCR *Self; /* 18 */ struct _KPCR *Self; /* 1C */
struct _KPRCB *PCRCB; /* 1C */ struct _KPRCB *PCRCB; /* 20 */
KIRQL Irql; /* 20 */ KIRQL Irql; /* 24 */
ULONG IRR; /* 24 */ ULONG IRR; /* 28 */
ULONG IrrActive; /* 28 */ ULONG IrrActive; /* 2C */
ULONG IDR; /* 2C */ ULONG IDR; /* 30 */
PVOID KdVersionBlock; /* 30 */ PVOID KdVersionBlock; /* 34 */
PUSHORT IDT; /* 34 */ PUSHORT IDT; /* 38 */
PUSHORT GDT; /* 38 */ PUSHORT GDT; /* 3C */
struct _KTSS *TSS; /* 3C */ struct _KTSS *TSS; /* 40 */
USHORT MajorVersion; /* 40 */ USHORT MajorVersion; /* 44 */
USHORT MinorVersion; /* 42 */ USHORT MinorVersion; /* 46 */
KAFFINITY SetMember; /* 44 */ KAFFINITY SetMember; /* 48 */
ULONG StallScaleFactor; /* 48 */ ULONG StallScaleFactor; /* 4C */
UCHAR DebugActive; /* 4C */ UCHAR SpareUnused; /* 50 */
UCHAR ProcessorNumber; /* 4D */ UCHAR Number; /* 51 */
UCHAR Reserved[2]; /* 4E */ } KPCR, *PKPCR; /* 54 */
} KPCR, *PKPCR; /* 50 */
typedef struct _KFLOATING_SAVE { typedef struct _KFLOATING_SAVE {
ULONG ControlWord; ULONG ControlWord;
@ -9098,7 +9106,6 @@ VOID
DDKAPI DDKAPI
KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount ); KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount );
#ifdef DBG #ifdef DBG
#define KdPrint(_x_) DbgPrint _x_ #define KdPrint(_x_) DbgPrint _x_
@ -9120,8 +9127,6 @@ extern NTOSAPI PBOOLEAN KdDebuggerEnabled;
#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled #define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent #define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
#pragma pack(pop)
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -24,6 +24,8 @@
#define NT_SUCCESS(x) ((x)>=0) #define NT_SUCCESS(x) ((x)>=0)
#define STATUS_SUCCESS ((NTSTATUS)0) #define STATUS_SUCCESS ((NTSTATUS)0)
#endif #endif
#define NT_WARNING(x) ((ULONG)(x)>>30==2)
#define NT_ERROR(x) ((ULONG)(x)>>30==3)
#if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H) #if !defined(_NTSECAPI_H) && !defined(_SUBAUTH_H)
typedef LONG NTSTATUS, *PNTSTATUS; typedef LONG NTSTATUS, *PNTSTATUS;
typedef struct _UNICODE_STRING { typedef struct _UNICODE_STRING {

View file

@ -204,6 +204,7 @@ extern "C" {
#define STILL_ACTIVE 0x103 #define STILL_ACTIVE 0x103
#define FIND_FIRST_EX_CASE_SENSITIVE 1 #define FIND_FIRST_EX_CASE_SENSITIVE 1
#define SCS_32BIT_BINARY 0 #define SCS_32BIT_BINARY 0
#define SCS_64BIT_BINARY 6
#define SCS_DOS_BINARY 1 #define SCS_DOS_BINARY 1
#define SCS_OS216_BINARY 5 #define SCS_OS216_BINARY 5
#define SCS_PIF_BINARY 3 #define SCS_PIF_BINARY 3
@ -532,6 +533,10 @@ extern "C" {
#define REPLACEFILE_WRITE_THROUGH 0x00000001 #define REPLACEFILE_WRITE_THROUGH 0x00000001
#define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002 #define REPLACEFILE_IGNORE_MERGE_ERRORS 0x00000002
#endif /* (_WIN32_WINNT >= 0x0500) */ #endif /* (_WIN32_WINNT >= 0x0500) */
#if (_WIN32_WINNT >= 0x0400)
#define FIBER_FLAG_FLOAT_SWITCH 0x1
#endif
#define FLS_OUT_OF_INDEXES 0xFFFFFFFF
#ifndef RC_INVOKED #ifndef RC_INVOKED
typedef struct _FILETIME { typedef struct _FILETIME {
@ -1011,12 +1016,20 @@ typedef enum _COMPUTER_NAME_FORMAT {
ComputerNameMax ComputerNameMax
} COMPUTER_NAME_FORMAT; } COMPUTER_NAME_FORMAT;
#endif /* (_WIN32_WINNT >= 0x0500) */ #endif /* (_WIN32_WINNT >= 0x0500) */
typedef struct _JOB_SET_ARRAY {
HANDLE JobHandle;
DWORD MemberLevel;
DWORD Flags;
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID); typedef DWORD(WINAPI *LPPROGRESS_ROUTINE)(LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,LARGE_INTEGER,DWORD,DWORD,HANDLE,HANDLE,LPVOID);
typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID); typedef void(WINAPI *LPFIBER_START_ROUTINE)(PVOID);
typedef BOOL(CALLBACK *ENUMRESLANGPROC)(HMODULE,LPCTSTR,LPCTSTR,WORD,LONG); typedef VOID (WINAPI *PFLS_CALLBACK_FUNCTION)(PVOID);
typedef BOOL(CALLBACK *ENUMRESNAMEPROC)(HMODULE,LPCTSTR,LPTSTR,LONG); typedef BOOL(CALLBACK *ENUMRESLANGPROCA)(HMODULE,LPCSTR,LPCSTR,WORD,LONG);
typedef BOOL(CALLBACK *ENUMRESTYPEPROC)(HMODULE,LPTSTR,LONG); typedef BOOL(CALLBACK *ENUMRESLANGPROCW)(HMODULE,LPCWSTR,LPCWSTR,WORD,LONG);
typedef BOOL(CALLBACK *ENUMRESNAMEPROCA)(HMODULE,LPCSTR,LPSTR,LONG);
typedef BOOL(CALLBACK *ENUMRESNAMEPROCW)(HMODULE,LPCWSTR,LPWSTR,LONG);
typedef BOOL(CALLBACK *ENUMRESTYPEPROCA)(HMODULE,LPSTR,LONG);
typedef BOOL(CALLBACK *ENUMRESTYPEPROCW)(HMODULE,LPWSTR,LONG);
typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED); typedef void(CALLBACK *LPOVERLAPPED_COMPLETION_ROUTINE)(DWORD,DWORD,LPOVERLAPPED);
typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS); typedef LONG(CALLBACK *PTOP_LEVEL_EXCEPTION_FILTER)(LPEXCEPTION_POINTERS);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER; typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
@ -1222,12 +1235,12 @@ BOOL WINAPI EncryptFileW(LPCWSTR);
BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL); BOOL WINAPI EndUpdateResourceA(HANDLE,BOOL);
BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL); BOOL WINAPI EndUpdateResourceW(HANDLE,BOOL);
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION); void WINAPI EnterCriticalSection(LPCRITICAL_SECTION);
BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROC,LONG_PTR); BOOL WINAPI EnumResourceLanguagesA(HMODULE,LPCSTR,LPCSTR,ENUMRESLANGPROCA,LONG_PTR);
BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROC,LONG_PTR); BOOL WINAPI EnumResourceLanguagesW(HMODULE,LPCWSTR,LPCWSTR,ENUMRESLANGPROCW,LONG_PTR);
BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROC,LONG_PTR); BOOL WINAPI EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG_PTR);
BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROC,LONG_PTR); BOOL WINAPI EnumResourceNamesW(HMODULE,LPCWSTR,ENUMRESNAMEPROCW,LONG_PTR);
BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROC,LONG_PTR); BOOL WINAPI EnumResourceTypesA(HMODULE,ENUMRESTYPEPROCA,LONG_PTR);
BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROC,LONG_PTR); BOOL WINAPI EnumResourceTypesW(HMODULE,ENUMRESTYPEPROCW,LONG_PTR);
BOOL WINAPI EqualPrefixSid(PSID,PSID); BOOL WINAPI EqualPrefixSid(PSID,PSID);
BOOL WINAPI EqualSid(PSID,PSID); BOOL WINAPI EqualSid(PSID,PSID);
DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL); DWORD WINAPI EraseTape(HANDLE,DWORD,BOOL);
@ -1288,6 +1301,10 @@ DWORD WINAPI GetFirmwareEnvironmentVariableW(LPCWSTR,LPCWSTR,PVOID,DWORD);
BOOL WINAPI FlushFileBuffers(HANDLE); BOOL WINAPI FlushFileBuffers(HANDLE);
BOOL WINAPI FlushInstructionCache(HANDLE,PCVOID,DWORD); BOOL WINAPI FlushInstructionCache(HANDLE,PCVOID,DWORD);
BOOL WINAPI FlushViewOfFile(PCVOID,DWORD); BOOL WINAPI FlushViewOfFile(PCVOID,DWORD);
DWORD WINAPI FlsAlloc(PFLS_CALLBACK_FUNCTION);
PVOID WINAPI FlsGetValue(DWORD);
BOOL WINAPI FlsSetValue(DWORD,PVOID);
BOOL WINAPI FlsFree(DWORD);
DWORD WINAPI FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*); DWORD WINAPI FormatMessageA(DWORD,PCVOID,DWORD,DWORD,LPSTR,DWORD,va_list*);
DWORD WINAPI FormatMessageW(DWORD,PCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*); DWORD WINAPI FormatMessageW(DWORD,PCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list*);
BOOL WINAPI FreeEnvironmentStringsA(LPSTR); BOOL WINAPI FreeEnvironmentStringsA(LPSTR);
@ -1509,7 +1526,7 @@ BOOL WINAPI GetVolumePathNamesForVolumeNameW(LPCWSTR,LPWSTR,DWORD,PDWORD);
UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT); UINT WINAPI GetWindowsDirectoryA(LPSTR,UINT);
UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT); UINT WINAPI GetWindowsDirectoryW(LPWSTR,UINT);
DWORD WINAPI GetWindowThreadProcessId(HWND,PDWORD); DWORD WINAPI GetWindowThreadProcessId(HWND,PDWORD);
UINT GetWriteWatch(DWORD,PVOID,SIZE_T,PVOID*,PULONG_PTR,PULONG); UINT WINAPI GetWriteWatch(DWORD,PVOID,SIZE_T,PVOID*,PULONG_PTR,PULONG);
ATOM WINAPI GlobalAddAtomA(LPCSTR); ATOM WINAPI GlobalAddAtomA(LPCSTR);
ATOM WINAPI GlobalAddAtomW( LPCWSTR); ATOM WINAPI GlobalAddAtomW( LPCWSTR);
HGLOBAL WINAPI GlobalAlloc(UINT,DWORD); HGLOBAL WINAPI GlobalAlloc(UINT,DWORD);
@ -1596,7 +1613,7 @@ BOOL WINAPI IsBadStringPtrW(LPCWSTR,UINT);
BOOL WINAPI IsBadWritePtr(PVOID,UINT); BOOL WINAPI IsBadWritePtr(PVOID,UINT);
BOOL WINAPI IsDebuggerPresent(void); BOOL WINAPI IsDebuggerPresent(void);
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
BOOL IsProcessInJob(HANDLE,HANDLE,PBOOL); BOOL WINAPI IsProcessInJob(HANDLE,HANDLE,PBOOL);
#endif #endif
BOOL WINAPI IsProcessorFeaturePresent(DWORD); BOOL WINAPI IsProcessorFeaturePresent(DWORD);
BOOL WINAPI IsSystemResumeAutomatic(void); BOOL WINAPI IsSystemResumeAutomatic(void);
@ -1605,7 +1622,7 @@ BOOL WINAPI IsValidAcl(PACL);
BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR); BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR);
BOOL WINAPI IsValidSid(PSID); BOOL WINAPI IsValidSid(PSID);
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
BOOL IsWow64Process(HANDLE,PBOOL); BOOL WINAPI IsWow64Process(HANDLE,PBOOL);
#endif #endif
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION); void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION);
#define LimitEmsPages(n) #define LimitEmsPages(n)
@ -1923,6 +1940,9 @@ BOOL WINAPI MapUserPhysicalPagesScatter(PVOID*,ULONG_PTR,PULONG_PTR);
typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO; typedef STARTUPINFOW STARTUPINFO,*LPSTARTUPINFO;
typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA; typedef WIN32_FIND_DATAW WIN32_FIND_DATA,*LPWIN32_FIND_DATA;
typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO; typedef HW_PROFILE_INFOW HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
typedef ENUMRESLANGPROCW ENUMRESLANGPROC;
typedef ENUMRESNAMEPROCW ENUMRESNAMEPROC;
typedef ENUMRESTYPEPROCW ENUMRESTYPEPROC;
#if (_WIN32_WINNT >= 0x0501) #if (_WIN32_WINNT >= 0x0501)
typedef ACTCTXW ACTCTX,*PACTCTX; typedef ACTCTXW ACTCTX,*PACTCTX;
typedef PCACTCTXW PCACTCTX; typedef PCACTCTXW PCACTCTX;
@ -2123,6 +2143,9 @@ typedef HW_PROFILE_INFOA HW_PROFILE_INFO,*LPHW_PROFILE_INFO;
typedef ACTCTXA ACTCTX,*PACTCTX; typedef ACTCTXA ACTCTX,*PACTCTX;
typedef PCACTCTXA PCACTCTX; typedef PCACTCTXA PCACTCTX;
#endif #endif
typedef ENUMRESLANGPROCA ENUMRESLANGPROC;
typedef ENUMRESNAMEPROCA ENUMRESNAMEPROC;
typedef ENUMRESTYPEPROCA ENUMRESTYPEPROC;
#define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA #define AccessCheckAndAuditAlarm AccessCheckAndAuditAlarmA
#define AddAtom AddAtomA #define AddAtom AddAtomA
#define BackupEventLog BackupEventLogA #define BackupEventLog BackupEventLogA

View file

@ -690,7 +690,10 @@ typedef DWORD FLONG;
#define PROCESSOR_MIPS_R4000 4000 #define PROCESSOR_MIPS_R4000 4000
#define PROCESSOR_ALPHA_21064 21064 #define PROCESSOR_ALPHA_21064 21064
#define PROCESSOR_INTEL_IA64 2200 #define PROCESSOR_INTEL_IA64 2200
#define PROCESSOR_PPC_601 601
#define PROCESSOR_PPC_603 603
#define PROCESSOR_PPC_604 604
#define PROCESSOR_PPC_620 620
#define PROCESSOR_ARCHITECTURE_INTEL 0 #define PROCESSOR_ARCHITECTURE_INTEL 0
#define PROCESSOR_ARCHITECTURE_MIPS 1 #define PROCESSOR_ARCHITECTURE_MIPS 1
#define PROCESSOR_ARCHITECTURE_ALPHA 2 #define PROCESSOR_ARCHITECTURE_ALPHA 2
@ -2160,8 +2163,7 @@ typedef struct _TAPE_GET_MEDIA_PARAMETERS {
typedef struct _TAPE_GET_POSITION { typedef struct _TAPE_GET_POSITION {
ULONG Type; ULONG Type;
ULONG Partition; ULONG Partition;
ULONG OffsetLow; LARGE_INTEGER Offset;
ULONG OffsetHigh;
} TAPE_GET_POSITION,*PTAPE_GET_POSITION; } TAPE_GET_POSITION,*PTAPE_GET_POSITION;
typedef struct _TAPE_PREPARE { typedef struct _TAPE_PREPARE {
DWORD Operation; DWORD Operation;
@ -3280,8 +3282,7 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
#if defined(__GNUC__) #if defined(__GNUC__)
PVOID GetCurrentFiber(void); static __inline__ PVOID GetCurrentFiber(void)
extern __inline__ PVOID GetCurrentFiber(void)
{ {
void* ret; void* ret;
__asm__ __volatile__ ( __asm__ __volatile__ (
@ -3291,8 +3292,7 @@ extern __inline__ PVOID GetCurrentFiber(void)
return ret; return ret;
} }
PVOID GetFiberData(void); static __inline__ PVOID GetFiberData(void)
extern __inline__ PVOID GetFiberData(void)
{ {
void* ret; void* ret;
__asm__ __volatile__ ( __asm__ __volatile__ (