Use W32API.
Modified: trunk/reactos/subsys/system/usetup/console.c
Modified: trunk/reactos/subsys/system/usetup/console.h
Modified: trunk/reactos/subsys/system/usetup/filesup.c
Modified: trunk/reactos/subsys/system/usetup/filesup.h
Modified: trunk/reactos/subsys/system/usetup/precomp.h
Modified: trunk/reactos/subsys/system/usetup/usetup.c
Modified: trunk/reactos/subsys/system/usetup/usetup.xml

Modified: trunk/reactos/subsys/system/usetup/console.c
--- trunk/reactos/subsys/system/usetup/console.c	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/console.c	2005-06-17 09:46:21 UTC (rev 15957)
@@ -48,7 +48,7 @@
 
 
 NTSTATUS
-GetConsoleScreenBufferInfo(PCONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo);
+ConGetConsoleScreenBufferInfo(PCONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo);
 
 
 /* FUNCTIONS *****************************************************************/
@@ -56,7 +56,7 @@
 
 
 NTSTATUS
-AllocConsole(VOID)
+ConAllocConsole(VOID)
 {
   OBJECT_ATTRIBUTES ObjectAttributes;
   IO_STATUS_BLOCK IoStatusBlock;
@@ -98,7 +98,7 @@
   if (!NT_SUCCESS(Status))
     return(Status);
 
-  GetConsoleScreenBufferInfo(&csbi);
+  ConGetConsoleScreenBufferInfo(&csbi);
 
   xScreen = csbi.dwSize.X;
   yScreen = csbi.dwSize.Y;
@@ -108,7 +108,7 @@
 
 
 VOID
-FreeConsole(VOID)
+ConFreeConsole(VOID)
 {
   DPRINT("FreeConsole() called\n");
 
@@ -125,9 +125,9 @@
 
 
 NTSTATUS
-WriteConsole(PCHAR Buffer,
-	     ULONG NumberOfCharsToWrite,
-	     PULONG NumberOfCharsWritten)
+ConWriteConsole(PCHAR Buffer,
+	        ULONG NumberOfCharsToWrite,
+	        PULONG NumberOfCharsWritten)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status = STATUS_SUCCESS;
@@ -192,7 +192,7 @@
 
 
 NTSTATUS
-ReadConsoleInput(PINPUT_RECORD Buffer)
+ConReadConsoleInput(PINPUT_RECORD Buffer)
 {
   IO_STATUS_BLOCK Iosb;
   NTSTATUS Status;
@@ -220,10 +220,10 @@
 
 
 NTSTATUS
-ReadConsoleOutputCharacters(LPSTR lpCharacter,
-			    ULONG nLength,
-			    COORD dwReadCoord,
-			    PULONG lpNumberOfCharsRead)
+ConReadConsoleOutputCharacters(LPSTR lpCharacter,
+			       ULONG nLength,
+			       COORD dwReadCoord,
+			       PULONG lpNumberOfCharsRead)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_CHARACTER Buffer;
@@ -252,10 +252,10 @@
 
 
 NTSTATUS
-ReadConsoleOutputAttributes(PUSHORT lpAttribute,
-			    ULONG nLength,
-			    COORD dwReadCoord,
-			    PULONG lpNumberOfAttrsRead)
+ConReadConsoleOutputAttributes(PUSHORT lpAttribute,
+			       ULONG nLength,
+			       COORD dwReadCoord,
+			       PULONG lpNumberOfAttrsRead)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_ATTRIBUTE Buffer;
@@ -284,9 +284,9 @@
 
 
 NTSTATUS
-WriteConsoleOutputCharacters(LPCSTR lpCharacter,
-			     ULONG nLength,
-			     COORD dwWriteCoord)
+ConWriteConsoleOutputCharacters(LPCSTR lpCharacter,
+			        ULONG nLength,
+			        COORD dwWriteCoord)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   PCHAR Buffer;
@@ -323,9 +323,9 @@
 
 
 NTSTATUS
-WriteConsoleOutputCharactersW(LPCWSTR lpCharacter,
-			      ULONG nLength,
-			      COORD dwWriteCoord)
+ConWriteConsoleOutputCharactersW(LPCWSTR lpCharacter,
+			         ULONG nLength,
+			         COORD dwWriteCoord)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   PCHAR Buffer;
@@ -367,10 +367,10 @@
 
 
 NTSTATUS
-WriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
-			     ULONG nLength,
-			     COORD dwWriteCoord,
-			     PULONG lpNumberOfAttrsWritten)
+ConWriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
+			        ULONG nLength,
+			        COORD dwWriteCoord,
+			        PULONG lpNumberOfAttrsWritten)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   PUSHORT Buffer;
@@ -407,10 +407,10 @@
 
 
 NTSTATUS
-FillConsoleOutputAttribute(USHORT wAttribute,
-			   ULONG nLength,
-			   COORD dwWriteCoord,
-			   PULONG lpNumberOfAttrsWritten)
+ConFillConsoleOutputAttribute(USHORT wAttribute,
+			      ULONG nLength,
+			      COORD dwWriteCoord,
+			      PULONG lpNumberOfAttrsWritten)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_ATTRIBUTE Buffer;
@@ -441,10 +441,10 @@
 
 
 NTSTATUS
-FillConsoleOutputCharacter(CHAR Character,
-			   ULONG Length,
-			   COORD WriteCoord,
-			   PULONG NumberOfCharsWritten)
+ConFillConsoleOutputCharacter(CHAR Character,
+			      ULONG Length,
+			      COORD WriteCoord,
+			      PULONG NumberOfCharsWritten)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   OUTPUT_CHARACTER Buffer;
@@ -562,7 +562,7 @@
 
 
 NTSTATUS
-GetConsoleScreenBufferInfo(PCONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo)
+ConGetConsoleScreenBufferInfo(PCONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status;
@@ -583,7 +583,7 @@
 
 
 NTSTATUS
-SetConsoleCursorInfo(PCONSOLE_CURSOR_INFO lpConsoleCursorInfo)
+ConSetConsoleCursorInfo(PCONSOLE_CURSOR_INFO lpConsoleCursorInfo)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status;
@@ -604,13 +604,13 @@
 
 
 NTSTATUS
-SetConsoleCursorPosition(COORD dwCursorPosition)
+ConSetConsoleCursorPosition(COORD dwCursorPosition)
 {
   CONSOLE_SCREEN_BUFFER_INFO ConsoleScreenBufferInfo;
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status;
 
-  Status = GetConsoleScreenBufferInfo(&ConsoleScreenBufferInfo);
+  Status = ConGetConsoleScreenBufferInfo(&ConsoleScreenBufferInfo);
   if (!NT_SUCCESS(Status))
     return(Status);
 
@@ -633,7 +633,7 @@
 
 
 NTSTATUS
-SetConsoleTextAttribute(USHORT wAttributes)
+ConSetConsoleTextAttribute(USHORT wAttributes)
 {
   IO_STATUS_BLOCK IoStatusBlock;
   NTSTATUS Status;
@@ -661,7 +661,7 @@
 
   while (TRUE)
     {
-      ReadConsoleInput(Buffer);
+      ConReadConsoleInput(Buffer);
 
       if ((Buffer->EventType == KEY_EVENT) &&
 	  (Buffer->Event.KeyEvent.bKeyDown == TRUE))
@@ -675,9 +675,9 @@
 {
   ULONG Written;
 
-  WriteConsole(&c,
-	       1,
-	       &Written);
+  ConWriteConsole(&c,
+	          1,
+	          &Written);
 }
 
 
@@ -686,12 +686,12 @@
 {
   ULONG Written;
 
-  WriteConsole(szText,
-	       strlen(szText),
-	       &Written);
-  WriteConsole("\n",
-	       1,
-	       &Written);
+  ConWriteConsole(szText,
+	          strlen(szText),
+	          &Written);
+  ConWriteConsole("\n",
+	          1,
+	          &Written);
 }
 
 
@@ -706,9 +706,9 @@
   vsprintf(szOut, szFormat, arg_ptr);
   va_end(arg_ptr);
 
-  WriteConsole(szOut,
-	       strlen(szOut),
-	       &dwWritten);
+  ConWriteConsole(szOut,
+	          strlen(szOut),
+	          &dwWritten);
 }
 
 
@@ -720,7 +720,7 @@
 {
   CONSOLE_SCREEN_BUFFER_INFO csbi;
 
-  GetConsoleScreenBufferInfo(&csbi);
+  ConGetConsoleScreenBufferInfo(&csbi);
 
   return(csbi.dwCursorPosition.X);
 }
@@ -731,7 +731,7 @@
 {
   CONSOLE_SCREEN_BUFFER_INFO csbi;
 
-  GetConsoleScreenBufferInfo(&csbi);
+  ConGetConsoleScreenBufferInfo(&csbi);
 
   return(csbi.dwCursorPosition.Y);
 }
@@ -743,7 +743,7 @@
 {
   CONSOLE_SCREEN_BUFFER_INFO csbi;
 
-  GetConsoleScreenBufferInfo(&csbi);
+  ConGetConsoleScreenBufferInfo(&csbi);
 
   if (maxx)
     *maxx = csbi.dwSize.X;
@@ -762,7 +762,7 @@
   cci.dwSize = bInsert ? 10 : 99;
   cci.bVisible = bVisible;
 
-  SetConsoleCursorInfo(&cci);
+  ConSetConsoleCursorInfo(&cci);
 }
 
 
@@ -774,7 +774,7 @@
 
   coPos.X = x;
   coPos.Y = y;
-  SetConsoleCursorPosition(coPos);
+  ConSetConsoleCursorPosition(coPos);
 }
 
 
@@ -896,28 +896,28 @@
       Length = len - 1;
     }
 
-  FillConsoleOutputAttribute(0x70,
-			     len,
-			     coPos,
-			     &Written);
+  ConFillConsoleOutputAttribute(0x70,
+			        len,
+			        coPos,
+			        &Written);
 
-  WriteConsoleOutputCharactersW(Text,
-				Length,
-				coPos);
+  ConWriteConsoleOutputCharactersW(Text,
+				   Length,
+				   coPos);
 
   coPos.X += Length;
-  FillConsoleOutputCharacter('_',
-			     1,
-			     coPos,
-			     &Written);
+  ConFillConsoleOutputCharacter('_',
+			        1,
+			        coPos,
+			        &Written);
 
   if (len > Length + 1)
     {
       coPos.X++;
-      FillConsoleOutputCharacter(' ',
-				 len - Length - 1,
-				 coPos,
-				 &Written);
+      ConFillConsoleOutputCharacter(' ',
+				    len - Length - 1,
+				    coPos,
+				    &Written);
     }
 }
 
@@ -934,15 +934,15 @@
 
   Length = strlen(Text);
 
-  WriteConsoleOutputCharacters(Text,
-			       Length,
-			       coPos);
+  ConWriteConsoleOutputCharacters(Text,
+			          Length,
+			          coPos);
 
   coPos.Y++;
-  FillConsoleOutputCharacter(0xCD,
-			     Length,
-			     coPos,
-			     &Written);
+  ConFillConsoleOutputCharacter(0xCD,
+			        Length,
+			        coPos,
+			        &Written);
 }
 
 
@@ -958,14 +958,14 @@
 
   Length = strlen(Text);
 
-  FillConsoleOutputAttribute(0x71,
-			     Length,
-			     coPos,
-			     &Written);
+  ConFillConsoleOutputAttribute(0x71,
+			        Length,
+			        coPos,
+			        &Written);
 
-  WriteConsoleOutputCharacters(Text,
-			       Length,
-			       coPos);
+  ConWriteConsoleOutputCharacters(Text,
+			          Length,
+			          coPos);
 }
 
 
@@ -981,14 +981,14 @@
 
   Length = strlen(Text);
 
-  FillConsoleOutputAttribute(0x1F,
-			     Length,
-			     coPos,
-			     &Written);
+  ConFillConsoleOutputAttribute(0x1F,
+			        Length,
+			        coPos,
+			        &Written);
 
-  WriteConsoleOutputCharacters(Text,
-			       Length,
-			       coPos);
+  ConWriteConsoleOutputCharacters(Text,
+			          Length,
+			          coPos);
 }
 
 
@@ -1006,9 +1006,9 @@
   coPos.X = x;
   coPos.Y = y;
 
-  WriteConsoleOutputCharacters(buffer,
-			       strlen(buffer),
-			       coPos);
+  ConWriteConsoleOutputCharacters(buffer,
+			          strlen(buffer),
+			          coPos);
 }
 
 
@@ -1034,18 +1034,18 @@
       Length = len - 1;
     }
 
-  WriteConsoleOutputCharacters(buffer,
-			       Length,
-			       coPos);
+  ConWriteConsoleOutputCharacters(buffer,
+			          Length,
+			          coPos);
 
   coPos.X += Length;
 
   if (len > Length)
     {
-      FillConsoleOutputCharacter(' ',
-				 len - Length,
-				 coPos,
-				 &Written);
+      ConFillConsoleOutputCharacter(' ',
+				    len - Length,
+				    coPos,
+				    &Written);
     }
 }
 

Modified: trunk/reactos/subsys/system/usetup/console.h
--- trunk/reactos/subsys/system/usetup/console.h	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/console.h	2005-06-17 09:46:21 UTC (rev 15957)
@@ -29,47 +29,56 @@
 
 #include <ntos/keyboard.h>
 
+#define AllocConsole ConAllocConsole
+#define FreeConsole ConFreeConsole
+#define ReadConsoleOutputCharacters ConReadConsoleOutputCharacters
+#define ReadConsoleOutputAttributes ConReadConsoleOutputAttributes
+#define WriteConsoleOutputCharacters ConWriteConsoleOutputCharacters
+#define WriteConsoleOutputAttributes ConWriteConsoleOutputAttributes
+#define FillConsoleOutputAttribute ConFillConsoleOutputAttribute
+#undef FillConsoleOutputCharacter
+#define FillConsoleOutputCharacter ConFillConsoleOutputCharacter
 
 NTSTATUS
-AllocConsole(VOID);
+ConAllocConsole(VOID);
 
 VOID
-FreeConsole(VOID);
+ConFreeConsole(VOID);
 
 
 NTSTATUS
-ReadConsoleOutputCharacters(LPSTR lpCharacter,
-			    ULONG nLength,
-			    COORD dwReadCoord,
-			    PULONG lpNumberOfCharsRead);
+ConReadConsoleOutputCharacters(LPSTR lpCharacter,
+			       ULONG nLength,
+			       COORD dwReadCoord,
+			       PULONG lpNumberOfCharsRead);
 
 NTSTATUS
-ReadConsoleOutputAttributes(PUSHORT lpAttribute,
-			    ULONG nLength,
-			    COORD dwReadCoord,
-			    PULONG lpNumberOfAttrsRead);
+ConReadConsoleOutputAttributes(PUSHORT lpAttribute,
+			       ULONG nLength,
+			       COORD dwReadCoord,
+			       PULONG lpNumberOfAttrsRead);
 
 NTSTATUS
-WriteConsoleOutputCharacters(LPCSTR lpCharacter,
-			     ULONG nLength,
-			     COORD dwWriteCoord);
+ConWriteConsoleOutputCharacters(LPCSTR lpCharacter,
+			        ULONG nLength,
+			        COORD dwWriteCoord);
 
 NTSTATUS
-WriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
-			     ULONG nLength,
-			     COORD dwWriteCoord,
-			     PULONG lpNumberOfAttrsWritten);
+ConWriteConsoleOutputAttributes(CONST USHORT *lpAttribute,
+			        ULONG nLength,
+			        COORD dwWriteCoord,
+			        PULONG lpNumberOfAttrsWritten);
 
 NTSTATUS
-FillConsoleOutputAttribute(USHORT wAttribute,
-			   ULONG nLength,
-			   COORD dwWriteCoord,
-			   PULONG lpNumberOfAttrsWritten);
+ConFillConsoleOutputAttribute(USHORT wAttribute,
+			      ULONG nLength,
+			      COORD dwWriteCoord,
+			      PULONG lpNumberOfAttrsWritten);
 NTSTATUS
-FillConsoleOutputCharacter(CHAR Character,
-			   ULONG Length,
-			   COORD WriteCoord,
-			   PULONG NumberOfCharsWritten);
+ConFillConsoleOutputCharacter(CHAR Character,
+			      ULONG Length,
+			      COORD WriteCoord,
+			      PULONG NumberOfCharsWritten);
 
 #if 0
 NTSTATUS

Modified: trunk/reactos/subsys/system/usetup/filesup.c
--- trunk/reactos/subsys/system/usetup/filesup.c	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/filesup.c	2005-06-17 09:46:21 UTC (rev 15957)
@@ -44,7 +44,7 @@
 static WCHAR CurrentCabinetName[MAX_PATH];
 
 NTSTATUS
-CreateDirectory(PWCHAR DirectoryName)
+SetupCreateDirectory(PWCHAR DirectoryName)
 {
   OBJECT_ATTRIBUTES ObjectAttributes;
   IO_STATUS_BLOCK IoStatusBlock;

Modified: trunk/reactos/subsys/system/usetup/filesup.h
--- trunk/reactos/subsys/system/usetup/filesup.h	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/filesup.h	2005-06-17 09:46:21 UTC (rev 15957)
@@ -28,7 +28,7 @@
 #define __FILESUP_H__
 
 NTSTATUS
-CreateDirectory(PWCHAR DirectoryName);
+SetupCreateDirectory(PWCHAR DirectoryName);
 
 NTSTATUS
 SetupCopyFile(PWCHAR SourceFileName,

Modified: trunk/reactos/subsys/system/usetup/precomp.h
--- trunk/reactos/subsys/system/usetup/precomp.h	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/precomp.h	2005-06-17 09:46:21 UTC (rev 15957)
@@ -1 +1 @@
-#include <ddk/ntddk.h>
+#include <ntos.h>

Modified: trunk/reactos/subsys/system/usetup/usetup.c
--- trunk/reactos/subsys/system/usetup/usetup.c	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/usetup.c	2005-06-17 09:46:21 UTC (rev 15957)
@@ -536,7 +536,7 @@
  *	Number of the next page.
  */
 static PAGE_NUMBER
-StartPage(PINPUT_RECORD Ir)
+SetupStartPage(PINPUT_RECORD Ir)
 {
   SYSTEM_DEVICE_INFORMATION Sdi;
   NTSTATUS Status;
@@ -2896,7 +2896,7 @@
     }
 
   /* Create the install directory */
-  Status = CreateDirectory(PathBuffer);
+  Status = SetupCreateDirectory(PathBuffer);
   if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_NAME_COLLISION)
     {
       DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
@@ -2967,7 +2967,7 @@
 
 	  DPRINT("FullPath: '%S'\n", PathBuffer);
 
-	  Status = CreateDirectory(PathBuffer);
+	  Status = SetupCreateDirectory(PathBuffer);
 	  if (!NT_SUCCESS(Status) && Status != STATUS_OBJECT_NAME_COLLISION)
 	    {
 	      DPRINT("Creating directory '%S' failed: Status = 0x%08lx", PathBuffer, Status);
@@ -3808,7 +3808,7 @@
 	{
 	  /* Start page */
 	  case START_PAGE:
-	    Page = StartPage(&Ir);
+	    Page = SetupStartPage(&Ir);
 	    break;
 
 	  /* License page */

Modified: trunk/reactos/subsys/system/usetup/usetup.xml
--- trunk/reactos/subsys/system/usetup/usetup.xml	2005-06-17 09:46:03 UTC (rev 15956)
+++ trunk/reactos/subsys/system/usetup/usetup.xml	2005-06-17 09:46:21 UTC (rev 15957)
@@ -2,7 +2,9 @@
 	<bootstrap base="reactos/system32" nameoncd="smss.exe" />
 	<include base="usetup">.</include>
 	<include base="zlib">.</include>
+	<define name="__USE_W32API" />
 	<define name="_DISABLE_TIDENTS" />
+	<define name="_WIN32_WINNT">0x0502</define>
 	<linkerflag>-lgcc</linkerflag>
 	<library>zlib</library>
 	<library>vfatlib</library>