- userinit, usetup, vmwinst, welcome, winefile, winlogon, winver.
Modified: trunk/reactos/subsys/system/userinit/userinit.c
Modified: trunk/reactos/subsys/system/usetup/cabinet.c
Modified: trunk/reactos/subsys/system/usetup/settings.c
Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c
Modified: trunk/reactos/subsys/system/winefile/winefile.c

Modified: trunk/reactos/subsys/system/userinit/userinit.c
--- trunk/reactos/subsys/system/userinit/userinit.c	2006-01-08 10:19:21 UTC (rev 20706)
+++ trunk/reactos/subsys/system/userinit/userinit.c	2006-01-08 10:23:23 UTC (rev 20707)
@@ -26,6 +26,7 @@
 #include <cfgmgr32.h>
 #include "resource.h"
 
+#define CMP_MAGIC  0x01234567
 
 /* GLOBALS ******************************************************************/
 

Modified: trunk/reactos/subsys/system/usetup/cabinet.c
--- trunk/reactos/subsys/system/usetup/cabinet.c	2006-01-08 10:19:21 UTC (rev 20706)
+++ trunk/reactos/subsys/system/usetup/cabinet.c	2006-01-08 10:23:23 UTC (rev 20707)
@@ -67,12 +67,12 @@
 
 /* Needed by zlib, but we don't want the dependency on msvcrt.dll */
 
-void free(void* _ptr)
+void __cdecl free(void* _ptr)
 {
   RtlFreeHeap(ProcessHeap, 0, _ptr);
 }
 
-void* calloc(size_t _nmemb, size_t _size)
+void* __cdecl calloc(size_t _nmemb, size_t _size)
 {
   return (void*)RtlAllocateHeap (ProcessHeap, HEAP_ZERO_MEMORY, _size);
 }

Modified: trunk/reactos/subsys/system/usetup/settings.c
--- trunk/reactos/subsys/system/usetup/settings.c	2006-01-08 10:19:21 UTC (rev 20706)
+++ trunk/reactos/subsys/system/usetup/settings.c	2006-01-08 10:23:23 UTC (rev 20707)
@@ -505,6 +505,9 @@
   PWCHAR ServiceName;
   ULONG StartValue;
   NTSTATUS Status;
+  WCHAR RegPath [255];
+  PWCHAR Buffer;
+  ULONG Width, Hight, Bpp;
 
   DPRINT("ProcessDisplayRegistry() called\n");
 
@@ -546,16 +549,14 @@
     }
 
   /* Set the resolution */
-  WCHAR RegPath [255];
   swprintf(RegPath, L"\\Registry\\Machine\\System\\CurrentControlSet\\Hardware Profiles\\Current\\System\\CurrentControlSet\\Services\\%s\\Device0", ServiceName);
 
-  PWCHAR Buffer;
   if (!InfGetDataField(Context, 4, &Buffer))
     {
       DPRINT("InfGetDataField() failed\n");
       return FALSE;
     }
-  ULONG Width = wcstoul(Buffer, NULL, 10);
+  Width = wcstoul(Buffer, NULL, 10);
   Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
 				 RegPath, 
 				 L"DefaultSettings.XResolution",
@@ -574,7 +575,7 @@
       DPRINT("InfGetDataField() failed\n");
       return FALSE;
     }
-  ULONG Hight = wcstoul(Buffer, 0, 0);
+  Hight = wcstoul(Buffer, 0, 0);
   Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
 				 RegPath,
 				 L"DefaultSettings.YResolution",
@@ -592,7 +593,7 @@
       DPRINT("InfGetDataField() failed\n");
       return FALSE;
     }
-  ULONG Bpp = wcstoul(Buffer, 0, 0);
+  Bpp = wcstoul(Buffer, 0, 0);
   Status = RtlWriteRegistryValue(RTL_REGISTRY_ABSOLUTE,
 				 RegPath,
 				 L"DefaultSettings.BitsPerPel",

Modified: trunk/reactos/subsys/system/vmwinst/vmwinst.c
--- trunk/reactos/subsys/system/vmwinst/vmwinst.c	2006-01-08 10:19:21 UTC (rev 20706)
+++ trunk/reactos/subsys/system/vmwinst/vmwinst.c	2006-01-08 10:23:23 UTC (rev 20707)
@@ -77,10 +77,15 @@
 
   /* Try using a VMware I/O port. If not running in VMware this'll throw an
      exception! */
+#ifndef _MSC_VER
   __asm__ __volatile__("inl  %%dx, %%eax"
     : "=a" (ver), "=b" (magic)
     : "0" (0x564d5868), "d" (0x5658), "c" (0xa));
+#else
+#error PLEASE WRITE THIS IN ASSEMBLY
+#endif
 
+
   if(magic == 0x564d5868)
   {
     *Version = ver;
@@ -485,6 +490,7 @@
   LPARAM lParam
 )
 {
+  LPNMHDR pnmh = (LPNMHDR)lParam;
   switch(uMsg)
   {
     case WM_NOTIFY:
@@ -495,7 +501,6 @@
       hwndControl = GetParent(hwndDlg);
       CenterWindow (hwndControl);
 
-      LPNMHDR pnmh = (LPNMHDR)lParam;
       switch(pnmh->code)
       {
         case PSN_SETACTIVE:
@@ -822,6 +827,7 @@
   LPARAM lParam
 )
 {
+  LPNMHDR pnmh = (LPNMHDR)lParam;
   switch(uMsg)
   {
     case WM_INITDIALOG:
@@ -860,7 +866,6 @@
       hwndControl = GetParent(hwndDlg);
       CenterWindow (hwndControl);
 
-      LPNMHDR pnmh = (LPNMHDR)lParam;
       switch(pnmh->code)
       {
         case PSN_SETACTIVE:

Modified: trunk/reactos/subsys/system/winefile/winefile.c
--- trunk/reactos/subsys/system/winefile/winefile.c	2006-01-08 10:19:21 UTC (rev 20706)
+++ trunk/reactos/subsys/system/winefile/winefile.c	2006-01-08 10:23:23 UTC (rev 20707)
@@ -1125,7 +1125,7 @@
 }
 
 /* directories first... */
-static int compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
+static int __cdecl compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
 {
 	int order1 = fd1->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
 	int order2 = fd2->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY? TO_DIR: TO_FILE;
@@ -1140,7 +1140,7 @@
 }
 
 
-static int compareName(const void* arg1, const void* arg2)
+static int __cdecl compareName(const void* arg1, const void* arg2)
 {
 	const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
 	const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@@ -1152,7 +1152,7 @@
 	return lstrcmpi(fd1->cFileName, fd2->cFileName);
 }
 
-static int compareExt(const void* arg1, const void* arg2)
+static int __cdecl compareExt(const void* arg1, const void* arg2)
 {
 	const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
 	const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@@ -1185,7 +1185,7 @@
 	return lstrcmpi(name1, name2);
 }
 
-static int compareSize(const void* arg1, const void* arg2)
+static int __cdecl compareSize(const void* arg1, const void* arg2)
 {
 	const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
 	const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@@ -1206,7 +1206,7 @@
 	return cmp<0? -1: cmp>0? 1: 0;
 }
 
-static int compareDate(const void* arg1, const void* arg2)
+static int __cdecl compareDate(const void* arg1, const void* arg2)
 {
 	const WIN32_FIND_DATA* fd1 = &(*(const Entry* const*)arg1)->data;
 	const WIN32_FIND_DATA* fd2 = &(*(const Entry* const*)arg2)->data;
@@ -1219,7 +1219,7 @@
 }
 
 
-static int (*sortFunctions[])(const void* arg1, const void* arg2) = {
+static int (__cdecl *sortFunctions[])(const void* arg1, const void* arg2) = {
 	compareName,	/* SORT_NAME */
 	compareExt,		/* SORT_EXT */
 	compareSize,	/* SORT_SIZE */