mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- userinit, usetup, vmwinst, welcome, winefile, winlogon, winver.
svn path=/trunk/; revision=20707
This commit is contained in:
parent
df61d0f1b6
commit
a3a142a962
5 changed files with 22 additions and 15 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <cfgmgr32.h>
|
||||
#include "resource.h"
|
||||
|
||||
#define CMP_MAGIC 0x01234567
|
||||
|
||||
/* GLOBALS ******************************************************************/
|
||||
|
||||
|
|
|
@ -67,12 +67,12 @@ static PVOID CabinetReservedArea = NULL;
|
|||
|
||||
/* 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);
|
||||
}
|
||||
|
|
|
@ -505,6 +505,9 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
|||
PWCHAR ServiceName;
|
||||
ULONG StartValue;
|
||||
NTSTATUS Status;
|
||||
WCHAR RegPath [255];
|
||||
PWCHAR Buffer;
|
||||
ULONG Width, Hight, Bpp;
|
||||
|
||||
DPRINT("ProcessDisplayRegistry() called\n");
|
||||
|
||||
|
@ -546,16 +549,14 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
|||
}
|
||||
|
||||
/* 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 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
|||
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 @@ ProcessDisplayRegistry(HINF InfFile, PGENERIC_LIST List)
|
|||
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",
|
||||
|
|
|
@ -77,9 +77,14 @@ DetectVMware(int *Version)
|
|||
|
||||
/* 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)
|
||||
{
|
||||
|
@ -485,6 +490,7 @@ PageWelcomeProc(
|
|||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_NOTIFY:
|
||||
|
@ -495,7 +501,6 @@ PageWelcomeProc(
|
|||
hwndControl = GetParent(hwndDlg);
|
||||
CenterWindow (hwndControl);
|
||||
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
switch(pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
|
@ -822,6 +827,7 @@ PageConfigProc(
|
|||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
|
@ -860,7 +866,6 @@ PageConfigProc(
|
|||
hwndControl = GetParent(hwndDlg);
|
||||
CenterWindow (hwndControl);
|
||||
|
||||
LPNMHDR pnmh = (LPNMHDR)lParam;
|
||||
switch(pnmh->code)
|
||||
{
|
||||
case PSN_SETACTIVE:
|
||||
|
|
|
@ -1125,7 +1125,7 @@ static int TypeOrderFromDirname(LPCTSTR name)
|
|||
}
|
||||
|
||||
/* 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 compareType(const WIN32_FIND_DATA* fd1, const WIN32_FIND_DATA* fd2)
|
|||
}
|
||||
|
||||
|
||||
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 @@ static int compareName(const void* arg1, const void* arg2)
|
|||
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 @@ static int compareExt(const void* arg1, const void* arg2)
|
|||
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 @@ static int compareSize(const void* arg1, const void* arg2)
|
|||
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 compareDate(const void* arg1, const void* arg2)
|
|||
}
|
||||
|
||||
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue