2 added + 128 modified, total 130 files
reactos/bootdata
diff -u -r1.10 -r1.10.2.1
--- hivedef.inf 19 Jun 2004 07:56:16 -0000 1.10
+++ hivedef.inf 30 Jun 2004 21:15:59 -0000 1.10.2.1
@@ -11,6 +11,8 @@
HKCU,"Control Panel\International","Locale",0x00000000,"0409"
HKCU,"Environment",,0x00000012
+HKCU,"Environment","TEMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
+HKCU,"Environment","TMP",0x00020000,"%USERPROFILE%\Local Settings\Temp"
HKCU,"SOFTWARE",,0x00000012
HKCU,"SOFTWARE\Microsoft",,0x00000012
reactos/bootdata
diff -u -r1.28 -r1.28.2.1
--- hivesft.inf 19 Jun 2004 07:56:16 -0000 1.28
+++ hivesft.inf 30 Jun 2004 21:16:00 -0000 1.28.2.1
@@ -3,27 +3,27 @@
[AddReg]
-; Version Information
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"4.0"
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 6"
-HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"1381"
-
; Common shell folder settings
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Desktop",0x00020000,"%ALLUSERSPROFILE%\Desktop"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common AppData",0x00020000,"%ALLUSERSPROFILE%\Application Data"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Programs",0x00020000,"%ALLUSERSPROFILE%\Start Menu\Programs"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Documents",0x00020000,"%ALLUSERSPROFILE%\All Users\Documents"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Desktop",0x00020000,"%ALLUSERSPROFILE%\All Users\Desktop"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Start Menu",0x00020000,"%ALLUSERSPROFILE%\All Users\Start Menu"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonPictures",0x00020000,"%ALLUSERSPROFILE%\All Users\Documents\My Pictures"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonMusic",0x00020000,"%ALLUSERSPROFILE%\All Users\Documents\My Music"
-HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonVideo",0x00020000,"%ALLUSERSPROFILE%\All Users\Documents\My Videos"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Documents",0x00020000,"%ALLUSERSPROFILE%\Documents"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Desktop",0x00020000,"%ALLUSERSPROFILE%\Desktop"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Start Menu",0x00020000,"%ALLUSERSPROFILE%\Start Menu"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonPictures",0x00020000,"%ALLUSERSPROFILE%\Documents\My Pictures"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonMusic",0x00020000,"%ALLUSERSPROFILE%\Documents\My Music"
+HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","CommonVideo",0x00020000,"%ALLUSERSPROFILE%\Documents\My Videos"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Favorites",0x00020000,"%ALLUSERSPROFILE%\Favorites"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Startup",0x00020000,"%ALLUSERSPROFILE%\Start Menu\Programs\Startup"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Administrative Tools",0x00020000,"%ALLUSERSPROFILE%\Start Menu\Programs\Administrative Tools"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Common Templates",0x00020000,"%ALLUSERSPROFILE%\Templates"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Personal",0x00020000,"%ALLUSERSPROFILE%\My Documents"
+; Version Information
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"4.0"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 6"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"1381"
+
; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loadlib.exe","GlobalFlag",0x00000000,"0x00000002"
;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00000000,"0x00000002"
@@ -49,5 +49,7 @@
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes","Marlett",0x00000000,"TGMarlett"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes","Times New Roman",0x00000000,"Bitstream Vera Serif"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes","MS Sans Serif",0x00000000,"Bitstream Vera Sans"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes","MS Shell Dlg",0x00000000,"Bitstream Vera Sans"
+HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SysFontSubstitutes","MS Shell Dlg 2",0x00000000,"Bitstream Vera Sans"
; EOF
reactos/bootdata/packages
diff -u -r1.33 -r1.33.4.1
--- reactos.dff 4 Jun 2004 13:30:27 -0000 1.33
+++ reactos.dff 30 Jun 2004 21:16:01 -0000 1.33.4.1
@@ -51,6 +51,9 @@
drivers\net\dd\ne2000\ne2000.sys 2
lib\advapi32\advapi32.dll 1
lib\cards\cards.dll 1
+lib\cpl\appwiz\appwiz.cpl 1
+lib\cpl\control\control.exe 1
+lib\cpl\sysdm\sysdm.cpl 1
lib\comctl32\comctl32.dll 1
lib\comdlg32\comdlg32.dll 1
lib\crtdll\crtdll.dll 1
@@ -106,6 +109,7 @@
subsys\system\autochk\autochk.exe 1
subsys\system\cmd\cmd.exe 1
subsys\system\explorer\explorer.exe 4
+subsys\system\explorer\explorer-cfg-template.xml 4
subsys\system\explorer\notifyhook.dll 1
subsys\system\format\format.exe 1
subsys\system\regedit\regedit.exe 4
reactos/drivers/dd
diff -u -r1.1 -r1.1.6.1
--- Makefile 12 Apr 2004 12:08:53 -0000 1.1
+++ Makefile 30 Jun 2004 21:16:01 -0000 1.1.6.1
@@ -6,7 +6,7 @@
include $(PATH_TO_TOP)/rules.mak
-DRIVERS = beep blue bootvid debugout floppy ide null serial
+DRIVERS = beep blue bootvid debugout null serial
all: $(DRIVERS)
reactos/drivers/fs/vfat
diff -u -r1.67.8.1 -r1.67.8.2
--- create.c 27 Jun 2004 01:13:11 -0000 1.67.8.1
+++ create.c 30 Jun 2004 21:16:01 -0000 1.67.8.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: create.c,v 1.67.8.1 2004/06/27 01:13:11 hyperion Exp $
+/* $Id: create.c,v 1.67.8.2 2004/06/30 21:16:01 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: drivers/fs/vfat/create.c
reactos/drivers/fs/vfat
diff -u -r1.31.2.1 -r1.31.2.2
--- fsctl.c 27 Jun 2004 01:13:11 -0000 1.31.2.1
+++ fsctl.c 30 Jun 2004 21:16:01 -0000 1.31.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: fsctl.c,v 1.31.2.1 2004/06/27 01:13:11 hyperion Exp $
+/* $Id: fsctl.c,v 1.31.2.2 2004/06/30 21:16:01 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/drivers/fs/vfat
diff -u -r1.63.6.1 -r1.63.6.2
--- vfat.h 27 Jun 2004 01:13:11 -0000 1.63.6.1
+++ vfat.h 30 Jun 2004 21:16:01 -0000 1.63.6.2
@@ -1,4 +1,4 @@
-/* $Id: vfat.h,v 1.63.6.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: vfat.h,v 1.63.6.2 2004/06/30 21:16:01 hyperion Exp $ */
#include <ddk/ntifs.h>
reactos/drivers/storage
diff -u -r1.3 -r1.3.6.1
--- Makefile 12 Apr 2004 13:13:38 -0000 1.3
+++ Makefile 30 Jun 2004 21:16:02 -0000 1.3.6.1
@@ -6,7 +6,7 @@
include $(PATH_TO_TOP)/rules.mak
-DRIVERS = atapi cdrom class2 disk diskdump scsiport
+DRIVERS = atapi cdrom class2 disk diskdump floppy scsiport
all: $(DRIVERS)
reactos/drivers/video/displays/framebuf
diff -u -r1.2 -r1.2.12.1
--- palette.c 13 Jan 2004 19:45:31 -0000 1.2
+++ palette.c 30 Jun 2004 21:16:02 -0000 1.2.12.1
@@ -36,9 +36,9 @@
{ 0x00, 0x80, 0x80, 0x00 },
{ 0xC0, 0xC0, 0xC0, 0x00 },
{ 0xC0, 0xDC, 0xC0, 0x00 },
- { 0xA6, 0xCA, 0xF0, 0x00 },
+ { 0xD4, 0xD0, 0xC8, 0x00 },
{ 0xFF, 0xFB, 0xF0, 0x00 },
- { 0xA0, 0xA0, 0xA4, 0x00 },
+ { 0x3A, 0x6E, 0xA5, 0x00 },
{ 0x80, 0x80, 0x80, 0x00 },
{ 0xFF, 0x00, 0x00, 0x00 },
{ 0x00, 0xFF, 0x00, 0x00 },
reactos/drivers/video/displays/framebuf
diff -u -r1.2 -r1.2.8.1
--- screen.c 22 Feb 2004 22:19:48 -0000 1.2
+++ screen.c 30 Jun 2004 21:16:02 -0000 1.2.8.1
@@ -162,6 +162,7 @@
{
continue;
}
+
if (pDevMode->dmPelsWidth == ModeInfoPtr->VisScreenWidth &&
pDevMode->dmPelsHeight == ModeInfoPtr->VisScreenHeight &&
pDevMode->dmBitsPerPel == (ModeInfoPtr->BitsPerPlane *
@@ -171,6 +172,8 @@
SelectedMode = ModeInfoPtr;
break;
}
+
+ ModeInfoPtr++;
}
}
reactos/drivers/video/miniport/vbe
diff -u -r1.13 -r1.13.2.1
--- vbemp.c 20 Jun 2004 16:37:15 -0000 1.13
+++ vbemp.c 30 Jun 2004 21:16:02 -0000 1.13.2.1
@@ -1,8 +1,10 @@
/*
* ReactOS VBE miniport video driver
- *
* Copyright (C) 2004 Filip Navara
*
+ * Power Management and VBE 1.2 support
+ * Copyright (C) 2004 Magnus Olsen
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -19,7 +21,8 @@
*
* TODO:
* - Check input parameters everywhere.
- * - Implement power management support.
+ * - Call VideoPortVerifyAccessRanges to reserve the memory we're about
+ * to map.
*/
/* INCLUDES *******************************************************************/
@@ -47,267 +50,241 @@
}
/*
- * InitializeVideoAddressSpace
+ * VBEFindAdapter
*
- * This function maps the BIOS memory into out virtual address space and
- * setups real-mode interrupt table.
+ * Should detect a VBE compatible display adapter, but it's not possible
+ * to use video port Int 10 services at this time during initialization,
+ * so we always return NO_ERROR and do the real work in VBEInitialize.
*/
-BOOL FASTCALL
-InitializeVideoAddressSpace(VOID)
+VP_STATUS STDCALL
+VBEFindAdapter(
+ IN PVOID HwDeviceExtension,
+ IN PVOID HwContext,
+ IN PWSTR ArgumentString,
+ IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
+ OUT PUCHAR Again)
{
- NTSTATUS Status;
- PVOID BaseAddress;
- PVOID NullAddress;
- ULONG ViewSize;
- CHAR IVT[1024];
- CHAR BDA[256];
- LARGE_INTEGER Offset;
- OBJECT_ATTRIBUTES ObjectAttributes;
- UNICODE_STRING PhysMemName;
- HANDLE PhysMemHandle;
-
- /*
- * Open the physical memory section
- */
-
- RtlInitUnicodeString(&PhysMemName, L"\\Device\\PhysicalMemory");
- InitializeObjectAttributes(&ObjectAttributes, &PhysMemName, 0, NULL, NULL);
- Status = ZwOpenSection(&PhysMemHandle, SECTION_ALL_ACCESS, &ObjectAttributes);
- if (!NT_SUCCESS(Status))
- {
- DPRINT(("VBEMP: Couldn't open \\Device\\PhysicalMemory\n"));
- return FALSE;
- }
-
- /*
- * Map the BIOS and device registers into the address space
- */
+ return NO_ERROR;
+}
- Offset.QuadPart = 0xa0000;
- ViewSize = 0x30000;
- BaseAddress = (PVOID)0xa0000;
- Status = NtMapViewOfSection(PhysMemHandle, NtCurrentProcess(), &BaseAddress,
- 0, 8192, &Offset, &ViewSize, ViewUnmap, 0, PAGE_EXECUTE_READWRITE);
- if (!NT_SUCCESS(Status))
- {
- DPRINT(("VBEMP: Couldn't map physical memory (%x)\n", Status));
- NtClose(PhysMemHandle);
- return FALSE;
- }
- NtClose(PhysMemHandle);
- if (BaseAddress != (PVOID)0xa0000)
- {
- DPRINT(("VBEMP: Couldn't map physical memory at the right address "
- "(was %x)\n", BaseAddress));
- return FALSE;
- }
+/*
+ * VBESortModesCallback
+ *
+ * Helper function for sorting video mode list.
+ */
+static int
+VBESortModesCallback(PVBE_MODEINFO VbeModeInfoA, PVBE_MODEINFO VbeModeInfoB)
+{
+ DPRINT(("VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
+ VbeModeInfoA->XResolution, VbeModeInfoA->YResolution,
+ VbeModeInfoA->BitsPerPixel,
+ VbeModeInfoB->XResolution, VbeModeInfoB->YResolution,
+ VbeModeInfoB->BitsPerPixel));
+
/*
- * Map some memory to use for the non-BIOS parts of the v86 mode address
- * space
+ * FIXME: Until some reasonable method for changing video modes will
+ * be available we favor more bits per pixel. It should be changed
+ * later.
*/
+ if (VbeModeInfoA->BitsPerPixel < VbeModeInfoB->BitsPerPixel) return 1;
+ if (VbeModeInfoA->BitsPerPixel > VbeModeInfoB->BitsPerPixel) return -1;
+ if (VbeModeInfoA->XResolution < VbeModeInfoB->XResolution) return -1;
+ if (VbeModeInfoA->XResolution > VbeModeInfoB->XResolution) return 1;
+ if (VbeModeInfoA->YResolution < VbeModeInfoB->YResolution) return -1;
+ if (VbeModeInfoA->YResolution > VbeModeInfoB->YResolution) return 1;
+ return 0;
+}
- BaseAddress = (PVOID)0x1;
- ViewSize = 0x20000;
- Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
- &BaseAddress,
- 0,
- &ViewSize,
- MEM_COMMIT,
- PAGE_EXECUTE_READWRITE);
- if (!NT_SUCCESS(Status))
- {
- DPRINT(("VBEMP: Failed to allocate virtual memory (Status %x)\n", Status));
- return FALSE;
- }
- if (BaseAddress != (PVOID)0x0)
- {
- DPRINT(("VBEMP: Failed to allocate virtual memory at right address "
- "(was %x)\n", BaseAddress));
- return FALSE;
- }
+/*
+ * VBESortModes
+ *
+ * Simple function for sorting the video mode list. Uses bubble sort.
+ */
- /*
- * Get the real mode IVT from the kernel
- */
+VOID FASTCALL
+VBESortModes(PVBE_DEVICE_EXTENSION DeviceExtension)
+{
+ BOOLEAN Finished = FALSE;
+ ULONG Pos;
+ int Result;
+ VBE_MODEINFO TempModeInfo;
+ WORD TempModeNumber;
- Status = NtVdmControl(0, IVT);
- if (!NT_SUCCESS(Status))
+ while (!Finished)
{
- DPRINT(("VBEMP: NtVdmControl failed (status %x)\n", Status));
- return 0;
- }
-
- /*
- * Copy the real mode IVT into the right place
- */
-
- NullAddress = (PVOID)0x0; /* Workaround for GCC 3.4 */
- VideoPortMoveMemory(NullAddress, IVT, 1024);
-
- /*
- * Get the BDA from the kernel
- */
+ Finished = TRUE;
+ for (Pos = 0; Pos < DeviceExtension->ModeCount - 1; Pos++)
+ {
+ Result = VBESortModesCallback(
+ DeviceExtension->ModeInfo + Pos,
+ DeviceExtension->ModeInfo + Pos + 1);
+ if (Result > 0)
+ {
+ Finished = FALSE;
- Status = NtVdmControl(1, BDA);
- if (!NT_SUCCESS(Status))
- {
- DPRINT(("VBEMP: NtVdmControl failed (status %x)\n", Status));
- return FALSE;
+ VideoPortMoveMemory(
+ &TempModeInfo,
+ DeviceExtension->ModeInfo + Pos,
+ sizeof(VBE_MODEINFO));
+ TempModeNumber = DeviceExtension->ModeNumbers[Pos];
+
+ VideoPortMoveMemory(
+ DeviceExtension->ModeInfo + Pos,
+ DeviceExtension->ModeInfo + Pos + 1,
+ sizeof(VBE_MODEINFO));
+ DeviceExtension->ModeNumbers[Pos] =
+ DeviceExtension->ModeNumbers[Pos + 1];
+
+ VideoPortMoveMemory(
+ DeviceExtension->ModeInfo + Pos + 1,
+ &TempModeInfo,
+ sizeof(VBE_MODEINFO));
+ DeviceExtension->ModeNumbers[Pos + 1] = TempModeNumber;
+ }
+ }
}
-
- /*
- * Copy the BDA into the right place
- */
-
- VideoPortMoveMemory((PVOID)0x400, BDA, 256);
-
- return TRUE;
}
-VP_STATUS STDCALL
-VBEFindAdapter(
- IN PVOID HwDeviceExtension,
- IN PVOID HwContext,
- IN PWSTR ArgumentString,
- IN OUT PVIDEO_PORT_CONFIG_INFO ConfigInfo,
- OUT PUCHAR Again)
+/*
+ * VBEInitialize
+ *
+ * Performs the first initialization of the adapter, after the HAL has given
+ * up control of the video hardware to the video port driver.
+ *
+ * This function performs these steps:
+ * - Gets global VBE information and finds if VBE BIOS is present.
+ * - Builds the internal mode list using the list of modes provided by
+ * the VBE.
+ */
+
+BOOLEAN STDCALL
+VBEInitialize(PVOID HwDeviceExtension)
{
- KV86M_REGISTERS BiosRegisters;
- DWORD ViewSize;
- NTSTATUS Status;
- PVBE_INFO VbeInfo;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
+ VP_STATUS Status;
PVBE_DEVICE_EXTENSION VBEDeviceExtension =
(PVBE_DEVICE_EXTENSION)HwDeviceExtension;
+ ULONG Length;
+ ULONG ModeCount;
+ ULONG SuitableModeCount;
+ USHORT ModeTemp;
+ ULONG CurrentMode;
+ PVBE_MODEINFO VbeModeInfo;
/*
- * Map the BIOS parts of memory into our memory space and intitalize
- * the real mode interrupt table.
+ * Get the Int 10 interface that we will use for allocating real
+ * mode memory and calling the video BIOS.
*/
- InitializeVideoAddressSpace();
+ VBEDeviceExtension->Int10Interface.Version = VIDEO_PORT_INT10_INTERFACE_VERSION_1;
+ VBEDeviceExtension->Int10Interface.Size = sizeof(VIDEO_PORT_INT10_INTERFACE);
+ Status = VideoPortQueryServices(
+ HwDeviceExtension,
+ VideoPortServicesInt10,
+ (PINTERFACE)&VBEDeviceExtension->Int10Interface);
+ if (Status != NO_ERROR)
+ {
+ DPRINT(("Failed to get Int 10 service functions (Status %x)\n", Status));
+ return FALSE;
+ }
+
/*
* Allocate a bit of memory that will be later used for VBE transport
* buffer. This memory must be accessible from V86 mode so it must fit
* in the first megabyte of physical memory.
*/
- VBEDeviceExtension->TrampolineMemory = (PVOID)0x20000;
- ViewSize = 0x400;
- Status = ZwAllocateVirtualMemory(NtCurrentProcess(),
- (PVOID*)&VBEDeviceExtension->TrampolineMemory, 0, &ViewSize, MEM_COMMIT,
- PAGE_EXECUTE_READWRITE);
- if (!NT_SUCCESS(Status))
+ Length = 0x400;
+ Status = VBEDeviceExtension->Int10Interface.Int10AllocateBuffer(
+ VBEDeviceExtension->Int10Interface.Context,
+ &VBEDeviceExtension->TrampolineMemorySegment,
+ &VBEDeviceExtension->TrampolineMemoryOffset,
+ &Length);
+
+ if (Status != NO_ERROR)
{
DPRINT(("Failed to allocate virtual memory (Status %x)\n", Status));
- return 0;
- }
- if (VBEDeviceExtension->TrampolineMemory > (PVOID)(0x100000 - 0x400))
- {
- DPRINT(("Failed to allocate virtual memory at right address "
- "(was %x)\n", VBEDeviceExtension->TrampolineMemory));
- return 0;
+ return FALSE;
}
- VBEDeviceExtension->PhysicalAddress.QuadPart =
- (UINT_PTR)VBEDeviceExtension->TrampolineMemory;
/*
* Get the VBE general information.
*/
- VbeInfo = (PVBE_INFO)VBEDeviceExtension->TrampolineMemory;
- VideoPortMoveMemory(VbeInfo->Signature, "VBE2", 4);
+ VBEDeviceExtension->Int10Interface.Int10WriteMemory(
+ VBEDeviceExtension->Int10Interface.Context,
+ VBEDeviceExtension->TrampolineMemorySegment,
+ VBEDeviceExtension->TrampolineMemoryOffset,
+ "VBE2",
+ 4);
+
VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
- BiosRegisters.Eax = 0x4F00;
- BiosRegisters.Edi = VBEDeviceExtension->PhysicalAddress.QuadPart & 0xFF;
- BiosRegisters.Es = VBEDeviceExtension->PhysicalAddress.QuadPart >> 4;
- Ke386CallBios(0x10, &BiosRegisters);
- if (BiosRegisters.Eax == 0x4F)
+ BiosRegisters.Eax = VBE_GET_CONTROLLER_INFORMATION;
+ BiosRegisters.Edi = VBEDeviceExtension->TrampolineMemoryOffset;
+ BiosRegisters.SegEs = VBEDeviceExtension->TrampolineMemorySegment;
+ VBEDeviceExtension->Int10Interface.Int10CallBios(
+ VBEDeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ if (BiosRegisters.Eax == VBE_SUCCESS)
{
- if (VbeInfo->Version >= 0x200)
- {
- DPRINT(("VBE BIOS Present (%d.%d, %8ld Kb)\n",
- VbeInfo->Version / 0x100, VbeInfo->Version & 0xFF,
- VbeInfo->TotalMemory * 16));
-
- return NO_ERROR;
- }
- else
+ VBEDeviceExtension->Int10Interface.Int10ReadMemory(
+ VBEDeviceExtension->Int10Interface.Context,
+ VBEDeviceExtension->TrampolineMemorySegment,
+ VBEDeviceExtension->TrampolineMemoryOffset,
+ &VBEDeviceExtension->VbeInfo,
+ sizeof(VBEDeviceExtension->VbeInfo));
+
+ DPRINT(("VBE BIOS Present (%d.%d, %8ld Kb)\n",
+ VBEDeviceExtension->VbeInfo.Version / 0x100,
+ VBEDeviceExtension->VbeInfo.Version & 0xFF,
+ VBEDeviceExtension->VbeInfo.TotalMemory * 16));
+
+#ifdef VBE12_SUPPORT
+ if (VBEDeviceExtension->VbeInfo.Version < 0x102)
+#else
+ if (VBEDeviceExtension->VbeInfo.Version < 0x200)
+#endif
{
DPRINT(("VBE BIOS present, but incompatible version.\n"));
-
- return ERROR_DEV_NOT_EXIST;
+ return FALSE;
}
}
else
{
DPRINT(("No VBE BIOS found.\n"));
-
- return ERROR_DEV_NOT_EXIST;
+ return FALSE;
}
-}
-/*
- * VBEInitialize
- *
- * Performs the first initialization of the adapter, after the HAL has given
- * up control of the video hardware to the video port driver.
- */
-
-BOOLEAN STDCALL
-VBEInitialize(PVOID HwDeviceExtension)
-{
/*
* Build a mode list here that can be later used by
* IOCTL_VIDEO_QUERY_NUM_AVAIL_MODES and IOCTL_VIDEO_QUERY_AVAIL_MODES
* calls.
*/
- ULONG ModeCount;
- ULONG CurrentMode;
- KV86M_REGISTERS BiosRegisters;
- PVBE_DEVICE_EXTENSION VBEDeviceExtension =
- (PVBE_DEVICE_EXTENSION)HwDeviceExtension;
- PVBE_INFO VbeInfo;
- PVBE_MODEINFO VbeModeInfo;
- VBE_MODEINFO TempVbeModeInfo;
- WORD TempVbeModeNumber;
- WORD *ModeList;
- WORD DefaultMode;
-
- InitializeVideoAddressSpace();
-
- /*
- * Get the VBE general information.
- */
-
- VbeInfo = (PVBE_INFO)VBEDeviceExtension->TrampolineMemory;
- VideoPortMoveMemory(VbeInfo->Signature, "VBE2", 4);
- VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
- BiosRegisters.Eax = 0x4F00;
- BiosRegisters.Edi = VBEDeviceExtension->PhysicalAddress.QuadPart & 0xFF;
- BiosRegisters.Es = VBEDeviceExtension->PhysicalAddress.QuadPart >> 4;
- Ke386CallBios(0x10, &BiosRegisters);
-
- VBEDeviceExtension->VBEVersion = VbeInfo->Version;
- VBEDeviceExtension->VGACompatible = !(VbeInfo->Capabilities & 2);
-
/*
* Get the number of supported video modes.
- */
+ *
+ * No need to be map the memory. It's either in the video BIOS memory or
+ * in our trampoline memory. In either case the memory is already mapped.
+ */
+
+ for (ModeCount = 0; ; ModeCount++)
+ {
+ /* Read the VBE mode number. */
+ VBEDeviceExtension->Int10Interface.Int10ReadMemory(
+ VBEDeviceExtension->Int10Interface.Context,
+ HIWORD(VBEDeviceExtension->VbeInfo.VideoModePtr),
+ LOWORD(VBEDeviceExtension->VbeInfo.VideoModePtr) + (ModeCount << 1),
+ &ModeTemp,
+ sizeof(ModeTemp));
- /*
- * No need to be mapped, it's either in BIOS memory or in our trampoline
- * memory. Both of them are already mapped.
- */
- ModeList = (WORD *)((HIWORD(VbeInfo->VideoModePtr) << 4) + LOWORD(VbeInfo->VideoModePtr));
- for (CurrentMode = 0, ModeCount = 0;
- ModeList[CurrentMode] != 0xFFFF && ModeList[CurrentMode] != 0;
- CurrentMode++)
- {
- ModeCount++;
+ /* End of list? */
+ if (ModeTemp == 0xFFFF || ModeTemp == 0)
+ break;
}
/*
@@ -323,56 +300,73 @@
* Get the actual mode infos.
*/
- for (CurrentMode = 0, ModeCount = 0, DefaultMode = 0;
- ModeList[CurrentMode] != 0xFFFF && ModeList[CurrentMode] != 0;
+ for (CurrentMode = 0, SuitableModeCount = 0;
+ CurrentMode < ModeCount;
CurrentMode++)
{
- BiosRegisters.Eax = 0x4F01;
- BiosRegisters.Ecx = ModeList[CurrentMode];
- BiosRegisters.Edi = (VBEDeviceExtension->PhysicalAddress.QuadPart + 0x200) & 0xF;
- BiosRegisters.Es = (VBEDeviceExtension->PhysicalAddress.QuadPart + 0x200) >> 4;
- Ke386CallBios(0x10, &BiosRegisters);
- VbeModeInfo = (PVBE_MODEINFO)(VBEDeviceExtension->TrampolineMemory + 0x200);
- if (BiosRegisters.Eax == 0x4F &&
+ /* Read the VBE mode number. */
+ VBEDeviceExtension->Int10Interface.Int10ReadMemory(
+ VBEDeviceExtension->Int10Interface.Context,
+ HIWORD(VBEDeviceExtension->VbeInfo.VideoModePtr),
+ LOWORD(VBEDeviceExtension->VbeInfo.VideoModePtr) + (CurrentMode << 1),
+ &ModeTemp,
+ sizeof(ModeTemp));
+
+ /* Call VBE BIOS to read the mode info. */
+ VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
+ BiosRegisters.Eax = VBE_GET_MODE_INFORMATION;
+ BiosRegisters.Ecx = ModeTemp;
+ BiosRegisters.Edi = VBEDeviceExtension->TrampolineMemoryOffset + 0x200;
+ BiosRegisters.SegEs = VBEDeviceExtension->TrampolineMemorySegment;
+ VBEDeviceExtension->Int10Interface.Int10CallBios(
+ VBEDeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ /* Read the VBE mode info. */
+ VBEDeviceExtension->Int10Interface.Int10ReadMemory(
+ VBEDeviceExtension->Int10Interface.Context,
+ VBEDeviceExtension->TrampolineMemorySegment,
+ VBEDeviceExtension->TrampolineMemoryOffset + 0x200,
+ VBEDeviceExtension->ModeInfo + SuitableModeCount,
+ sizeof(VBE_MODEINFO));
+
+ VbeModeInfo = VBEDeviceExtension->ModeInfo + SuitableModeCount;
+
+ /* Is this mode acceptable? */
+ if (BiosRegisters.Eax == VBE_SUCCESS &&
VbeModeInfo->XResolution >= 640 &&
VbeModeInfo->YResolution >= 480 &&
- (VbeModeInfo->ModeAttributes & VBE_MODEATTR_LINEAR))
+ (VbeModeInfo->MemoryModel == VBE_MEMORYMODEL_PACKEDPIXEL ||
+ VbeModeInfo->MemoryModel == VBE_MEMORYMODEL_DIRECTCOLOR))
{
- VideoPortMoveMemory(VBEDeviceExtension->ModeInfo + ModeCount,
- VBEDeviceExtension->TrampolineMemory + 0x200,
- sizeof(VBE_MODEINFO));
- VBEDeviceExtension->ModeNumbers[ModeCount] = ModeList[CurrentMode] | 0x4000;
- if (VbeModeInfo->XResolution == 640 &&
- VbeModeInfo->YResolution == 480 &&
- VbeModeInfo->BitsPerPixel == 32)
+ if (VbeModeInfo->ModeAttributes & VBE_MODEATTR_LINEAR)
{
- DefaultMode = ModeCount;
+ VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp | 0x4000;
+ SuitableModeCount++;
}
- ModeCount++;
+#ifdef VBE12_SUPPORT
+ else
+ {
+ VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp;
+ SuitableModeCount++;
+ }
+#endif
}
}
- /*
- * Exchange the default mode so it's at the first place in list.
- */
-
- VideoPortMoveMemory(&TempVbeModeInfo, VBEDeviceExtension->ModeInfo,
- sizeof(VBE_MODEINFO));
- VideoPortMoveMemory(VBEDeviceExtension->ModeInfo, VBEDeviceExtension->ModeInfo + DefaultMode,
- sizeof(VBE_MODEINFO));
- VideoPortMoveMemory(VBEDeviceExtension->ModeInfo + DefaultMode, &TempVbeModeInfo,
- sizeof(VBE_MODEINFO));
- TempVbeModeNumber = VBEDeviceExtension->ModeNumbers[0];
- VBEDeviceExtension->ModeNumbers[0] = VBEDeviceExtension->ModeNumbers[DefaultMode];
- VBEDeviceExtension->ModeNumbers[DefaultMode] = TempVbeModeNumber;
-
- if (ModeCount == 0)
+ if (SuitableModeCount == 0)
{
DPRINT(("VBEMP: No video modes supported\n"));
return FALSE;
}
- VBEDeviceExtension->ModeCount = ModeCount;
+ VBEDeviceExtension->ModeCount = SuitableModeCount;
+
+ /*
+ * Sort the video mode list according to resolution and bits per pixel.
+ */
+
+ VBESortModes(VBEDeviceExtension);
/*
* Print the supported video modes when DBG is set.
@@ -380,7 +374,7 @@
#ifdef DBG
for (CurrentMode = 0;
- CurrentMode < ModeCount;
+ CurrentMode < SuitableModeCount;
CurrentMode++)
{
DPRINT(("%dx%dx%d\n",
@@ -443,8 +437,14 @@
break;
case IOCTL_VIDEO_UNMAP_VIDEO_MEMORY:
+ if (RequestPacket->InputBufferLength < sizeof(VIDEO_MEMORY))
+ {
+ RequestPacket->StatusBlock->Status = ERROR_INSUFFICIENT_BUFFER;
+ return TRUE;
+ }
Result = VBEUnmapVideoMemory(
(PVBE_DEVICE_EXTENSION)HwDeviceExtension,
+ (PVIDEO_MEMORY)RequestPacket->InputBuffer,
RequestPacket->StatusBlock);
break;
@@ -538,7 +538,62 @@
ULONG HwId,
PVIDEO_POWER_MANAGEMENT VideoPowerControl)
{
- return ERROR_INVALID_FUNCTION;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
+ PVBE_DEVICE_EXTENSION VBEDeviceExtension =
+ (PVBE_DEVICE_EXTENSION)HwDeviceExtension;
+
+ if (HwId != DISPLAY_ADAPTER_HW_ID ||
+ VideoPowerControl->Length < sizeof(VIDEO_POWER_MANAGEMENT))
+ return ERROR_INVALID_FUNCTION;
+
+ /*
+ * Get general power support information.
+ */
+
+ VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
+ BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
+ BiosRegisters.Ebx = 0;
+ BiosRegisters.Edi = 0;
+ BiosRegisters.SegEs = 0;
+ VBEDeviceExtension->Int10Interface.Int10CallBios(
+ VBEDeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
+ return ERROR_NOT_SUPPORTED;
+ if (BiosRegisters.Eax != VBE_SUCCESS)
+ return ERROR_INVALID_FUNCTION;
+
+ /*
+ * Get current power state.
+ */
+
+ VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
+ BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
+ BiosRegisters.Ebx = 0x2;
+ BiosRegisters.Edi = 0;
+ BiosRegisters.SegEs = 0;
+ VBEDeviceExtension->Int10Interface.Int10CallBios(
+ VBEDeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ if (BiosRegisters.Eax == VBE_SUCCESS)
+ {
+ VideoPowerControl->DPMSVersion = BiosRegisters.Ebx & 0xFF;
+ switch (BiosRegisters.Ebx >> 8)
+ {
+ case 0: VideoPowerControl->PowerState = VideoPowerOn; break;
+ case 1: VideoPowerControl->PowerState = VideoPowerStandBy; break;
+ case 2: VideoPowerControl->PowerState = VideoPowerSuspend; break;
+ case 4: VideoPowerControl->PowerState = VideoPowerOff; break;
+ case 5: VideoPowerControl->PowerState = VideoPowerOn; break;
+ default: VideoPowerControl->PowerState = VideoPowerUnspecified;
+ }
+
+ return NO_ERROR;
+ }
+
+ return ERROR_NOT_SUPPORTED;
}
/*
@@ -553,7 +608,45 @@
ULONG HwId,
PVIDEO_POWER_MANAGEMENT VideoPowerControl)
{
- return ERROR_INVALID_FUNCTION;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
+ PVBE_DEVICE_EXTENSION VBEDeviceExtension =
+ (PVBE_DEVICE_EXTENSION)HwDeviceExtension;
+
+ if (HwId != DISPLAY_ADAPTER_HW_ID ||
+ VideoPowerControl->Length < sizeof(VIDEO_POWER_MANAGEMENT) ||
+ VideoPowerControl->PowerState < VideoPowerOn ||
+ VideoPowerControl->PowerState > VideoPowerHibernate)
+ return ERROR_INVALID_FUNCTION;
+
+ if (VideoPowerControl->PowerState == VideoPowerHibernate)
+ return NO_ERROR;
+
+ /*
+ * Set current power state.
+ */
+
+ VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
+ BiosRegisters.Eax = VBE_POWER_MANAGEMENT_EXTENSIONS;
+ BiosRegisters.Ebx = 1;
+ BiosRegisters.Edi = 0;
+ BiosRegisters.SegEs = 0;
+ switch (VideoPowerControl->PowerState)
+ {
+ case VideoPowerStandBy: BiosRegisters.Ebx |= 0x100; break;
+ case VideoPowerSuspend: BiosRegisters.Ebx |= 0x200; break;
+ case VideoPowerOff: BiosRegisters.Ebx |= 0x400; break;
+ }
+
+ VBEDeviceExtension->Int10Interface.Int10CallBios(
+ VBEDeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ if (BiosRegisters.Eax == VBE_NOT_SUPPORTED)
+ return ERROR_NOT_SUPPORTED;
+ if (BiosRegisters.Eax != VBE_SUCCESS)
+ return ERROR_INVALID_FUNCTION;
+
+ return VBE_SUCCESS;
}
/*
@@ -568,13 +661,21 @@
PVIDEO_MODE RequestedMode,
PSTATUS_BLOCK StatusBlock)
{
- KV86M_REGISTERS BiosRegisters;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
+
+ if (RequestedMode->RequestedMode >= DeviceExtension->ModeCount)
+ {
+ return ERROR_INVALID_PARAMETER;
+ }
VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
- BiosRegisters.Eax = 0x4F02;
+ BiosRegisters.Eax = VBE_SET_VBE_MODE;
BiosRegisters.Ebx = DeviceExtension->ModeNumbers[RequestedMode->RequestedMode];
- Ke386CallBios(0x10, &BiosRegisters);
- if (BiosRegisters.Eax == 0x4F)
+ DeviceExtension->Int10Interface.Int10CallBios(
+ DeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ if (BiosRegisters.Eax == VBE_SUCCESS)
{
DeviceExtension->CurrentMode = RequestedMode->RequestedMode;
}
@@ -583,7 +684,8 @@
DPRINT(("VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax));
DeviceExtension->CurrentMode = -1;
}
- return (BiosRegisters.Eax == 0x4F);
+
+ return BiosRegisters.Eax == VBE_SUCCESS;
}
/*
@@ -598,14 +700,16 @@
PVBE_DEVICE_EXTENSION DeviceExtension,
PSTATUS_BLOCK StatusBlock)
{
- KV86M_REGISTERS BiosRegisters;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
- InitializeVideoAddressSpace();
VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
- BiosRegisters.Eax = 0x4F02;
+ BiosRegisters.Eax = VBE_SET_VBE_MODE;
BiosRegisters.Ebx = 0x3;
- Ke386CallBios(0x10, &BiosRegisters);
- return TRUE;
+ DeviceExtension->Int10Interface.Int10CallBios(
+ DeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ return BiosRegisters.Eax == VBE_SUCCESS;
}
/*
@@ -623,16 +727,28 @@
PSTATUS_BLOCK StatusBlock)
{
PHYSICAL_ADDRESS FrameBuffer;
- ULONG inIoSpace = 0;
+ ULONG inIoSpace = VIDEO_MEMORY_SPACE_MEMORY;
StatusBlock->Information = sizeof(VIDEO_MEMORY_INFORMATION);
- FrameBuffer.QuadPart =
- DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].PhysBasePtr;
- MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
- MapInformation->VideoRamLength =
- DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].BytesPerScanLine *
- DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
+ if (DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].ModeAttributes &
+ VBE_MODEATTR_LINEAR)
+ {
+ FrameBuffer.QuadPart =
+ DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].PhysBasePtr;
+ MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
+ MapInformation->VideoRamLength =
+ DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].BytesPerScanLine *
+ DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
+ }
+#ifdef VBE12_SUPPORT
+ else
+ {
+ FrameBuffer.QuadPart = 0xA0000;
+ MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
+ MapInformation->VideoRamLength = 0x10000;
+ }
+#endif
VideoPortMapMemory(DeviceExtension, FrameBuffer,
&MapInformation->VideoRamLength, &inIoSpace,
@@ -641,8 +757,6 @@
MapInformation->FrameBufferBase = MapInformation->VideoRamBase;
MapInformation->FrameBufferLength = MapInformation->VideoRamLength;
- DeviceExtension->FrameBufferMemory = MapInformation->VideoRamBase;
-
return TRUE;
}
@@ -656,9 +770,10 @@
BOOL FASTCALL
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
+ PVIDEO_MEMORY VideoMemory,
PSTATUS_BLOCK StatusBlock)
{
- VideoPortUnmapMemory(DeviceExtension, DeviceExtension->FrameBufferMemory,
+ VideoPortUnmapMemory(DeviceExtension, VideoMemory->RequestedVirtualAddress,
NULL);
return TRUE;
}
@@ -704,12 +819,12 @@
VideoMode->ScreenStride = VBEMode->BytesPerScanLine;
VideoMode->NumberOfPlanes = VBEMode->NumberOfPlanes;
VideoMode->BitsPerPlane = VBEMode->BitsPerPixel / VBEMode->NumberOfPlanes;
- VideoMode->Frequency = 0; /* FIXME */
+ VideoMode->Frequency = 1;
VideoMode->XMillimeter = 0; /* FIXME */
VideoMode->YMillimeter = 0; /* FIXME */
if (VBEMode->BitsPerPixel > 8)
{
- if (DeviceExtension->VBEVersion < 0x300)
+ if (DeviceExtension->VbeInfo.Version < 0x300)
{
VideoMode->NumberRedBits = VBEMode->RedMaskSize;
VideoMode->NumberGreenBits = VBEMode->GreenMaskSize;
@@ -813,14 +928,19 @@
PVIDEO_CLUT ColorLookUpTable,
PSTATUS_BLOCK StatusBlock)
{
- KV86M_REGISTERS BiosRegisters;
+ INT10_BIOS_ARGUMENTS BiosRegisters;
ULONG Entry;
PULONG OutputEntry;
+ ULONG OutputBuffer[256];
if (ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry > 256)
return FALSE;
- if (DeviceExtension->VGACompatible)
+ /*
+ * For VGA compatible adapters program the color registers directly.
+ */
+
+ if (!(DeviceExtension->VbeInfo.Capabilities & 2))
{
for (Entry = ColorLookUpTable->FirstEntry;
Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
@@ -831,6 +951,7 @@
VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[Entry].RgbArray.Green);
VideoPortWritePortUchar((PUCHAR)0x03c9, ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
}
+
return TRUE;
}
else
@@ -841,7 +962,7 @@
*/
for (Entry = ColorLookUpTable->FirstEntry,
- OutputEntry = DeviceExtension->TrampolineMemory;
+ OutputEntry = OutputBuffer;
Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
Entry++, OutputEntry++)
{
@@ -851,13 +972,24 @@
(ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
}
- BiosRegisters.Eax = 0x4F09;
+ DeviceExtension->Int10Interface.Int10WriteMemory(
+ DeviceExtension->Int10Interface.Context,
+ DeviceExtension->TrampolineMemorySegment,
+ DeviceExtension->TrampolineMemoryOffset,
+ OutputBuffer,
+ (OutputEntry - OutputBuffer) * sizeof(ULONG));
+
+ VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters));
+ BiosRegisters.Eax = VBE_SET_GET_PALETTE_DATA;
BiosRegisters.Ebx = 0;
BiosRegisters.Ecx = ColorLookUpTable->NumEntries;
BiosRegisters.Edx = ColorLookUpTable->FirstEntry;
- BiosRegisters.Edi = DeviceExtension->PhysicalAddress.QuadPart & 0xF;
- BiosRegisters.Es = DeviceExtension->PhysicalAddress.QuadPart >> 4;
- Ke386CallBios(0x10, &BiosRegisters);
- return (BiosRegisters.Eax == 0x4F);
+ BiosRegisters.Edi = DeviceExtension->TrampolineMemoryOffset;
+ BiosRegisters.SegEs = DeviceExtension->TrampolineMemorySegment;
+ DeviceExtension->Int10Interface.Int10CallBios(
+ DeviceExtension->Int10Interface.Context,
+ &BiosRegisters);
+
+ return BiosRegisters.Eax == VBE_SUCCESS;
}
}
reactos/drivers/video/miniport/vbe
diff -u -r1.5 -r1.5.2.1
--- vbemp.h 20 Jun 2004 16:06:12 -0000 1.5
+++ vbemp.h 30 Jun 2004 21:16:02 -0000 1.5.2.1
@@ -31,26 +31,70 @@
#include <ddk/ntddvdeo.h>
#include <ddk/ntapi.h>
-/* For Ke386CallBios */
-#include "internal/v86m.h"
-
-/* FIXME: Missing define in w32api! */
-#ifndef NtCurrentProcess
-#define NtCurrentProcess() ((HANDLE)(LONG_PTR)-1)
-#endif
-
#ifdef DBG
#define DPRINT(arg) DbgPrint arg;
#else
#define DPRINT(arg)
#endif
+/*
+ * Compile-time define to get VBE 1.2 support. The implementation
+ * is far from complete now and so it's left undefined.
+ */
+
+/* #define VBE12_SUPPORT */
+
#include <pshpack1.h>
/*
+ * VBE Command Definitions
+ */
+
+#define VBE_GET_CONTROLLER_INFORMATION 0x4F00
+#define VBE_GET_MODE_INFORMATION 0x4F01
+#define VBE_SET_VBE_MODE 0x4F02
+#define VBE_GET_CURRENT_VBE_MODE 0x4F03
+#define VBE_SAVE_RESTORE_STATE 0x4F04
+#define VBE_DISPLAY_WINDOW_CONTROL 0x4F05
+#define VBE_SET_GET_LOGICAL_SCAN_LINE_LENGTH 0x4F06
+#define VBE_SET_GET_DISPLAY_START 0x4F07
+#define VBE_SET_GET_DAC_PALETTE_FORMAT 0x4F08
+#define VBE_SET_GET_PALETTE_DATA 0x4F09
+
+/* VBE 2.0+ */
+#define VBE_RETURN_PROTECTED_MODE_INTERFACE 0x4F0A
+#define VBE_GET_SET_PIXEL_CLOCK 0x4F0B
+
+/* Extensions */
+#define VBE_POWER_MANAGEMENT_EXTENSIONS 0x4F10
+#define VBE_FLAT_PANEL_INTERFACE_EXTENSIONS 0x4F11
+#define VBE_AUDIO_INTERFACE_EXTENSIONS 0x4F12
+#define VBE_OEM_EXTENSIONS 0x4F13
+#define VBE_DISPLAY_DATA_CHANNEL 0x4F14
+
+/*
+ * VBE Video Mode Information Definitions
+ */
+
+#define VBE_MODEATTR_LINEAR 0x80
+
+#define VBE_MEMORYMODEL_PACKEDPIXEL 0x04
+#define VBE_MEMORYMODEL_DIRECTCOLOR 0x06
+
+/*
+ * VBE Return Codes
+ */
+
+#define VBE_SUCCESS 0x4F
+#define VBE_UNSUCCESSFUL 0x14F
+#define VBE_NOT_SUPPORTED 0x24F
+#define VBE_FUNCTION_INVALID 0x34F
+
+/*
* VBE specification defined structure for general adapter info
- * returned by function 0x4F00.
+ * returned by function VBE_GET_CONTROLLER_INFORMATION command.
*/
+
typedef struct
{
CHAR Signature[4];
@@ -69,9 +113,11 @@
/*
* VBE specification defined structure for specific video mode
- * info returned by function 0x4F01.
+ * info returned by function VBE_GET_MODE_INFORMATION command.
*/
-typedef struct {
+
+typedef struct
+{
/* Mandatory information for all VBE revisions */
WORD ModeAttributes;
BYTE WinAAttributes;
@@ -129,21 +175,19 @@
CHAR Reserved4[189];
} VBE_MODEINFO, *PVBE_MODEINFO;
-#define VBE_MODEATTR_LINEAR 0x80
-
#include <poppack.h>
-typedef struct {
- /* Trampoline memory for communication with VBE real-mode interface. */
- PHYSICAL_ADDRESS PhysicalAddress;
- PVOID TrampolineMemory;
+typedef struct
+{
+ /* Interface to Int10 calls */
+ VIDEO_PORT_INT10_INTERFACE Int10Interface;
- /* Pointer to mapped frame buffer memory */
- PVOID FrameBufferMemory;
+ /* Trampoline memory for communication with VBE real-mode interface */
+ USHORT TrampolineMemorySegment;
+ USHORT TrampolineMemoryOffset;
/* General controller/BIOS information */
- BOOL VGACompatible;
- WORD VBEVersion;
+ VBE_INFO VbeInfo;
/* Saved information about video modes */
ULONG ModeCount;
@@ -207,6 +251,7 @@
BOOL FASTCALL
VBEUnmapVideoMemory(
PVBE_DEVICE_EXTENSION DeviceExtension,
+ PVIDEO_MEMORY VideoMemory,
PSTATUS_BLOCK StatusBlock);
BOOL FASTCALL
reactos/drivers/video/videoprt
diff -u -r1.24 -r1.24.8.1
--- videoprt.c 19 Mar 2004 20:58:32 -0000 1.24
+++ videoprt.c 30 Jun 2004 21:16:02 -0000 1.24.8.1
@@ -18,7 +18,7 @@
* If not, write to the Free Software Foundation,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: videoprt.c,v 1.24 2004/03/19 20:58:32 navaraf Exp $
+ * $Id: videoprt.c,v 1.24.8.1 2004/06/30 21:16:02 hyperion Exp $
*/
#include "videoprt.h"
@@ -534,7 +534,8 @@
RtlCopyMemory(
&DriverExtension->InitializationData,
HwInitializationData,
- sizeof(VIDEO_HW_INITIALIZATION_DATA));
+ min(sizeof(VIDEO_HW_INITIALIZATION_DATA),
+ HwInitializationData->HwInitDataSize));
DriverExtension->HwContext = HwContext;
RtlCopyMemory(&DriverExtension->RegistryPath, RegistryPath, sizeof(UNICODE_STRING));
reactos/drivers/video/videoprt
diff -u -r1.7 -r1.7.10.1
--- videoprt.def 8 Mar 2004 20:27:33 -0000 1.7
+++ videoprt.def 30 Jun 2004 21:16:02 -0000 1.7.10.1
@@ -1,4 +1,4 @@
-; $Id: videoprt.def,v 1.7 2004/03/08 20:27:33 dwelch Exp $
+; $Id: videoprt.def,v 1.7.10.1 2004/06/30 21:16:02 hyperion Exp $
;
; vidport.def - export definition file for ReactOS
;
@@ -39,6 +39,8 @@
VideoPortMoveMemory@12
VideoPortPutDmaAdapter@8
VideoPortQueueDpc@12
+VideoPortQueryPerformanceCounter@8
+VideoPortQueryServices@12
VideoPortReadPortUchar@4
VideoPortReadPortUshort@4
VideoPortReadPortUlong@4
reactos/include/ddk
diff -u -r1.21.16.1 -r1.21.16.2
--- extypes.h 27 Jun 2004 01:13:11 -0000 1.21.16.1
+++ extypes.h 30 Jun 2004 21:16:02 -0000 1.21.16.2
@@ -1,4 +1,4 @@
-/* $Id: extypes.h,v 1.21.16.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: extypes.h,v 1.21.16.2 2004/06/30 21:16:02 hyperion Exp $ */
#ifndef __INCLUDE_DDK_EXTYPES_H
#define __INCLUDE_DDK_EXTYPES_H
reactos/include/ddk
diff -u -r1.22.12.1 -r1.22.12.2
--- fsfuncs.h 27 Jun 2004 01:13:11 -0000 1.22.12.1
+++ fsfuncs.h 30 Jun 2004 21:16:02 -0000 1.22.12.2
@@ -1,10 +1,56 @@
#ifndef __INCLUDE_DDK_FSFUNCS_H
#define __INCLUDE_DDK_FSFUNCS_H
-/* $Id: fsfuncs.h,v 1.22.12.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: fsfuncs.h,v 1.22.12.2 2004/06/30 21:16:02 hyperion Exp $ */
#define FlagOn(x,f) ((x) & (f))
#include <ntos/fstypes.h>
+/* Some comments on the Prototypes that aren't in the GNU IFS:
+
+The following come from alternate sources, or guessed from documentation:
+FsRtlNotifyFullChangeDirectory GOOGLE GROUPS
+FsRtlIsPagingFile OSR DOCUMENTATION
+FsRtlAcquireFileExclusive (GUESS: The function takes a single parameter. The function name is "AcquireFile". Logical assumption says this is a File Object. NTFSD ML Post confirms.)
+FsRtlReleaseFile (GUESS: The function takes a single parameter. The function name is "AcquireFile". Logical assumption says this is a File Object. NTFSD ML Post confirms.)
+FsRtlMdlReadCompleteDev (FsRtlMdlReadComplete is on GNU IFS. The Dev Suffix simply means an extra PDEVICE_OBJECT param)
+FsRtlMdlReadDev (FsRtlMdlReadDev is on GNU IFS. The Dev Suffix simply means an extra PDEVICE_OBJECT param)
+FsRtlMdlWriteCompleteDev FsRtlMdlWriteCompleteDev is on GNU IFS. The Dev Suffix simply means an extra PDEVICE_OBJECT param)
+FsRtlPrepareMdlWrite (Compared with CcMdlWrite, which is already documented)
+FsRtlPrepareMdlWriteDev (Same as above, and add a pointer to device object (Dev suffix)
+FsRtlGetNextMcbEntry(FsRtlGetNextLargeMcbEntry is documented and uses LONGLONGs. Logical assumption that this one only uses LONGS and non-large MCB (Documented))
+
+Stream Context. Going along with public OSR documenttion:
+
+FsRtlInsertPerStreamContext:
+"This call is used by the file system filter driver to associate a given context block
+(allocated by the filter and initialized using FsRtlInitPerStreamContext) with the stream associated with the given file object."
+Notice we are told "given context block...initialized using FsRtlInitPerStreamContext". This function description tells us:
+" provide space for the FSRTL_PER_STREAM_CONTEXT block in the filter driver�s context structure"
+Therefore, one of the parameters is PFSRTL_PER_STREAM_CONTEXT.
+"with the stream associated with the given file object." The OSR Documentations then mentions:
+"Tracking per-file (or �per stream�) context information in FSRTL_ADVANCED_FCB_HEADER"
+So we are associating a FSRTL_PER_STREAM_CONTEXT block with the FSRTL_ADVANCED_FCB_HEADER associated with the file object.
+FSRTL_ADVANCED_FCB_HEADER is documented by a search through Google.
+FSRTL_PER_STREAM_CONTEXT is *NOT* documented anywhere else then in the IFS, so it has been removed.
+
+FsRtlLookupPerStreamContextInternal
+"FsRtlLookupPerStreamContext � this call is used by the file system filter driver to locate a given context
+block that is associated with the file object. Typically, a file system filter driver will identify its
+own context block using unique OwnerId and InstanceId parameters when creating the context block and subsequently
+when locating the associated information."
+OSR tells us here that the last two parameters are OwnerId and InstanceId. It also says it will find a given context block,
+so there's our Return Value. (Although, not being documented, we must put PVOID). It looks into a file object's stream, so we
+probably need that FCB header again.
+
+FsRtlRemovePerStreamContext
+OSR is vague, so all we know for sure is that we are sending an FCB Header. The return value isn't NTSTATUS, but seems to be a
+pointer. We don't know what the two other parameters are, so they have been marked as unknown.
+
+FsRtlTeardownPerStreamContexts
+OSR doens't tell a lot, but we only have one parameter. It must be the FCB Header. Furthermore, the CVS of Captive implements
+this function as a stub, and confirms the theory.
+
+*/
VOID
STDCALL
@@ -424,6 +470,7 @@
OUT PMDL *MdlChain,
OUT PIO_STATUS_BLOCK IoStatus
);
+
BOOLEAN
STDCALL
FsRtlMdlReadComplete (
@@ -584,6 +631,7 @@
OUT PMDL *MdlChain,
OUT PIO_STATUS_BLOCK IoStatus
);
+
BOOLEAN
STDCALL
FsRtlPrepareMdlWriteDev (
@@ -613,6 +661,7 @@
DWORD Unknown1,
DWORD Unknown2
);
+
VOID
STDCALL
FsRtlPostStackOverflow (
@@ -620,6 +669,7 @@
DWORD Unknown1,
DWORD Unknown2
);
+
BOOLEAN
STDCALL
FsRtlPrivateLock (
@@ -636,6 +686,7 @@
IN PVOID Context,
IN BOOLEAN AlreadySynchronized
);
+
NTSTATUS
STDCALL
FsRtlProcessFileLock (
@@ -647,8 +698,8 @@
STDCALL
NTSTATUS
FsRtlRegisterFileSystemFilterCallbacks (
- IN struct _DRIVER_OBJECT *FilterDriverObject,
- IN PFS_FILTER_CALLBACKS Callbacks
+ IN PVOID Unknown1,
+ IN PVOID Unknown2
);
NTSTATUS STDCALL
@@ -676,8 +727,8 @@
PFSRTL_PER_STREAM_CONTEXT
FsRtlRemovePerStreamContext (
IN PFSRTL_ADVANCED_FCB_HEADER StreamContext,
- IN PVOID OwnerId OPTIONAL,
- IN PVOID InstanceId OPTIONAL
+ IN PVOID Unknown1 OPTIONAL,
+ IN PVOID Unknown2 OPTIONAL
);
STDCALL
reactos/include/ddk
diff -u -r1.15.8.1 -r1.15.8.2
--- fstypes.h 27 Jun 2004 01:13:11 -0000 1.15.8.1
+++ fstypes.h 30 Jun 2004 21:16:02 -0000 1.15.8.2
@@ -1,6 +1,6 @@
#ifndef __INCLUDE_DDK_FSTYPES_H
#define __INCLUDE_DDK_FSTYPES_H
-/* $Id: fstypes.h,v 1.15.8.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: fstypes.h,v 1.15.8.2 2004/06/30 21:16:02 hyperion Exp $ */
#ifndef __USE_W32API
reactos/include/ddk
diff -u -r1.41.16.1 -r1.41.16.2
--- iofuncs.h 27 Jun 2004 01:13:11 -0000 1.41.16.1
+++ iofuncs.h 30 Jun 2004 21:16:02 -0000 1.41.16.2
@@ -1,6 +1,6 @@
#ifndef _INCLUDE_DDK_IOFUNCS_H
#define _INCLUDE_DDK_IOFUNCS_H
-/* $Id: iofuncs.h,v 1.41.16.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: iofuncs.h,v 1.41.16.2 2004/06/30 21:16:02 hyperion Exp $ */
#ifdef __NTOSKRNL__
extern POBJECT_TYPE EXPORTED IoAdapterObjectType;
reactos/include/ddk
diff -u -r1.62.12.1 -r1.62.12.2
--- iotypes.h 27 Jun 2004 01:13:11 -0000 1.62.12.1
+++ iotypes.h 30 Jun 2004 21:16:02 -0000 1.62.12.2
@@ -1,4 +1,4 @@
-/* $Id: iotypes.h,v 1.62.12.1 2004/06/27 01:13:11 hyperion Exp $
+/* $Id: iotypes.h,v 1.62.12.2 2004/06/30 21:16:02 hyperion Exp $
*
*/
reactos/include/ddk
diff -u -r1.5.22.1 -r1.5.22.2
--- ldrfuncs.h 27 Jun 2004 01:13:11 -0000 1.5.22.1
+++ ldrfuncs.h 30 Jun 2004 21:16:02 -0000 1.5.22.2
@@ -1,6 +1,6 @@
#ifndef __INCLUDE_DDK_LDRFUNCS_H
#define __INCLUDE_DDK_LDRFUNCS_H
-/* $Id: ldrfuncs.h,v 1.5.22.1 2004/06/27 01:13:11 hyperion Exp $ */
+/* $Id: ldrfuncs.h,v 1.5.22.2 2004/06/30 21:16:02 hyperion Exp $ */
NTSTATUS STDCALL
LdrAccessResource(IN PVOID BaseAddress,
reactos/include/ntdll
diff -u -r1.25 -r1.25.12.1
--- ldr.h 7 Jan 2004 10:09:03 -0000 1.25
+++ ldr.h 30 Jun 2004 21:16:03 -0000 1.25.12.1
@@ -126,6 +126,12 @@
IN PUNICODE_STRING Name,
OUT PVOID *BaseAddress OPTIONAL);
+PIMAGE_BASE_RELOCATION STDCALL
+LdrProcessRelocationBlock(IN PVOID Address,
+ IN USHORT Count,
+ IN PUSHORT TypeOffset,
+ IN ULONG_PTR Delta);
+
NTSTATUS STDCALL
LdrQueryImageFileExecutionOptions (IN PUNICODE_STRING SubKey,
IN PCWSTR ValueName,
reactos/include/win32k
diff -u -r1.22 -r1.22.6.1
--- region.h 24 Apr 2004 14:21:35 -0000 1.22
+++ region.h 30 Jun 2004 21:16:03 -0000 1.22.6.1
@@ -8,9 +8,6 @@
typedef struct _ROSRGNDATA {
RGNDATAHEADER rdh;
PRECT Buffer;
- RECT BuiltInRect; /* Testing shows that > 95% of all regions have only 1 rect.
- Including that here saves us from having to do another
- allocation */
} ROSRGNDATA, *PROSRGNDATA, *LPROSRGNDATA;
reactos/include/wine
diff -u -r1.3 -r1.3.12.1
--- shlguid.h 6 Jan 2004 17:21:34 -0000 1.3
+++ shlguid.h 30 Jun 2004 21:16:03 -0000 1.3.12.1
@@ -1,62 +1,24 @@
-/*
- * Copyright (C) 1999 Juergen Schmied
+/* $Id: shlguid.h,v 1.3.12.1 2004/06/30 21:16:03 hyperion Exp $
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * Compatibility header
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This header is wrapper to allow compilation of Wine DLLs under ReactOS
+ * build system. It contains definitions commonly refered to as Wineisms
+ * and definitions that are missing in w32api.
*/
+#include_next <shlguid.h>
+
#ifndef __WINE_SHLGUID_H
#define __WINE_SHLGUID_H
-#define DEFINE_SHLGUID(name, l, w1, w2) DEFINE_OLEGUID(name,l,w1,w2)
-
DEFINE_SHLGUID(CLSID_ShellDesktop, 0x00021400L, 0, 0);
DEFINE_SHLGUID(CLSID_ShellLink, 0x00021401L, 0, 0);
-DEFINE_SHLGUID(CATID_BrowsableShellExt, 0x00021490L, 0, 0);
-DEFINE_SHLGUID(CATID_BrowseInPlace, 0x00021491L, 0, 0);
-DEFINE_SHLGUID(CATID_DeskBand, 0x00021492L, 0, 0);
-DEFINE_SHLGUID(CATID_InfoBand, 0x00021493L, 0, 0);
-DEFINE_SHLGUID(CATID_CommBand, 0x00021494L, 0, 0);
-
-/* shell32 formatids */
-DEFINE_SHLGUID(FMTID_Intshcut, 0x000214A0L, 0, 0);
-DEFINE_SHLGUID(FMTID_InternetSite, 0x000214A1L, 0, 0);
-
/* command group ids */
DEFINE_SHLGUID(CGID_Explorer, 0x000214D0L, 0, 0);
DEFINE_SHLGUID(CGID_ShellDocView, 0x000214D1L, 0, 0);
-DEFINE_SHLGUID(CGID_ShellServiceObject, 0x000214D2L, 0, 0);
-DEFINE_SHLGUID(CGID_ExplorerBarDoc, 0x000214D3L, 0, 0);
-
-DEFINE_SHLGUID(IID_INewShortcutHookA, 0x000214E1L, 0, 0);
-DEFINE_SHLGUID(IID_IShellIcon, 0x000214E5L, 0, 0);
-DEFINE_SHLGUID(IID_IShellPropSheetExt, 0x000214E9L, 0, 0);
-DEFINE_SHLGUID(IID_IShellDetails, 0x000214ECL, 0, 0);
-DEFINE_SHLGUID(IID_IDelayedRelease, 0x000214EDL, 0, 0);
-DEFINE_SHLGUID(IID_IShellCopyHookA, 0x000214EFL, 0, 0);
-DEFINE_SHLGUID(IID_IFileViewerA, 0x000214F0L, 0, 0);
-DEFINE_SHLGUID(IID_IFileViewerSite, 0x000214F3L, 0, 0);
-DEFINE_SHLGUID(IID_IPropSheetPage, 0x000214F6L, 0, 0);
-DEFINE_SHLGUID(IID_INewShortcutHookW, 0x000214F7L, 0, 0);
-DEFINE_SHLGUID(IID_IFileViewerW, 0x000214F8L, 0, 0);
-DEFINE_SHLGUID(IID_IShellCopyHookW, 0x000214FCL, 0, 0);
-DEFINE_SHLGUID(IID_IRemoteComputer, 0x000214FEL, 0, 0);
-DEFINE_SHLGUID(IID_IQueryInfo, 0x00021500L, 0, 0);
-/* avoid duplicate definitions with shobjidl.h (FIXME) */
-#ifdef __REACTOS__
DEFINE_SHLGUID(IID_IExtractIconA, 0x000214EBL, 0, 0);
DEFINE_SHLGUID(IID_IExtractIconW, 0x000214FAL, 0, 0);
DEFINE_SHLGUID(IID_IContextMenu, 0x000214E4L, 0, 0);
@@ -70,48 +32,20 @@
DEFINE_SHLGUID(IID_IShellLinkA, 0x000214EEL, 0, 0);
DEFINE_SHLGUID(IID_IEnumIDList, 0x000214F2L, 0, 0);
DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
-#endif
-/* DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0); */
-/* DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0); */
+DEFINE_SHLGUID(IID_IShellExecuteHookA, 0x000214F5L, 0, 0);
+DEFINE_SHLGUID(IID_IShellExecuteHookW, 0x000214FBL, 0, 0);
DEFINE_GUID(SID_STopLevelBrowser, 0x4C96BE40L, 0x915C, 0x11CF, 0x99, 0xD3, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37);
-#define SID_SShellBrowser IID_IShellBrowser
-
-#define IID_IFileViewer WINELIB_NAME_AW(IID_IFileViewer)
-#define IID_IShellLink WINELIB_NAME_AW(IID_IShellLink)
-#define IID_IExtractIcon WINELIB_NAME_AW(IID_IExtractIcon)
-#define IID_IShellCopyHook WINELIB_NAME_AW(IID_IShellCopyHook)
-#define IID_IShellExecuteHook WINELIB_NAME_AW(IID_IShellExecuteHook)
-#define IID_INewShortcutHook WINELIB_NAME_AW(IID_INewShortcutHook)
-
-DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
-DEFINE_GUID (IID_IDockingWindowSite, 0x2A342FC2L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00, 0xA0, 0xC9, 0x2D, 0xBF, 0xE8);
-
-/****************************************************************************
- * the next IID's are the namespace elements of the pidls
- */
DEFINE_GUID(CLSID_NetworkPlaces, 0x208D2C60, 0x3AEA, 0x1069, 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
-DEFINE_GUID(CLSID_NetworkDomain, 0x46e06680, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
-DEFINE_GUID(CLSID_NetworkServer, 0xc0542a90, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
-DEFINE_GUID(CLSID_NetworkShare, 0x54a754c0, 0x4bf0, 0x11d1, 0x83, 0xee, 0x00, 0xa0, 0xc9, 0x0d, 0xc8, 0x49);
DEFINE_GUID(CLSID_MyComputer, 0x20D04FE0, 0x3AEA, 0x1069, 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_Internet, 0x871C5380, 0x42A0, 0x1069, 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
DEFINE_GUID(CLSID_ShellFSFolder, 0xF3364BA0, 0x65B9, 0x11CE, 0xA9, 0xBA, 0x00, 0xAA, 0x00, 0x4A, 0xE8, 0x37);
DEFINE_GUID(CLSID_RecycleBin, 0x645FF040, 0x5081, 0x101B, 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E);
DEFINE_GUID(CLSID_ControlPanel, 0x21EC2020, 0x3AEA, 0x1069, 0xA2, 0xDD, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
-DEFINE_GUID(CLSID_Printers, 0x2227A280, 0x3AEA, 0x1069, 0xA2, 0xDE, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D);
-DEFINE_GUID(CLSID_MyDocuments, 0x450d8fba, 0xad25, 0x11d0, 0x98, 0xa8, 0x08, 0x00, 0x36, 0x1b, 0x11, 0x03);
DEFINE_GUID(IID_IQueryAssociations, 0xc46ca590, 0x3c3f, 0x11d2, 0xbe, 0xe6, 0x00, 0x00, 0xf8, 0x05, 0xca, 0x57);
DEFINE_GUID(CLSID_DragDropHelper, 0x4657278a, 0x411b, 0x11d2, 0x83, 0x9a, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0);
-#define PID_FINDDATA 0
-#define PID_NETRESOURCE 1
-#define PID_DESCRIPTIONID 2
-#define PID_WHICHFOLDER 3
-#define PID_NETWORKLOCATION 4
-#define PID_COMPUTERNAME 5
-
-#endif /* __WINE_SHLGUID_H */
+#endif /* __WINE_SHLOBJ_H */
reactos/include/wine
diff -u -r1.3 -r1.3.8.1
--- shlobj.h 16 Feb 2004 21:46:11 -0000 1.3
+++ shlobj.h 30 Jun 2004 21:16:03 -0000 1.3.8.1
@@ -1,129 +1,24 @@
-/*
- * Copyright (C) the Wine project
+/* $Id: shlobj.h,v 1.3.8.1 2004/06/30 21:16:03 hyperion Exp $
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * Compatibility header
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * This header is wrapper to allow compilation of Wine DLLs under ReactOS
+ * build system. It contains definitions commonly refered to as Wineisms
+ * and definitions that are missing in w32api.
*/
-#ifndef __WINE_SHLOBJ_H
-#define __WINE_SHLOBJ_H
-
-#include <ole2.h>
-#include <commctrl.h>
-#include <prsht.h>
-#include <shlguid.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* defined(__cplusplus) */
+#include <winnetwk.h>
-#include <pshpack1.h>
+#include_next <shlobj.h>
-#include <shtypes.h>
+#include <shlguid.h>
#include <shobjidl.h>
+#ifndef __WINE_SHLOBJ_H
+#define __WINE_SHLOBJ_H
-LPVOID WINAPI SHAlloc(ULONG);
-HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,IUnknown*,REFIID,LPVOID*);
-HRESULT WINAPI SHCreateStdEnumFmtEtc(DWORD,const FORMATETC *,IEnumFORMATETC**);
-BOOL WINAPI SHFindFiles(LPCITEMIDLIST,LPCITEMIDLIST);
-void WINAPI SHFree(LPVOID);
-BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST pidl,LPSTR pszPath);
-BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl,LPWSTR pszPath);
-#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
-HRESULT WINAPI SHILCreateFromPath(LPCWSTR,LPITEMIDLIST*,DWORD*);
-LPITEMIDLIST WINAPI SHSimpleIDListFromPath(LPCWSTR);
-int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder*,LPCITEMIDLIST,int*);
-
-LPITEMIDLIST WINAPI ILAppendID(LPITEMIDLIST,LPCSHITEMID,BOOL);
-LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILCreateFromPathA(LPCSTR);
-LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR);
-#define ILCreateFromPath WINELIB_NAME_AW(ILCreateFromPath)
-LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST,LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST,LPCITEMIDLIST);
-LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
-void WINAPI ILFree(LPITEMIDLIST);
-LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
-UINT WINAPI ILGetSize(LPCITEMIDLIST);
-BOOL WINAPI ILIsEqual(LPCITEMIDLIST,LPCITEMIDLIST);
-BOOL WINAPI ILIsParent(LPCITEMIDLIST,LPCITEMIDLIST,BOOL);
-BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST);
-
-HRESULT WINAPI SHCoCreateInstance(LPCWSTR, const CLSID*, LPUNKNOWN, REFIID, LPVOID*);
-
-BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
-BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);
-#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
-
-/*****************************************************************************
- * Predeclare interfaces
- */
-typedef struct IShellIcon IShellIcon, *LPSHELLICON;
-
-
-/*****************************************************************************
- * IContextMenu interface
- */
-
-
-/* DATAOBJECT_InitShellIDList*/
-#define CFSTR_SHELLIDLIST "Shell IDList Array" /* CF_IDLIST */
-
-extern UINT cfShellIDList;
-
-typedef struct
-{ UINT cidl;
- UINT aoffset[1];
-} CIDA, *LPIDA;
-
-#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets" /* CF_OBJECTPOSITIONS */
-#define CFSTR_NETRESOURCES "Net Resource" /* CF_NETRESOURCE */
-
-/* DATAOBJECT_InitFileGroupDesc */
-#define CFSTR_FILEDESCRIPTORA "FileGroupDescriptor" /* CF_FILEGROUPDESCRIPTORA */
-extern UINT cfFileGroupDesc;
-
-#define CFSTR_FILEDESCRIPTORW "FileGroupDescriptorW" /* CF_FILEGROUPDESCRIPTORW */
-
-/* DATAOBJECT_InitFileContents*/
-#define CFSTR_FILECONTENTS "FileContents" /* CF_FILECONTENTS */
-extern UINT cfFileContents;
-
-#define CFSTR_FILENAMEA "FileName" /* CF_FILENAMEA */
-#define CFSTR_FILENAMEW "FileNameW" /* CF_FILENAMEW */
-#define CFSTR_PRINTERGROUP "PrinterFriendlyName" /* CF_PRINTERS */
-#define CFSTR_FILENAMEMAPA "FileNameMap" /* CF_FILENAMEMAPA */
-#define CFSTR_FILENAMEMAPW "FileNameMapW" /* CF_FILENAMEMAPW */
-#define CFSTR_SHELLURL "UniformResourceLocator"
-#define CFSTR_PREFERREDDROPEFFECT "Preferred DropEffect"
-#define CFSTR_PERFORMEDDROPEFFECT "Performed DropEffect"
-#define CFSTR_PASTESUCCEEDED "Paste Succeeded"
-#define CFSTR_INDRAGLOOP "InShellDragLoop"
-
-#define CFSTR_FILENAME WINELIB_NAME_AW(CFSTR_FILENAME)
-
-
-/************************************************************************
-* IShellView interface
-*/
-
-typedef GUID SHELLVIEWID;
#define SV_CLASS_NAME ("SHELLDLL_DefView")
-#define FCIDM_SHVIEWFIRST 0x0000
/* undocumented */
#define FCIDM_SHVIEW_ARRANGE 0x7001
#define FCIDM_SHVIEW_DELETE 0x7011
@@ -154,8 +49,6 @@
#define FCIDM_SHVIEW_EXPLORE 0x7101 /* FIXME */
#define FCIDM_SHVIEW_OPEN 0x7102 /* FIXME */
-#define FCIDM_SHVIEWLAST 0x7fff
-#define FCIDM_BROWSERFIRST 0xA000
/* undocumented toolbar items from stddlg's*/
#define FCIDM_TB_UPFOLDER 0xA001
#define FCIDM_TB_NEWFOLDER 0xA002
@@ -163,719 +56,16 @@
#define FCIDM_TB_REPORTVIEW 0xA004
#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
-#define FCIDM_BROWSERLAST 0xbf00
-#define FCIDM_GLOBALFIRST 0x8000
-#define FCIDM_GLOBALLAST 0x9fff
-
-/*
-* Global submenu IDs and separator IDs
-*/
-#define FCIDM_MENU_FILE (FCIDM_GLOBALFIRST+0x0000)
-#define FCIDM_MENU_EDIT (FCIDM_GLOBALFIRST+0x0040)
-#define FCIDM_MENU_VIEW (FCIDM_GLOBALFIRST+0x0080)
-#define FCIDM_MENU_VIEW_SEP_OPTIONS (FCIDM_GLOBALFIRST+0x0081)
-#define FCIDM_MENU_TOOLS (FCIDM_GLOBALFIRST+0x00c0)
-#define FCIDM_MENU_TOOLS_SEP_GOTO (FCIDM_GLOBALFIRST+0x00c1)
-#define FCIDM_MENU_HELP (FCIDM_GLOBALFIRST+0x0100)
-#define FCIDM_MENU_FIND (FCIDM_GLOBALFIRST+0x0140)
-#define FCIDM_MENU_EXPLORE (FCIDM_GLOBALFIRST+0x0150)
-#define FCIDM_MENU_FAVORITES (FCIDM_GLOBALFIRST+0x0170)
-
-/* control IDs known to the view */
-#define FCIDM_TOOLBAR (FCIDM_BROWSERFIRST + 0)
-#define FCIDM_STATUS (FCIDM_BROWSERFIRST + 1)
-
-
-/****************************************************************************
- * IShellIcon interface
- */
-
-#define INTERFACE IShellIcon
-#define IShellIcon_METHODS \
- IUnknown_METHODS \
- STDMETHOD(GetIconOf)(THIS_ LPCITEMIDLIST pidl, UINT flags, LPINT lpIconIndex) PURE;
-ICOM_DEFINE(IShellIcon, IUnknown)
-#undef INTERFACE
-
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IShellIcon_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IShellIcon_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IShellIcon_Release(p) (p)->lpVtbl->Release(p)
-/*** IShellIcon methods ***/
-#define IShellIcon_GetIconOf(p,a,b,c) (p)->lpVtbl->GetIconOf(p,a,b,c)
-#endif
-
-/****************************************************************************
-* SHAddToRecentDocs API
-*/
-#define SHARD_PIDL 0x00000001L
-#define SHARD_PATHA 0x00000002L
-#define SHARD_PATHW 0x00000003L
-#define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH)
-
-DWORD WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv);
-
-/****************************************************************************
- * SHBrowseForFolder API
- */
-typedef INT (CALLBACK *BFFCALLBACK)(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData);
-
-typedef struct tagBROWSEINFOA {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPSTR pszDisplayName;
- LPCSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- INT iImage;
-} BROWSEINFOA, *PBROWSEINFOA, *LPBROWSEINFOA;
-
-typedef struct tagBROWSEINFOW {
- HWND hwndOwner;
- LPCITEMIDLIST pidlRoot;
- LPWSTR pszDisplayName;
- LPCWSTR lpszTitle;
- UINT ulFlags;
- BFFCALLBACK lpfn;
- LPARAM lParam;
- INT iImage;
-} BROWSEINFOW, *PBROWSEINFOW, *LPBROWSEINFOW;
-
-#define BROWSEINFO WINELIB_NAME_AW(BROWSEINFO)
-#define PBROWSEINFO WINELIB_NAME_AW(PBROWSEINFO)
-#define LPBROWSEINFO WINELIB_NAME_AW(LPBROWSEINFO)
-
-/* Browsing for directory. */
-#define BIF_RETURNONLYFSDIRS 0x0001
-#define BIF_DONTGOBELOWDOMAIN 0x0002
-#define BIF_STATUSTEXT 0x0004
-#define BIF_RETURNFSANCESTORS 0x0008
-#define BIF_EDITBOX 0x0010
-#define BIF_VALIDATE 0x0020
-#define BIF_NEWDIALOGSTYLE 0x0040
-
-#define BIF_BROWSEFORCOMPUTER 0x1000
-#define BIF_BROWSEFORPRINTER 0x2000
-#define BIF_BROWSEINCLUDEFILES 0x4000
-
-/* message from browser */
-#define BFFM_INITIALIZED 1
-#define BFFM_SELCHANGED 2
-#define BFFM_VALIDATEFAILEDA 3 /* lParam:szPath ret:1(cont),0(EndDialog) */
-#define BFFM_VALIDATEFAILEDW 4 /* lParam:wzPath ret:1(cont),0(EndDialog) */
-
-/* messages to browser */
-#define BFFM_SETSTATUSTEXTA (WM_USER+100)
-#define BFFM_ENABLEOK (WM_USER+101)
-#define BFFM_SETSELECTIONA (WM_USER+102)
-#define BFFM_SETSELECTIONW (WM_USER+103)
-#define BFFM_SETSTATUSTEXTW (WM_USER+104)
-#define BFFM_SETOKTEXT (WM_USER+105)
-#define BFFM_SETEXPANDED (WM_USER+106)
-
-LPITEMIDLIST WINAPI SHBrowseForFolderA(LPBROWSEINFOA lpbi);
-LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi);
-#define SHBrowseForFolder WINELIB_NAME_AW(SHBrowseForFolder)
-#define BFFM_SETSTATUSTEXT WINELIB_NAME_AW(BFFM_SETSTATUSTEXT)
-#define BFFM_SETSELECTION WINELIB_NAME_AW(BFFM_SETSELECTION)
-#define BFFM_VALIDATEFAILED WINELIB_NAME_AW(BFFM_VALIDATEFAILED)
-
-/****************************************************************************
-* SHGetDataFromIDList API
-*/
-#define SHGDFIL_FINDDATA 1
-#define SHGDFIL_NETRESOURCE 2
-#define SHGDFIL_DESCRIPTIONID 3
-
-#define SHDID_ROOT_REGITEM 1
-#define SHDID_FS_FILE 2
-#define SHDID_FS_DIRECTORY 3
-#define SHDID_FS_OTHER 4
-#define SHDID_COMPUTER_DRIVE35 5
-#define SHDID_COMPUTER_DRIVE525 6
-#define SHDID_COMPUTER_REMOVABLE 7
-#define SHDID_COMPUTER_FIXED 8
-#define SHDID_COMPUTER_NETDRIVE 9
-#define SHDID_COMPUTER_CDROM 10
-#define SHDID_COMPUTER_RAMDISK 11
-#define SHDID_COMPUTER_OTHER 12
-#define SHDID_NET_DOMAIN 13
-#define SHDID_NET_SERVER 14
-#define SHDID_NET_SHARE 15
-#define SHDID_NET_RESTOFNET 16
-#define SHDID_NET_OTHER 17
-#define SHDID_COMPUTER_IMAGING 18
-#define SHDID_COMPUTER_AUDIO 19
-#define SHDID_COMPUTER_SHAREDDOCS 20
-
-typedef struct _SHDESCRIPTIONID
-{ DWORD dwDescriptionId;
- CLSID clsid;
-} SHDESCRIPTIONID, *LPSHDESCRIPTIONID;
-
-HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
-HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int nFormat, LPVOID pv, int cb);
-#define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
-
-BOOL WINAPI SHGetSpecialFolderPathA (HWND hwndOwner, LPSTR szPath, int nFolder, BOOL bCreate);
-BOOL WINAPI SHGetSpecialFolderPathW (HWND hwndOwner, LPWSTR szPath, int nFolder, BOOL bCreate);
-#define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
-
-/****************************************************************************
-* shlview structures
-*/
-
-/*
-* IShellFolderViewCallback Callback
-* This "callback" is called by the shells default IShellView implementation (that
-* we got using SHCreateShellViewEx()), to notify us of the various things that
-* are happening to the shellview (and ask for things too).
-*
-* You don't have to support anything here - anything you don't want to
-* handle, the shell will do itself if you just return E_NOTIMPL. This parameters
-* that the shell passes to this function are entirely undocumented.
-*
-* HOWEVER, as the cabview sample as originally written used this callback, the
-* writers implemented the callback mechanism on top of their own IShellView.
-* Look there for some clues on what to do here.
-*/
-
-typedef HRESULT (CALLBACK *SHELLVIEWPROC)(DWORD dwUserParam,LPSHELLFOLDER psf,
- HWND hwnd,UINT uMsg,UINT wParam,LPARAM lParam);
-
-/* NF valid values for the "viewmode" item of the SHELLTEMPLATE*/
-#define NF_INHERITVIEW 0x0000
-#define NF_LOCALVIEW 0x0001
-
-typedef struct _SHELLVIEWDATA /* idl */
-{ DWORD dwSize;
- LPSHELLFOLDER pShellFolder;
- DWORD dwUserParam;
- LPCITEMIDLIST pidl;
- DWORD v3; /* always 0 */
- SHELLVIEWPROC pCallBack;
- DWORD viewmode; /* NF_* enum */
-} SHELLVIEWDATA, * LPSHELLVIEWDATA;
-
-HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal) ;
-
-/**********************************************************************
- * SHGetSetSettings ()
- */
-
-typedef struct
-{
- BOOL fShowAllObjects : 1;
- BOOL fShowExtensions : 1;
- BOOL fNoConfirmRecycle : 1;
-
- BOOL fShowSysFiles : 1;
- BOOL fShowCompColor : 1;
- BOOL fDoubleClickInWebView : 1;
- BOOL fDesktopHTML : 1;
- BOOL fWin95Classic : 1;
- BOOL fDontPrettyPath : 1;
- BOOL fShowAttribCol : 1;
- BOOL fMapNetDrvBtn : 1;
- BOOL fShowInfoTip : 1;
- BOOL fHideIcons : 1;
- BOOL fWebView : 1;
- BOOL fFilter : 1;
- BOOL fShowSuperHidden : 1;
- BOOL fNoNetCrawling : 1;
-
- DWORD dwWin95Unused;
- UINT uWin95Unused;
- LONG lParamSort;
- int iSortDirection;
- UINT version;
- UINT uNotUsed;
- BOOL fSepProcess: 1;
- BOOL fStartPanelOn: 1;
- BOOL fShowStartPage: 1;
- UINT fSpareFlags : 13;
-} SHELLSTATE, *LPSHELLSTATE;
-
-/**********************************************************************
- * SHGetSettings ()
- */
-typedef struct
-{ BOOL fShowAllObjects : 1;
- BOOL fShowExtensions : 1;
- BOOL fNoConfirmRecycle : 1;
- BOOL fShowSysFiles : 1;
-
- BOOL fShowCompColor : 1;
- BOOL fDoubleClickInWebView : 1;
- BOOL fDesktopHTML : 1;
- BOOL fWin95Classic : 1;
-
- BOOL fDontPrettyPath : 1;
- BOOL fShowAttribCol : 1;
- BOOL fMapNetDrvBtn : 1;
- BOOL fShowInfoTip : 1;
-
- BOOL fHideIcons : 1;
- UINT fRestFlags : 3;
-} SHELLFLAGSTATE, * LPSHELLFLAGSTATE;
-
-VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
-
-#define SSF_SHOWALLOBJECTS 0x0001
-#define SSF_SHOWEXTENSIONS 0x0002
-#define SSF_SHOWCOMPCOLOR 0x0008
-#define SSF_SHOWSYSFILES 0x0020
-#define SSF_DOUBLECLICKINWEBVIEW 0x0080
-#define SSF_SHOWATTRIBCOL 0x0100
-#define SSF_DESKTOPHTML 0x0200
-#define SSF_WIN95CLASSIC 0x0400
-#define SSF_DONTPRETTYPATH 0x0800
-#define SSF_SHOWINFOTIP 0x2000
-#define SSF_MAPNETDRVBUTTON 0x1000
-#define SSF_NOCONFIRMRECYCLE 0x8000
-#define SSF_HIDEICONS 0x4000
-
-/****************************************************************************
-* SHRestricted API
-*/
-typedef enum RESTRICTIONS
-{
- REST_NONE = 0x00000000,
- REST_NORUN = 0x00000001,
- REST_NOCLOSE = 0x00000002,
- REST_NOSAVESET = 0x00000004,
- REST_NOFILEMENU = 0x00000008,
- REST_NOSETFOLDERS = 0x00000010,
- REST_NOSETTASKBAR = 0x00000020,
- REST_NODESKTOP = 0x00000040,
- REST_NOFIND = 0x00000080,
- REST_NODRIVES = 0x00000100,
- REST_NODRIVEAUTORUN = 0x00000200,
- REST_NODRIVETYPEAUTORUN = 0x00000400,
- REST_NONETHOOD = 0x00000800,
- REST_STARTBANNER = 0x00001000,
- REST_RESTRICTRUN = 0x00002000,
- REST_NOPRINTERTABS = 0x00004000,
- REST_NOPRINTERDELETE = 0x00008000,
- REST_NOPRINTERADD = 0x00010000,
- REST_NOSTARTMENUSUBFOLDERS = 0x00020000,
- REST_MYDOCSONNET = 0x00040000,
- REST_NOEXITTODOS = 0x00080000,
- REST_ENFORCESHELLEXTSECURITY = 0x00100000,
- REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,
- REST_NOCOMMONGROUPS = 0x00400000,
- REST_SEPARATEDESKTOPPROCESS = 0x00800000,
- REST_NOWEB = 0x01000000,
- REST_NOTRAYCONTEXTMENU = 0x02000000,
- REST_NOVIEWCONTEXTMENU = 0x04000000,
- REST_NONETCONNECTDISCONNECT = 0x08000000,
- REST_STARTMENULOGOFF = 0x10000000,
- REST_NOSETTINGSASSIST = 0x20000000,
- REST_NOINTERNETICON = 0x40000001,
- REST_NORECENTDOCSHISTORY,
- REST_NORECENTDOCSMENU,
- REST_NOACTIVEDESKTOP,
- REST_NOACTIVEDESKTOPCHANGES,
- REST_NOFAVORITESMENU,
- REST_CLEARRECENTDOCSONEXIT,
- REST_CLASSICSHELL,
- REST_NOCUSTOMIZEWEBVIEW,
-
- REST_NOHTMLWALLPAPER = 0x40000010,
- REST_NOCHANGINGWALLPAPER,
- REST_NODESKCOMP,
- REST_NOADDDESKCOMP,
- REST_NODELDESKCOMP,
- REST_NOCLOSEDESKCOMP,
- REST_NOCLOSE_DRAGDROPBAND,
- REST_NOMOVINGBAND,
- REST_NOEDITDESKCOMP,
- REST_NORESOLVESEARCH,
- REST_NORESOLVETRACK,
- REST_FORCECOPYACLWITHFILE,
- REST_NOLOGO3CHANNELNOTIFY,
- REST_NOFORGETSOFTWAREUPDATE,
- REST_NOSETACTIVEDESKTOP,
- REST_NOUPDATEWINDOWS,
- REST_NOCHANGESTARMENU, /* 0x40000020 */
- REST_NOFOLDEROPTIONS,
- REST_HASFINDCOMPUTERS,
- REST_INTELLIMENUS,
- REST_RUNDLGMEMCHECKBOX,
- REST_ARP_ShowPostSetup,
- REST_NOCSC,
- REST_NOCONTROLPANEL,
- REST_ENUMWORKGROUP,
- REST_ARP_NOARP,
- REST_ARP_NOREMOVEPAGE,
- REST_ARP_NOADDPAGE,
- REST_ARP_NOWINSETUPPAGE,
- REST_GREYMSIADS,
- REST_NOCHANGEMAPPEDDRIVELABEL,
- REST_NOCHANGEMAPPEDDRIVECOMMENT,
- REST_MaxRecentDocs, /* 0x40000030 */
- REST_NONETWORKCONNECTIONS,
- REST_FORCESTARTMENULOGOFF,
- REST_NOWEBVIEW,
- REST_NOCUSTOMIZETHISFOLDER,
- REST_NOENCRYPTION,
-
- REST_ALLOWFRENCHENCRYPTION, /* not documented */
-
- REST_DONTSHOWSUPERHIDDEN,
- REST_NOSHELLSEARCHBUTTON,
- REST_NOHARDWARETAB,
- REST_NORUNASINSTALLPROMPT,
- REST_PROMPTRUNASINSTALLNETPATH,
- REST_NOMANAGEMYCOMPUTERVERB,
- REST_NORECENTDOCSNETHOOD,
- REST_DISALLOWRUN,
- REST_NOWELCOMESCREEN,
- REST_RESTRICTCPL, /* 0x40000040 */
- REST_DISALLOWCPL,
- REST_NOSMBALLOONTIP,
- REST_NOSMHELP,
- REST_NOWINKEYS,
- REST_NOENCRYPTONMOVE,
- REST_NOLOCALMACHINERUN,
- REST_NOCURRENTUSERRUN,
- REST_NOLOCALMACHINERUNONCE,
- REST_NOCURRENTUSERRUNONCE,
- REST_FORCEACTIVEDESKTOPON,
- REST_NOCOMPUTERSNEARME,
- REST_NOVIEWONDRIVE,
- REST_NONETCRAWL,
- REST_NOSHAREDDOCUMENTS,
- REST_NOSMMYDOCS,
- REST_NOSMMYPICS, /* 0x40000050 */
- REST_ALLOWBITBUCKDRIVES,
- REST_NONLEGACYSHELLMODE,
- REST_NOCONTROLPANELBARRICADE,
- REST_NOSTARTPAGE,
- REST_NOAUTOTRAYNOTIFY,
- REST_NOTASKGROUPING,
- REST_NOCDBURNING,
- REST_MYCOMPNOPROP,
- REST_MYDOCSNOPROP,
- REST_NOSTARTPANEL,
- REST_NODISPLAYAPPEARANCEPAGE,
- REST_NOTHEMESTAB,
- REST_NOVISUALSTYLECHOICE,
- REST_NOSIZECHOICE,
- REST_NOCOLORCHOICE,
- REST_SETVISUALSTYLE, /* 0x40000060 */
- REST_STARTRUNNOHOMEPATH,
- REST_NOUSERNAMEINSTARTPANEL,
- REST_NOMYCOMPUTERICON,
- REST_NOSMNETWORKPLACES,
- REST_NOSMPINNEDLIST,
- REST_NOSMMYMUSIC,
- REST_NOSMEJECTPC,
- REST_NOSMMOREPROGRAMS,
- REST_NOSMMFUPROGRAMS,
- REST_NOTRAYITEMSDISPLAY,
- REST_NOTOOLBARSONTASKBAR,
- /* 0x4000006C
- 0x4000006D
- 0x4000006E */
- REST_NOSMCONFIGUREPROGRAMS = 0x4000006F,
- REST_HIDECLOCK, /* 0x40000070 */
- REST_NOLOWDISKSPACECHECKS,
- REST_NOENTIRENETWORK,
- REST_NODESKTOPCLEANUP,
- REST_BITBUCKNUKEONDELETE,
- REST_BITBUCKCONFIRMDELETE,
- REST_BITBUCKNOPROP,
- REST_NODISPBACKGROUND,
- REST_NODISPSCREENSAVEPG,
- REST_NODISPSETTINGSPG,
- REST_NODISPSCREENSAVEPREVIEW,
- REST_NODISPLAYCPL,
- REST_HIDERUNASVERB,
- REST_NOTHUMBNAILCACHE,
- REST_NOSTRCMPLOGICAL,
- REST_NOPUBLISHWIZARD,
- REST_NOONLINEPRINTSWIZARD, /* 0x40000080 */
- REST_NOWEBSERVICES,
- REST_ALLOWUNHASHEDWEBVIEW,
- REST_ALLOWLEGACYWEBVIEW,
- REST_REVERTWEBVIEWSECURITY,
-
- REST_INHERITCONSOLEHANDLES = 0x40000086,
-
- REST_NODISCONNECT = 0x41000001,
- REST_NOSECURITY,
- REST_NOFILEASSOCIATE, /* 0x41000003 */
-} RESTRICTIONS;
-
-DWORD WINAPI SHRestricted(RESTRICTIONS rest);
-
-/****************************************************************************
-* SHChangeNotify API
-*/
-typedef struct _SHChangeNotifyEntry
-{
- LPCITEMIDLIST pidl;
- BOOL fRecursive;
-} SHChangeNotifyEntry;
-
-#define SHCNE_RENAMEITEM 0x00000001
-#define SHCNE_CREATE 0x00000002
-#define SHCNE_DELETE 0x00000004
-#define SHCNE_MKDIR 0x00000008
-#define SHCNE_RMDIR 0x00000010
-#define SHCNE_MEDIAINSERTED 0x00000020
-#define SHCNE_MEDIAREMOVED 0x00000040
-#define SHCNE_DRIVEREMOVED 0x00000080
-#define SHCNE_DRIVEADD 0x00000100
-#define SHCNE_NETSHARE 0x00000200
-#define SHCNE_NETUNSHARE 0x00000400
-#define SHCNE_ATTRIBUTES 0x00000800
-#define SHCNE_UPDATEDIR 0x00001000
-#define SHCNE_UPDATEITEM 0x00002000
-#define SHCNE_SERVERDISCONNECT 0x00004000
-#define SHCNE_UPDATEIMAGE 0x00008000
-#define SHCNE_DRIVEADDGUI 0x00010000
-#define SHCNE_RENAMEFOLDER 0x00020000
-#define SHCNE_FREESPACE 0x00040000
-
-#define SHCNE_EXTENDED_EVENT 0x04000000
-#define SHCNE_ASSOCCHANGED 0x08000000
-#define SHCNE_DISKEVENTS 0x0002381F
-#define SHCNE_GLOBALEVENTS 0x0C0581E0
-#define SHCNE_ALLEVENTS 0x7FFFFFFF
-#define SHCNE_INTERRUPT 0x80000000
-
-#define SHCNEE_ORDERCHANGED 0x0002L
-#define SHCNEE_MSI_CHANGE 0x0004L
-#define SHCNEE_MSI_UNINSTALL 0x0005L
-
-#define SHCNF_IDLIST 0x0000
-#define SHCNF_PATHA 0x0001
-#define SHCNF_PRINTERA 0x0002
-#define SHCNF_DWORD 0x0003
-#define SHCNF_PATHW 0x0005
-#define SHCNF_PRINTERW 0x0006
-#define SHCNF_TYPE 0x00FF
-#define SHCNF_FLUSH 0x1000
-#define SHCNF_FLUSHNOWAIT 0x2000
-
-#define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH)
-#define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER)
-
-void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2);
-
-/*
- * IShellChangeNotify
- */
-typedef struct IShellChangeNotify IShellChangeNotify, *LPSHELLCHANGENOTIFY;
-
-#define INTERFACE IShellChangeNotify
-#define IShellChangeNotify_METHODS \
- IUnknown_METHODS \
- STDMETHOD(OnChange)(THIS_ LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
-
-ICOM_DEFINE(IShellChangeNotify, IUnknown)
-#undef INTERFACE
-
-#ifdef COBJMACROS
-/*** IUnknown methods ***/
-#define IShellChangeNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IShellChangeNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IShellChangeNotify_Release(p) (p)->lpVtbl->Release(p)
-/*** IShellChangeNotify methods ***/
-#define IShellChangeNotify_OnChange(p,a,b,c) (p)->lpVtbl->OnChange(p,a,b,c)
-#endif
-
-typedef struct _SHChangeDWORDAsIDList {
- USHORT cb;
- DWORD dwItem1;
- DWORD dwItem2;
- USHORT cbZero;
-} SHChangeDWORDAsIDList, *LPSHChangeDWORDAsIDList;
-
-typedef struct _SHChangeProductKeyAsIDList {
- USHORT cb;
- WCHAR wszProductKey[39];
- USHORT cbZero;
-} SHChangeProductKeyAsIDList, *LPSHChangeProductKeyAsIDList;
-
-ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, int fSources, LONG fEvents, UINT wMsg,
- int cEntries, SHChangeNotifyEntry *pshcne);
-BOOL WINAPI SHChangeNotifyDeregister(ULONG ulID);
-HANDLE WINAPI SHChangeNotification_Lock(HANDLE hChangeNotification, DWORD dwProcessId,
- LPITEMIDLIST **pppidl, LONG *plEvent);
-BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock);
-
-HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMIDLIST * ppidlReal);
-
-/****************************************************************************
-* SHCreateDirectory API
-*/
-DWORD WINAPI SHCreateDirectory(HWND, LPCVOID);
-DWORD WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES);
-DWORD WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES);
-
-/****************************************************************************
-* SHGetSpecialFolderLocation API
-*/
-HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, int nFolder, LPITEMIDLIST * ppidl);
-HRESULT WINAPI SHGetFolderLocation(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwReserved, LPITEMIDLIST *ppidl);
-
-#define CSIDL_DESKTOP 0x0000
-#define CSIDL_INTERNET 0x0001
-#define CSIDL_PROGRAMS 0x0002
-#define CSIDL_CONTROLS 0x0003
-#define CSIDL_PRINTERS 0x0004
-#define CSIDL_PERSONAL 0x0005
-#define CSIDL_FAVORITES 0x0006
-#define CSIDL_STARTUP 0x0007
-#define CSIDL_RECENT 0x0008
-#define CSIDL_SENDTO 0x0009
-#define CSIDL_BITBUCKET 0x000a
-#define CSIDL_STARTMENU 0x000b
-#define CSIDL_MYDOCUMENTS 0x000c
-#define CSIDL_MYMUSIC 0x000d
-#define CSIDL_MYVIDEO 0x000e
-#define CSIDL_DESKTOPDIRECTORY 0x0010
-#define CSIDL_DRIVES 0x0011
-#define CSIDL_NETWORK 0x0012
-#define CSIDL_NETHOOD 0x0013
-#define CSIDL_FONTS 0x0014
-#define CSIDL_TEMPLATES 0x0015
-#define CSIDL_COMMON_STARTMENU 0x0016
-#define CSIDL_COMMON_PROGRAMS 0X0017
-#define CSIDL_COMMON_STARTUP 0x0018
-#define CSIDL_COMMON_DESKTOPDIRECTORY 0x0019
-#define CSIDL_APPDATA 0x001a
-#define CSIDL_PRINTHOOD 0x001b
-#define CSIDL_LOCAL_APPDATA 0x001c
-#define CSIDL_ALTSTARTUP 0x001d
-#define CSIDL_COMMON_ALTSTARTUP 0x001e
-#define CSIDL_COMMON_FAVORITES 0x001f
-#define CSIDL_INTERNET_CACHE 0x0020
-#define CSIDL_COOKIES 0x0021
-#define CSIDL_HISTORY 0x0022
-#define CSIDL_COMMON_APPDATA 0x0023
-#define CSIDL_WINDOWS 0x0024
-#define CSIDL_SYSTEM 0x0025
-#define CSIDL_PROGRAM_FILES 0x0026
-#define CSIDL_MYPICTURES 0x0027
-#define CSIDL_PROFILE 0x0028
-#define CSIDL_SYSTEMX86 0x0029
-#define CSIDL_PROGRAM_FILESX86 0x002a
-#define CSIDL_PROGRAM_FILES_COMMON 0x002b
-#define CSIDL_PROGRAM_FILES_COMMONX86 0x002c
-#define CSIDL_COMMON_TEMPLATES 0x002d
-#define CSIDL_COMMON_DOCUMENTS 0x002e
-#define CSIDL_COMMON_ADMINTOOLS 0x002f
-#define CSIDL_ADMINTOOLS 0x0030
-#define CSIDL_CONNECTIONS 0x0031
-#define CSIDL_COMMON_MUSIC 0x0035
-#define CSIDL_COMMON_PICTURES 0x0036
-#define CSIDL_COMMON_VIDEO 0x0037
-#define CSIDL_RESOURCES 0x0038
-#define CSIDL_RESOURCES_LOCALIZED 0x0039
-#define CSIDL_COMMON_OEM_LINKS 0x003a
-#define CSIDL_CDBURN_AREA 0x003b
-#define CSIDL_COMPUTERSNEARME 0x003d
-#define CSIDL_PROFILES 0x003e
#define CSIDL_FOLDER_MASK 0x00ff
-#define CSIDL_FLAG_PER_USER_INIT 0x0800
-#define CSIDL_FLAG_NO_ALIAS 0x1000
-#define CSIDL_FLAG_DONT_VERIFY 0x4000
-#define CSIDL_FLAG_CREATE 0x8000
-
-#define CSIDL_FLAG_MASK 0xff00
-
-/****************************************************************************
- * SHGetDesktopFolder API
- */
-DWORD WINAPI SHGetDesktopFolder(IShellFolder * *);
-
-/****************************************************************************
- * SHBindToParent API
- */
-HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast);
-
-/****************************************************************************
-* SHDefExtractIcon API
-*/
-HRESULT WINAPI SHDefExtractIconA(LPCSTR pszIconFile, int iIndex, UINT uFlags,
- HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
-HRESULT WINAPI SHDefExtractIconW(LPCWSTR pszIconFile, int iIndex, UINT uFlags,
- HICON* phiconLarge, HICON* phiconSmall, UINT nIconSize);
-#define SHDefExtractIcon WINELIB_NAME_AW(SHDefExtractIcon)
-/*
- * DROPFILES for CF_HDROP and CF_PRINTERS
- */
-typedef struct _DROPFILES
-{
- DWORD pFiles;
- POINT pt;
- BOOL fNC;
- BOOL fWide;
-} DROPFILES, *LPDROPFILES;
-
-#include <poppack.h>
+LPVOID WINAPI SHAlloc(ULONG);
+void WINAPI SHFree(LPVOID);
+int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder*,LPCITEMIDLIST,int*);
/*****************************************************************************
* IFileSystemBindData interface
*/
-#ifndef __IFileSystemBindData_FWD_DEFINED__
-#define __IFileSystemBindData_FWD_DEFINED__
-typedef struct IFileSystemBindData IFileSystemBindData;
-#endif
-
-typedef IFileSystemBindData *LPFILESYSTEMBINDDATA;
-
-#ifndef __IFileSystemBindData_INTERFACE_DEFINED__
-#define __IFileSystemBindData_INTERFACE_DEFINED__
-
DEFINE_GUID(IID_IFileSystemBindData, 0x01e18d10, 0x4d8b, 0x11d2, 0x85,0x5d, 0x00,0x60,0x08,0x05,0x93,0x67);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IFileSystemBindData : public IUnknown
-{
- virtual HRESULT STDMETHODCALLTYPE GetFindData(
- WIN32_FIND_DATAW* pfd) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetFindData(
- const WIN32_FIND_DATAW* pfd) = 0;
-
-};
-#else
-typedef struct IFileSystemBindDataVtbl IFileSystemBindDataVtbl;
-struct IFileSystemBindData {
- const IFileSystemBindDataVtbl* lpVtbl;
-};
-struct IFileSystemBindDataVtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IFileSystemBindData* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IFileSystemBindData* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IFileSystemBindData* This);
-
- /*** IFileSystemBindData methods ***/
- HRESULT (STDMETHODCALLTYPE *GetFindData)(
- IFileSystemBindData* This,
- WIN32_FIND_DATAW* pfd);
-
- HRESULT (STDMETHODCALLTYPE *SetFindData)(
- IFileSystemBindData* This,
- const WIN32_FIND_DATAW* pfd);
-
-};
/*** IUnknown methods ***/
#define IFileSystemBindData_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
@@ -885,73 +75,4 @@
#define IFileSystemBindData_GetFindData(p,a) (p)->lpVtbl->GetFindData(p,a)
#define IFileSystemBindData_SetFindData(p,a) (p)->lpVtbl->SetFindData(p,a)
-#endif
-
-#define IFileSystemBindData_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IFileSystemBindData methods ***/ \
- STDMETHOD_(HRESULT,GetFindData)(THIS_ WIN32_FIND_DATAW* pfd) PURE; \
- STDMETHOD_(HRESULT,SetFindData)(THIS_ const WIN32_FIND_DATAW* pfd) PURE;
-
-#endif /* __IFileSystemBindData_INTERFACE_DEFINED__ */
-
-
-/****************************************************************************
- * Drag And Drop Routines
- */
-
-/* DAD_AutoScroll sample structure */
-#define NUM_POINTS 3
-typedef struct
-{
- int iNextSample;
- DWORD dwLastScroll;
- BOOL bFull;
- POINT pts[NUM_POINTS];
- DWORD dwTimes[NUM_POINTS];
-} AUTO_SCROLL_DATA;
-
-BOOL WINAPI DAD_SetDragImage(HIMAGELIST,LPPOINT);
-BOOL WINAPI DAD_DragEnterEx(HWND,POINT);
-BOOL WINAPI DAD_DragEnterEx2(HWND,POINT,IDataObject*);
-BOOL WINAPI DAD_DragMove(POINT);
-BOOL WINAPI DAD_DragLeave(void);
-BOOL WINAPI DAD_AutoScroll(HWND,AUTO_SCROLL_DATA*,LPPOINT);
-HRESULT WINAPI SHDoDragDrop(HWND,IDataObject*,IDropSource*,DWORD,LPDWORD);
-
-
-/****************************************************************************
- * Cabinet functions
- */
-
-typedef struct {
- WORD cLength;
- WORD nVersion;
- BOOL fFullPathTitle:1;
- BOOL fSaveLocalView:1;
- BOOL fNotShell:1;
- BOOL fSimpleDefault:1;
- BOOL fDontShowDescBar:1;
- BOOL fNewWindowMode:1;
- BOOL fShowCompColor:1;
- BOOL fDontPrettyNames:1;
- BOOL fAdminsCreateCommonGroups:1;
- UINT fUnusedFlags:7;
- UINT fMenuEnumFilter;
-} CABINETSTATE, *LPCABINETSTATE;
-
-#define CABINETSTATE_VERSION 2
-
-BOOL WINAPI ReadCabinetState(CABINETSTATE *, int);
-BOOL WINAPI WriteCabinetState(CABINETSTATE *);
-
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif /* defined(__cplusplus) */
-
#endif /* __WINE_SHLOBJ_H */
reactos/include/wine
diff -u -r1.3 -r1.3.12.1
--- shobjidl.h 6 Jan 2004 22:15:15 -0000 1.3
+++ shobjidl.h 30 Jun 2004 21:16:03 -0000 1.3.12.1
@@ -1,4240 +1,41 @@
-/*** Autogenerated by WIDL 0.1 from shobjidl.idl - Do not edit ***/
-#include <rpc.h>
-#include <rpcndr.h>
-
-#ifndef __WIDL_SHOBJIDL_H
-#define __WIDL_SHOBJIDL_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <objidl.h>
-#include <oleidl.h>
-#include <oaidl.h>
-#include <shtypes.h>
-#include <servprov.h>
-#include <comcat.h>
-#ifndef __IPersistFolder_FWD_DEFINED__
-#define __IPersistFolder_FWD_DEFINED__
-typedef struct IPersistFolder IPersistFolder;
-#endif
-
-typedef IPersistFolder *LPPERSISTFOLDER;
-
-/*****************************************************************************
- * IPersistFolder interface
- */
-#ifndef __IPersistFolder_INTERFACE_DEFINED__
-#define __IPersistFolder_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IPersistFolder, 0x000214ea, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IPersistFolder : public IPersist
-{
- virtual HRESULT STDMETHODCALLTYPE Initialize(
- LPCITEMIDLIST pidl) = 0;
-
-};
-#else
-typedef struct IPersistFolderVtbl IPersistFolderVtbl;
-struct IPersistFolder {
- const IPersistFolderVtbl* lpVtbl;
-};
-struct IPersistFolderVtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IPersistFolder* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IPersistFolder* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IPersistFolder* This);
-
- /*** IPersist methods ***/
- HRESULT (STDMETHODCALLTYPE *GetClassID)(
- IPersistFolder* This,
- CLSID* pClassID);
-
- /*** IPersistFolder methods ***/
- HRESULT (STDMETHODCALLTYPE *Initialize)(
- IPersistFolder* This,
- LPCITEMIDLIST pidl);
-
-};
-
-/*** IUnknown methods ***/
-#define IPersistFolder_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IPersistFolder_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IPersistFolder_Release(p) (p)->lpVtbl->Release(p)
-/*** IPersist methods ***/
-#define IPersistFolder_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
-/*** IPersistFolder methods ***/
-#define IPersistFolder_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
-
-#endif
-
-#define IPersistFolder_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IPersist methods ***/ \
- STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
- /*** IPersistFolder methods ***/ \
- STDMETHOD_(HRESULT,Initialize)(THIS_ LPCITEMIDLIST pidl) PURE;
-
-HRESULT CALLBACK IPersistFolder_Initialize_Proxy(
- IPersistFolder* This,
- LPCITEMIDLIST pidl);
-void __RPC_STUB IPersistFolder_Initialize_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-
-#endif /* __IPersistFolder_INTERFACE_DEFINED__ */
-
-#ifndef __IPersistFolder2_FWD_DEFINED__
-#define __IPersistFolder2_FWD_DEFINED__
-typedef struct IPersistFolder2 IPersistFolder2;
-#endif
-
-typedef IPersistFolder2 *LPPERSISTFOLDER2;
-
-/*****************************************************************************
- * IPersistFolder2 interface
- */
-#ifndef __IPersistFolder2_INTERFACE_DEFINED__
-#define __IPersistFolder2_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IPersistFolder2, 0x1ac3d9f0, 0x175c, 0x11d1, 0x95,0xbe, 0x00,0x60,0x97,0x97,0xea,0x4f);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IPersistFolder2 : public IPersistFolder
-{
- virtual HRESULT STDMETHODCALLTYPE GetCurFolder(
- LPITEMIDLIST* ppidl) = 0;
-
-};
-#else
-typedef struct IPersistFolder2Vtbl IPersistFolder2Vtbl;
-struct IPersistFolder2 {
- const IPersistFolder2Vtbl* lpVtbl;
-};
-struct IPersistFolder2Vtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IPersistFolder2* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IPersistFolder2* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IPersistFolder2* This);
-
- /*** IPersist methods ***/
- HRESULT (STDMETHODCALLTYPE *GetClassID)(
- IPersistFolder2* This,
- CLSID* pClassID);
-
- /*** IPersistFolder methods ***/
- HRESULT (STDMETHODCALLTYPE *Initialize)(
- IPersistFolder2* This,
- LPCITEMIDLIST pidl);
-
- /*** IPersistFolder2 methods ***/
- HRESULT (STDMETHODCALLTYPE *GetCurFolder)(
- IPersistFolder2* This,
- LPITEMIDLIST* ppidl);
-
-};
-
-/*** IUnknown methods ***/
-#define IPersistFolder2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IPersistFolder2_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IPersistFolder2_Release(p) (p)->lpVtbl->Release(p)
-/*** IPersist methods ***/
-#define IPersistFolder2_GetClassID(p,a) (p)->lpVtbl->GetClassID(p,a)
-/*** IPersistFolder methods ***/
-#define IPersistFolder2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a)
-/*** IPersistFolder2 methods ***/
-#define IPersistFolder2_GetCurFolder(p,a) (p)->lpVtbl->GetCurFolder(p,a)
-
-#endif
-
-#define IPersistFolder2_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IPersist methods ***/ \
- STDMETHOD_(HRESULT,GetClassID)(THIS_ CLSID* pClassID) PURE; \
- /*** IPersistFolder methods ***/ \
- STDMETHOD_(HRESULT,Initialize)(THIS_ LPCITEMIDLIST pidl) PURE; \
- /*** IPersistFolder2 methods ***/ \
- STDMETHOD_(HRESULT,GetCurFolder)(THIS_ LPITEMIDLIST* ppidl) PURE;
-
-HRESULT CALLBACK IPersistFolder2_GetCurFolder_Proxy(
- IPersistFolder2* This,
- LPITEMIDLIST* ppidl);
-void __RPC_STUB IPersistFolder2_GetCurFolder_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-
-#endif /* __IPersistFolder2_INTERFACE_DEFINED__ */
-
-#ifndef __IEnumIDList_FWD_DEFINED__
-#define __IEnumIDList_FWD_DEFINED__
-typedef struct IEnumIDList IEnumIDList;
-#endif
-
-typedef IEnumIDList *LPENUMIDLIST;
-
-/*****************************************************************************
- * IEnumIDList interface
- */
-#ifndef __IEnumIDList_INTERFACE_DEFINED__
-#define __IEnumIDList_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IEnumIDList, 0x000214f2, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IEnumIDList : public IUnknown
-{
- virtual HRESULT STDMETHODCALLTYPE Next(
- ULONG celt,
- LPITEMIDLIST* rgelt,
- ULONG* pceltFetched) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Skip(
- ULONG celt) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Reset(
- ) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Clone(
- IEnumIDList** ppenum) = 0;
-
-};
-#else
-typedef struct IEnumIDListVtbl IEnumIDListVtbl;
-struct IEnumIDList {
- const IEnumIDListVtbl* lpVtbl;
-};
-struct IEnumIDListVtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IEnumIDList* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IEnumIDList* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IEnumIDList* This);
-
- /*** IEnumIDList methods ***/
- HRESULT (STDMETHODCALLTYPE *Next)(
- IEnumIDList* This,
- ULONG celt,
- LPITEMIDLIST* rgelt,
- ULONG* pceltFetched);
-
- HRESULT (STDMETHODCALLTYPE *Skip)(
- IEnumIDList* This,
- ULONG celt);
-
- HRESULT (STDMETHODCALLTYPE *Reset)(
- IEnumIDList* This);
-
- HRESULT (STDMETHODCALLTYPE *Clone)(
- IEnumIDList* This,
- IEnumIDList** ppenum);
-
-};
-
-/*** IUnknown methods ***/
-#define IEnumIDList_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IEnumIDList_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IEnumIDList_Release(p) (p)->lpVtbl->Release(p)
-/*** IEnumIDList methods ***/
-#define IEnumIDList_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
-#define IEnumIDList_Skip(p,a) (p)->lpVtbl->Skip(p,a)
-#define IEnumIDList_Reset(p) (p)->lpVtbl->Reset(p)
-#define IEnumIDList_Clone(p,a) (p)->lpVtbl->Clone(p,a)
-
-#endif
-
-#define IEnumIDList_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IEnumIDList methods ***/ \
- STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, LPITEMIDLIST* rgelt, ULONG* pceltFetched) PURE; \
- STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
- STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
- STDMETHOD_(HRESULT,Clone)(THIS_ IEnumIDList** ppenum) PURE;
-
-HRESULT CALLBACK IEnumIDList_Next_Proxy(
- IEnumIDList* This,
- ULONG celt,
- LPITEMIDLIST* rgelt,
- ULONG* pceltFetched);
-void __RPC_STUB IEnumIDList_Next_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumIDList_Skip_Proxy(
- IEnumIDList* This,
- ULONG celt);
-void __RPC_STUB IEnumIDList_Skip_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumIDList_Reset_Proxy(
- IEnumIDList* This);
-void __RPC_STUB IEnumIDList_Reset_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumIDList_Clone_Proxy(
- IEnumIDList* This,
- IEnumIDList** ppenum);
-void __RPC_STUB IEnumIDList_Clone_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-
-#endif /* __IEnumIDList_INTERFACE_DEFINED__ */
-
-#ifndef __IShellFolder_FWD_DEFINED__
-#define __IShellFolder_FWD_DEFINED__
-typedef struct IShellFolder IShellFolder;
-#endif
-
-typedef IShellFolder *LPSHELLFOLDER;
-
-typedef enum tagSHGDN {
- SHGDN_NORMAL = 0,
- SHGDN_INFOLDER = 1,
- SHGDN_FOREDITING = 0x1000,
- SHGDN_INCLUDE_NONFILESYS = 0x2000,
- SHGDN_FORADDRESSBAR = 0x4000,
- SHGDN_FORPARSING = 0x8000
-} SHGNO;
-
-typedef DWORD SHGDNF;
-
-enum tagSHCONTF {
- SHCONTF_FOLDERS = 32,
- SHCONTF_NONFOLDERS = 64,
- SHCONTF_INCLUDEHIDDEN = 128,
- SHCONTF_INIT_ON_FIRST_NEXT = 256,
- SHCONTF_NETPRINTERSRCH = 512,
- SHCONTF_SHAREABLE = 1024,
- SHCONTF_STORAGE = 2048
-};
-
-typedef DWORD SHCONTF;
-
-#define SFGAO_CANCOPY DROPEFFECT_COPY
-#define SFGAO_CANMOVE DROPEFFECT_MOVE
-#define SFGAO_CANLINK DROPEFFECT_LINK
-#define SFGAO_CANRENAME 0x00000010L
-#define SFGAO_CANDELETE 0x00000020L
-#define SFGAO_HASPROPSHEET 0x00000040L
-#define SFGAO_DROPTARGET 0x00000100L
-#define SFGAO_CAPABILITYMASK 0x00000177L
-#define SFGAO_LINK 0x00010000L
-#define SFGAO_SHARE 0x00020000L
-#define SFGAO_READONLY 0x00040000L
-#define SFGAO_GHOSTED 0x00080000L
-#define SFGAO_HIDDEN 0x00080000L
-#define SFGAO_DISPLAYATTRMASK 0x000F0000L
-#define SFGAO_FILESYSANCESTOR 0x10000000L
-#define SFGAO_FOLDER 0x20000000L
-#define SFGAO_FILESYSTEM 0x40000000L
-#define SFGAO_HASSUBFOLDER 0x80000000L
-#define SFGAO_CONTENTSMASK 0x80000000L
-#define SFGAO_VALIDATE 0x01000000L
-#define SFGAO_REMOVABLE 0x02000000L
-#define SFGAO_COMPRESSED 0x04000000L
-#define SFGAO_BROWSABLE 0x08000000L
-#define SFGAO_NONENUMERATED 0x00100000L
-#define SFGAO_NEWCONTENT 0x00200000L
-typedef ULONG SFGAOF;
-
-/*****************************************************************************
- * IShellFolder interface
- */
-#ifndef __IShellFolder_INTERFACE_DEFINED__
-#define __IShellFolder_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IShellFolder, 0x000214e6, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IShellFolder : public IUnknown
-{
- virtual HRESULT STDMETHODCALLTYPE ParseDisplayName(
- HWND hwndOwner,
- LPBC pbcReserved,
- LPOLESTR lpszDisplayName,
- ULONG* pchEaten,
- LPITEMIDLIST* ppidl,
- ULONG* pdwAttributes) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE EnumObjects(
- HWND hwndOwner,
- SHCONTF grfFlags,
- IEnumIDList** ppenumIDList) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE BindToObject(
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvOut) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE BindToStorage(
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvObj) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE CompareIDs(
- LPARAM lParam,
- LPCITEMIDLIST pidl1,
- LPCITEMIDLIST pidl2) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE CreateViewObject(
- HWND hwndOwner,
- REFIID riid,
- void** ppvOut) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetAttributesOf(
- UINT cidl,
- LPCITEMIDLIST* apidl,
- SFGAOF* rgfInOut) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf(
- HWND hwndOwner,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- REFIID riid,
- UINT* prgfInOut,
- void** ppvOut) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDisplayNameOf(
- LPCITEMIDLIST pidl,
- SHGDNF uFlags,
- STRRET* lpName) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE SetNameOf(
- HWND hwnd,
- LPCITEMIDLIST pidl,
- LPCOLESTR lpszName,
- SHGDNF uFlags,
- LPITEMIDLIST* ppidlOut) = 0;
-
-};
-#else
-typedef struct IShellFolderVtbl IShellFolderVtbl;
-struct IShellFolder {
- const IShellFolderVtbl* lpVtbl;
-};
-struct IShellFolderVtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IShellFolder* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IShellFolder* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IShellFolder* This);
-
- /*** IShellFolder methods ***/
- HRESULT (STDMETHODCALLTYPE *ParseDisplayName)(
- IShellFolder* This,
- HWND hwndOwner,
- LPBC pbcReserved,
- LPOLESTR lpszDisplayName,
- ULONG* pchEaten,
- LPITEMIDLIST* ppidl,
- ULONG* pdwAttributes);
-
- HRESULT (STDMETHODCALLTYPE *EnumObjects)(
- IShellFolder* This,
- HWND hwndOwner,
- SHCONTF grfFlags,
- IEnumIDList** ppenumIDList);
-
- HRESULT (STDMETHODCALLTYPE *BindToObject)(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *BindToStorage)(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvObj);
-
- HRESULT (STDMETHODCALLTYPE *CompareIDs)(
- IShellFolder* This,
- LPARAM lParam,
- LPCITEMIDLIST pidl1,
- LPCITEMIDLIST pidl2);
-
- HRESULT (STDMETHODCALLTYPE *CreateViewObject)(
- IShellFolder* This,
- HWND hwndOwner,
- REFIID riid,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *GetAttributesOf)(
- IShellFolder* This,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- SFGAOF* rgfInOut);
-
- HRESULT (STDMETHODCALLTYPE *GetUIObjectOf)(
- IShellFolder* This,
- HWND hwndOwner,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- REFIID riid,
- UINT* prgfInOut,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *GetDisplayNameOf)(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- SHGDNF uFlags,
- STRRET* lpName);
-
- HRESULT (STDMETHODCALLTYPE *SetNameOf)(
- IShellFolder* This,
- HWND hwnd,
- LPCITEMIDLIST pidl,
- LPCOLESTR lpszName,
- SHGDNF uFlags,
- LPITEMIDLIST* ppidlOut);
-
-};
-
-/*** IUnknown methods ***/
-#define IShellFolder_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IShellFolder_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IShellFolder_Release(p) (p)->lpVtbl->Release(p)
-/*** IShellFolder methods ***/
-#define IShellFolder_ParseDisplayName(p,a,b,c,d,e,f) (p)->lpVtbl->ParseDisplayName(p,a,b,c,d,e,f)
-#define IShellFolder_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c)
-#define IShellFolder_BindToObject(p,a,b,c,d) (p)->lpVtbl->BindToObject(p,a,b,c,d)
-#define IShellFolder_BindToStorage(p,a,b,c,d) (p)->lpVtbl->BindToStorage(p,a,b,c,d)
-#define IShellFolder_CompareIDs(p,a,b,c) (p)->lpVtbl->CompareIDs(p,a,b,c)
-#define IShellFolder_CreateViewObject(p,a,b,c) (p)->lpVtbl->CreateViewObject(p,a,b,c)
-#define IShellFolder_GetAttributesOf(p,a,b,c) (p)->lpVtbl->GetAttributesOf(p,a,b,c)
-#define IShellFolder_GetUIObjectOf(p,a,b,c,d,e,f) (p)->lpVtbl->GetUIObjectOf(p,a,b,c,d,e,f)
-#define IShellFolder_GetDisplayNameOf(p,a,b,c) (p)->lpVtbl->GetDisplayNameOf(p,a,b,c)
-#define IShellFolder_SetNameOf(p,a,b,c,d,e) (p)->lpVtbl->SetNameOf(p,a,b,c,d,e)
-
-#endif
-
-#define IShellFolder_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IShellFolder methods ***/ \
- STDMETHOD_(HRESULT,ParseDisplayName)(THIS_ HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, ULONG* pchEaten, LPITEMIDLIST* ppidl, ULONG* pdwAttributes) PURE; \
- STDMETHOD_(HRESULT,EnumObjects)(THIS_ HWND hwndOwner, SHCONTF grfFlags, IEnumIDList** ppenumIDList) PURE; \
- STDMETHOD_(HRESULT,BindToObject)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void** ppvOut) PURE; \
- STDMETHOD_(HRESULT,BindToStorage)(THIS_ LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, void** ppvObj) PURE; \
- STDMETHOD_(HRESULT,CompareIDs)(THIS_ LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE; \
- STDMETHOD_(HRESULT,CreateViewObject)(THIS_ HWND hwndOwner, REFIID riid, void** ppvOut) PURE; \
- STDMETHOD_(HRESULT,GetAttributesOf)(THIS_ UINT cidl, LPCITEMIDLIST* apidl, SFGAOF* rgfInOut) PURE; \
- STDMETHOD_(HRESULT,GetUIObjectOf)(THIS_ HWND hwndOwner, UINT cidl, LPCITEMIDLIST* apidl, REFIID riid, UINT* prgfInOut, void** ppvOut) PURE; \
- STDMETHOD_(HRESULT,GetDisplayNameOf)(THIS_ LPCITEMIDLIST pidl, SHGDNF uFlags, STRRET* lpName) PURE; \
- STDMETHOD_(HRESULT,SetNameOf)(THIS_ HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, LPITEMIDLIST* ppidlOut) PURE;
-
-HRESULT CALLBACK IShellFolder_ParseDisplayName_Proxy(
- IShellFolder* This,
- HWND hwndOwner,
- LPBC pbcReserved,
- LPOLESTR lpszDisplayName,
- ULONG* pchEaten,
- LPITEMIDLIST* ppidl,
- ULONG* pdwAttributes);
-void __RPC_STUB IShellFolder_ParseDisplayName_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_EnumObjects_Proxy(
- IShellFolder* This,
- HWND hwndOwner,
- SHCONTF grfFlags,
- IEnumIDList** ppenumIDList);
-void __RPC_STUB IShellFolder_EnumObjects_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_BindToObject_Proxy(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvOut);
-void __RPC_STUB IShellFolder_BindToObject_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_BindToStorage_Proxy(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvObj);
-void __RPC_STUB IShellFolder_BindToStorage_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_CompareIDs_Proxy(
- IShellFolder* This,
- LPARAM lParam,
- LPCITEMIDLIST pidl1,
- LPCITEMIDLIST pidl2);
-void __RPC_STUB IShellFolder_CompareIDs_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_CreateViewObject_Proxy(
- IShellFolder* This,
- HWND hwndOwner,
- REFIID riid,
- void** ppvOut);
-void __RPC_STUB IShellFolder_CreateViewObject_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_GetAttributesOf_Proxy(
- IShellFolder* This,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- SFGAOF* rgfInOut);
-void __RPC_STUB IShellFolder_GetAttributesOf_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_GetUIObjectOf_Proxy(
- IShellFolder* This,
- HWND hwndOwner,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- REFIID riid,
- UINT* prgfInOut,
- void** ppvOut);
-void __RPC_STUB IShellFolder_GetUIObjectOf_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_GetDisplayNameOf_Proxy(
- IShellFolder* This,
- LPCITEMIDLIST pidl,
- SHGDNF uFlags,
- STRRET* lpName);
-void __RPC_STUB IShellFolder_GetDisplayNameOf_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IShellFolder_SetNameOf_Proxy(
- IShellFolder* This,
- HWND hwnd,
- LPCITEMIDLIST pidl,
- LPCOLESTR lpszName,
- SHGDNF uFlags,
- LPITEMIDLIST* ppidlOut);
-void __RPC_STUB IShellFolder_SetNameOf_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-
-#endif /* __IShellFolder_INTERFACE_DEFINED__ */
-
-#ifndef __IEnumExtraSearch_FWD_DEFINED__
-#define __IEnumExtraSearch_FWD_DEFINED__
-typedef struct IEnumExtraSearch IEnumExtraSearch;
-#endif
-
-typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
-
-typedef struct {
- GUID guidSearch;
- WCHAR wszFriendlyName[80];
- WCHAR wszUrl[2084];
-} EXTRASEARCH, *LPEXTRASEARCH;
-
-/*****************************************************************************
- * IEnumExtraSearch interface
- */
-#ifndef __IEnumExtraSearch_INTERFACE_DEFINED__
-#define __IEnumExtraSearch_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IEnumExtraSearch, 0x0e700be1, 0x9db6, 0x11d1, 0xa1,0xce, 0x00,0xc0,0x4f,0xd7,0x5d,0x13);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IEnumExtraSearch : public IUnknown
-{
- virtual HRESULT STDMETHODCALLTYPE Next(
- ULONG celt,
- EXTRASEARCH* rgelt,
- ULONG* pceltFetched) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Skip(
- ULONG celt) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Reset(
- ) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE Clone(
- IEnumExtraSearch** ppenum) = 0;
-
-};
-#else
-typedef struct IEnumExtraSearchVtbl IEnumExtraSearchVtbl;
-struct IEnumExtraSearch {
- const IEnumExtraSearchVtbl* lpVtbl;
-};
-struct IEnumExtraSearchVtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IEnumExtraSearch* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IEnumExtraSearch* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IEnumExtraSearch* This);
-
- /*** IEnumExtraSearch methods ***/
- HRESULT (STDMETHODCALLTYPE *Next)(
- IEnumExtraSearch* This,
- ULONG celt,
- EXTRASEARCH* rgelt,
- ULONG* pceltFetched);
-
- HRESULT (STDMETHODCALLTYPE *Skip)(
- IEnumExtraSearch* This,
- ULONG celt);
-
- HRESULT (STDMETHODCALLTYPE *Reset)(
- IEnumExtraSearch* This);
-
- HRESULT (STDMETHODCALLTYPE *Clone)(
- IEnumExtraSearch* This,
- IEnumExtraSearch** ppenum);
-
-};
-
-/*** IUnknown methods ***/
-#define IEnumExtraSearch_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
-#define IEnumExtraSearch_AddRef(p) (p)->lpVtbl->AddRef(p)
-#define IEnumExtraSearch_Release(p) (p)->lpVtbl->Release(p)
-/*** IEnumExtraSearch methods ***/
-#define IEnumExtraSearch_Next(p,a,b,c) (p)->lpVtbl->Next(p,a,b,c)
-#define IEnumExtraSearch_Skip(p,a) (p)->lpVtbl->Skip(p,a)
-#define IEnumExtraSearch_Reset(p) (p)->lpVtbl->Reset(p)
-#define IEnumExtraSearch_Clone(p,a) (p)->lpVtbl->Clone(p,a)
-
-#endif
-
-#define IEnumExtraSearch_METHODS \
- ICOM_MSVTABLE_COMPAT_FIELDS \
- /*** IUnknown methods ***/ \
- STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; \
- STDMETHOD_(ULONG,AddRef)(THIS) PURE; \
- STDMETHOD_(ULONG,Release)(THIS) PURE; \
- /*** IEnumExtraSearch methods ***/ \
- STDMETHOD_(HRESULT,Next)(THIS_ ULONG celt, EXTRASEARCH* rgelt, ULONG* pceltFetched) PURE; \
- STDMETHOD_(HRESULT,Skip)(THIS_ ULONG celt) PURE; \
- STDMETHOD_(HRESULT,Reset)(THIS) PURE; \
- STDMETHOD_(HRESULT,Clone)(THIS_ IEnumExtraSearch** ppenum) PURE;
-
-HRESULT CALLBACK IEnumExtraSearch_Next_Proxy(
- IEnumExtraSearch* This,
- ULONG celt,
- EXTRASEARCH* rgelt,
- ULONG* pceltFetched);
-void __RPC_STUB IEnumExtraSearch_Next_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumExtraSearch_Skip_Proxy(
- IEnumExtraSearch* This,
- ULONG celt);
-void __RPC_STUB IEnumExtraSearch_Skip_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumExtraSearch_Reset_Proxy(
- IEnumExtraSearch* This);
-void __RPC_STUB IEnumExtraSearch_Reset_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-HRESULT CALLBACK IEnumExtraSearch_Clone_Proxy(
- IEnumExtraSearch* This,
- IEnumExtraSearch** ppenum);
-void __RPC_STUB IEnumExtraSearch_Clone_Stub(
- struct IRpcStubBuffer* This,
- struct IRpcChannelBuffer* pRpcChannelBuffer,
- PRPC_MESSAGE pRpcMessage,
- DWORD* pdwStubPhase);
-
-#endif /* __IEnumExtraSearch_INTERFACE_DEFINED__ */
-
-#ifndef __IShellFolder2_FWD_DEFINED__
-#define __IShellFolder2_FWD_DEFINED__
-typedef struct IShellFolder2 IShellFolder2;
-#endif
-
-typedef enum {
- SHCOLSTATE_TYPE_STR = 0x1,
- SHCOLSTATE_TYPE_INT = 0x2,
- SHCOLSTATE_TYPE_DATE = 0x3,
- SHCOLSTATE_TYPEMASK = 0xf,
- SHCOLSTATE_ONBYDEFAULT = 0x10,
- SHCOLSTATE_SLOW = 0x20,
- SHCOLSTATE_EXTENDED = 0x40,
- SHCOLSTATE_SECONDARYUI = 0x80,
- SHCOLSTATE_HIDDEN = 0x100,
- SHCOLSTATE_PREFER_VARCMP = 0x200
-} SHCOLSTATE;
-
-typedef DWORD SHCOLSTATEF;
-
-typedef struct {
- GUID fmtid;
- DWORD pid;
-} SHCOLUMNID, *LPSHCOLUMNID;
-
-typedef const SHCOLUMNID *LPCSHCOLUMNID;
-
-/*****************************************************************************
- * IShellFolder2 interface
- */
-#ifndef __IShellFolder2_INTERFACE_DEFINED__
-#define __IShellFolder2_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID_IShellFolder2, 0x93f2f68c, 0x1d1b, 0x11d3, 0xa3,0x0e, 0x00,0xc0,0x4f,0x79,0xab,0xd1);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-struct IShellFolder2 : public IShellFolder
-{
- virtual HRESULT STDMETHODCALLTYPE GetDefaultSearchGUID(
- GUID* lpguid) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE EnumSearches(
- IEnumExtraSearch** ppenum) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDefaultColumn(
- DWORD dwReserved,
- ULONG* pSort,
- ULONG* pDisplay) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState(
- UINT iColumn,
- SHCOLSTATEF* pcsFlags) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDetailsEx(
- LPCITEMIDLIST pidl,
- const SHCOLUMNID* pscid,
- VARIANT* pv) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE GetDetailsOf(
- LPCITEMIDLIST pidl,
- UINT iColumn,
- SHELLDETAILS* psd) = 0;
-
- virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID(
- UINT iColumn,
- SHCOLUMNID* pscid) = 0;
-
-};
-#else
-typedef struct IShellFolder2Vtbl IShellFolder2Vtbl;
-struct IShellFolder2 {
- const IShellFolder2Vtbl* lpVtbl;
-};
-struct IShellFolder2Vtbl {
- ICOM_MSVTABLE_COMPAT_FIELDS
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- IShellFolder2* This,
- REFIID riid,
- void** ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- IShellFolder2* This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- IShellFolder2* This);
-
- /*** IShellFolder methods ***/
- HRESULT (STDMETHODCALLTYPE *ParseDisplayName)(
- IShellFolder2* This,
- HWND hwndOwner,
- LPBC pbcReserved,
- LPOLESTR lpszDisplayName,
- ULONG* pchEaten,
- LPITEMIDLIST* ppidl,
- ULONG* pdwAttributes);
-
- HRESULT (STDMETHODCALLTYPE *EnumObjects)(
- IShellFolder2* This,
- HWND hwndOwner,
- SHCONTF grfFlags,
- IEnumIDList** ppenumIDList);
-
- HRESULT (STDMETHODCALLTYPE *BindToObject)(
- IShellFolder2* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *BindToStorage)(
- IShellFolder2* This,
- LPCITEMIDLIST pidl,
- LPBC pbcReserved,
- REFIID riid,
- void** ppvObj);
-
- HRESULT (STDMETHODCALLTYPE *CompareIDs)(
- IShellFolder2* This,
- LPARAM lParam,
- LPCITEMIDLIST pidl1,
- LPCITEMIDLIST pidl2);
-
- HRESULT (STDMETHODCALLTYPE *CreateViewObject)(
- IShellFolder2* This,
- HWND hwndOwner,
- REFIID riid,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *GetAttributesOf)(
- IShellFolder2* This,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- SFGAOF* rgfInOut);
-
- HRESULT (STDMETHODCALLTYPE *GetUIObjectOf)(
- IShellFolder2* This,
- HWND hwndOwner,
- UINT cidl,
- LPCITEMIDLIST* apidl,
- REFIID riid,
- UINT* prgfInOut,
- void** ppvOut);
-
- HRESULT (STDMETHODCALLTYPE *GetDisplayNameOf)(
- IShellFolder2* This,
- LPCITEMIDLIST pidl,
- SHGDNF uFlags,
- STRRET* lpName);
-
- HRESULT (STDMETHODCALLTYPE *SetNameOf)(
- IShellFolder2* This,
- HWND hwnd,
- LPCITEMIDLIST pidl,
- LPCOLESTR lpszName,
- SHGDNF uFlags,
- LPITEMIDLIST* ppidlOut);
-
- /*** IShellFolder2 methods ***/
- HRESULT (STDMETHODCALLTYPE *GetDefaultSearchGUID)(
[truncated at 1000 lines; 3291 more skipped]
reactos/include/wine
diff -u -r1.1 -r1.1.10.1
--- winnetwk.h 1 Feb 2004 19:48:44 -0000 1.1
+++ winnetwk.h 30 Jun 2004 21:16:03 -0000 1.1.10.1
@@ -1,383 +1,16 @@
-/*
- * Copyright (C) the Wine project
+/* $Id: winnetwk.h,v 1.1.10.1 2004/06/30 21:16:03 hyperion Exp $
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * Compatibility header
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-
-#ifndef _WINNETWK_H_
-#define _WINNETWK_H_
-
-/*
- * Network types
- */
-
-#define WNNC_NET_MSNET 0x00010000
-#define WNNC_NET_LANMAN 0x00020000
-#define WNNC_NET_NETWARE 0x00030000
-#define WNNC_NET_VINES 0x00040000
-#define WNNC_NET_10NET 0x00050000
-#define WNNC_NET_LOCUS 0x00060000
-#define WNNC_NET_SUN_PC_NFS 0x00070000
-#define WNNC_NET_LANSTEP 0x00080000
-#define WNNC_NET_9TILES 0x00090000
-#define WNNC_NET_LANTASTIC 0x000A0000
-#define WNNC_NET_AS400 0x000B0000
-#define WNNC_NET_FTP_NFS 0x000C0000
-#define WNNC_NET_PATHWORKS 0x000D0000
-#define WNNC_NET_LIFENET 0x000E0000
-#define WNNC_NET_POWERLAN 0x000F0000
-#define WNNC_NET_BWNFS 0x00100000
-#define WNNC_NET_COGENT 0x00110000
-#define WNNC_NET_FARALLON 0x00120000
-#define WNNC_NET_APPLETALK 0x00130000
-#define WNNC_NET_INTERGRAPH 0x00140000
-
-/*
- * Network resources
- */
-
-#define RESOURCE_CONNECTED 0x00000001
-#define RESOURCE_GLOBALNET 0x00000002
-#define RESOURCE_REMEMBERED 0x00000003
-#define RESOURCE_RECENT 0x00000004
-#define RESOURCE_CONTEXT 0x00000005
-
-#define RESOURCETYPE_ANY 0x00000000
-#define RESOURCETYPE_DISK 0x00000001
-#define RESOURCETYPE_PRINT 0x00000002
-#define RESOURCETYPE_RESERVED 0x00000008
-#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
-
-#define RESOURCEUSAGE_CONNECTABLE 0x00000001
-#define RESOURCEUSAGE_CONTAINER 0x00000002
-#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
-#define RESOURCEUSAGE_SIBLING 0x00000008
-#define RESOURCEUSAGE_ATTACHED 0x00000010
-#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
-#define RESOURCEUSAGE_RESERVED 0x80000000
-
-#define RESOURCEDISPLAYTYPE_GENERIC 0x00000000
-#define RESOURCEDISPLAYTYPE_DOMAIN 0x00000001
-#define RESOURCEDISPLAYTYPE_SERVER 0x00000002
-#define RESOURCEDISPLAYTYPE_SHARE 0x00000003
-#define RESOURCEDISPLAYTYPE_FILE 0x00000004
-#define RESOURCEDISPLAYTYPE_GROUP 0x00000005
-#define RESOURCEDISPLAYTYPE_NETWORK 0x00000006
-#define RESOURCEDISPLAYTYPE_ROOT 0x00000007
-#define RESOURCEDISPLAYTYPE_SHAREADMIN 0x00000008
-#define RESOURCEDISPLAYTYPE_DIRECTORY 0x00000009
-#define RESOURCEDISPLAYTYPE_TREE 0x0000000A
-
-typedef struct {
- DWORD dwScope;
- DWORD dwType;
- DWORD dwDisplayType;
- DWORD dwUsage;
- LPSTR lpLocalName;
- LPSTR lpRemoteName;
- LPSTR lpComment ;
- LPSTR lpProvider;
-} NETRESOURCEA,*LPNETRESOURCEA;
-
-typedef struct {
- DWORD dwScope;
- DWORD dwType;
- DWORD dwDisplayType;
- DWORD dwUsage;
- LPWSTR lpLocalName;
- LPWSTR lpRemoteName;
- LPWSTR lpComment ;
- LPWSTR lpProvider;
-} NETRESOURCEW,*LPNETRESOURCEW;
-
-DECL_WINELIB_TYPE_AW(NETRESOURCE)
-DECL_WINELIB_TYPE_AW(LPNETRESOURCE)
-
-
-/*
- * Network connections
- */
-
-#define NETPROPERTY_PERSISTENT 1
-
-#define CONNECT_UPDATE_PROFILE 0x00000001
-#define CONNECT_UPDATE_RECENT 0x00000002
-#define CONNECT_TEMPORARY 0x00000004
-#define CONNECT_INTERACTIVE 0x00000008
-#define CONNECT_PROMPT 0x00000010
-#define CONNECT_NEED_DRIVE 0x00000020
-#define CONNECT_REFCOUNT 0x00000040
-#define CONNECT_REDIRECT 0x00000080
-#define CONNECT_LOCALDRIVE 0x00000100
-#define CONNECT_CURRENT_MEDIA 0x00000200
-
-DWORD WINAPI WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
-DWORD WINAPI WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
-#define WNetAddConnection WINELIB_NAME_AW(WNetAddConnection)
-DWORD WINAPI WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-DWORD WINAPI WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-#define WNetAddConnection2 WINELIB_NAME_AW(WNetAddConnection2)
-DWORD WINAPI WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
-DWORD WINAPI WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
-#define WNetAddConnection3 WINELIB_NAME_AW(WNetAddConnection3)
-DWORD WINAPI WNetCancelConnectionA(LPCSTR,BOOL);
-DWORD WINAPI WNetCancelConnectionW(LPCWSTR,BOOL);
-#define WNetCancelConnection WINELIB_NAME_AW(WNetCancelConnection)
-DWORD WINAPI WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
-DWORD WINAPI WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
-#define WNetCancelConnection2 WINELIB_NAME_AW(WNetCancelConnection2)
-DWORD WINAPI WNetGetConnectionA(LPCSTR,LPSTR,LPDWORD);
-DWORD WINAPI WNetGetConnectionW(LPCWSTR,LPWSTR,LPDWORD);
-#define WNetGetConnection WINELIB_NAME_AW(WNetGetConnection)
-DWORD WINAPI WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,LPDWORD,LPDWORD);
-DWORD WINAPI WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,LPDWORD,LPDWORD);
-#define WNetUseConnection WINELIB_NAME_AW(WNetUseConnection)
-DWORD WINAPI WNetSetConnectionA(LPCSTR,DWORD,LPVOID);
-DWORD WINAPI WNetSetConnectionW(LPCWSTR,DWORD,LPVOID);
-#define WNetSetConnection WINELIB_NAME_AW(WNetSetConnection)
-
-/*
- * Network connection dialogs
- */
-
-typedef struct {
- DWORD cbStructure; /* size of this structure in bytes */
- HWND hwndOwner; /* owner window for the dialog */
- LPNETRESOURCEA lpConnRes;/* Requested Resource info */
- DWORD dwFlags; /* flags (see below) */
- DWORD dwDevNum; /* number of devices connected to */
-} CONNECTDLGSTRUCTA, *LPCONNECTDLGSTRUCTA;
-typedef struct {
- DWORD cbStructure; /* size of this structure in bytes */
- HWND hwndOwner; /* owner window for the dialog */
- LPNETRESOURCEW lpConnRes;/* Requested Resource info */
- DWORD dwFlags; /* flags (see below) */
- DWORD dwDevNum; /* number of devices connected to */
-} CONNECTDLGSTRUCTW, *LPCONNECTDLGSTRUCTW;
-
-DECL_WINELIB_TYPE_AW(CONNECTDLGSTRUCT)
-DECL_WINELIB_TYPE_AW(LPCONNECTDLGSTRUCT)
-
-#define CONNDLG_RO_PATH 0x00000001 /* Resource path should be read-only */
-#define CONNDLG_CONN_POINT 0x00000002 /* Netware -style movable connection point enabled */
-#define CONNDLG_USE_MRU 0x00000004 /* Use MRU combobox */
-#define CONNDLG_HIDE_BOX 0x00000008 /* Hide persistent connect checkbox */
-#define CONNDLG_PERSIST 0x00000010 /* Force persistent connection */
-#define CONNDLG_NOT_PERSIST 0x00000020 /* Force connection NOT persistent */
-
-typedef struct {
- DWORD cbStructure; /* size of this structure in bytes */
- HWND hwndOwner; /* owner window for the dialog */
- LPSTR lpLocalName; /* local device name */
- LPSTR lpRemoteName; /* network resource name */
- DWORD dwFlags; /* flags */
-} DISCDLGSTRUCTA, *LPDISCDLGSTRUCTA;
-typedef struct {
- DWORD cbStructure; /* size of this structure in bytes */
- HWND hwndOwner; /* owner window for the dialog */
- LPWSTR lpLocalName; /* local device name */
- LPWSTR lpRemoteName; /* network resource name */
- DWORD dwFlags; /* flags */
-} DISCDLGSTRUCTW, *LPDISCDLGSTRUCTW;
-
-DECL_WINELIB_TYPE_AW(DISCDLGSTRUCT)
-DECL_WINELIB_TYPE_AW(LPDISCDLGSTRUCT)
-
-#define DISC_UPDATE_PROFILE 0x00000001
-#define DISC_NO_FORCE 0x00000040
-
-DWORD WINAPI WNetConnectionDialog(HWND,DWORD);
-DWORD WINAPI WNetDisconnectDialog(HWND,DWORD);
-DWORD WINAPI WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
-DWORD WINAPI WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
-#define WNetConnectionDialog1 WINELIB_NAME_AW(WNetConnectionDialog1)
-DWORD WINAPI WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
-DWORD WINAPI WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
-#define WNetDisconnectDialog1 WINELIB_NAME_AW(WNetDisconnectDialog1)
-
-/*
- * Network browsing
+ * This header is wrapper to allow compilation of Wine DLLs under ReactOS
+ * build system. It contains definitions commonly refered to as Wineisms
+ * and definitions that are missing in w32api.
*/
-DWORD WINAPI WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
-DWORD WINAPI WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
-#define WNetOpenEnum WINELIB_NAME_AW(WNetOpenEnum)
-DWORD WINAPI WNetEnumResourceA(HANDLE,LPDWORD,LPVOID,LPDWORD);
-DWORD WINAPI WNetEnumResourceW(HANDLE,LPDWORD,LPVOID,LPDWORD);
-#define WNetEnumResource WINELIB_NAME_AW(WNetEnumResource)
-DWORD WINAPI WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
-DWORD WINAPI WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
-#define WNetGetResourceInformation WINELIB_NAME_AW(WNetGetResourceInformation)
-DWORD WINAPI WNetGetResourceParentA(LPNETRESOURCEA,LPVOID,LPDWORD);
-DWORD WINAPI WNetGetResourceParentW(LPNETRESOURCEW,LPVOID,LPDWORD);
-#define WNetGetResourceParent WINELIB_NAME_AW(WNetGetResourceParent)
-DWORD WINAPI WNetCloseEnum(HANDLE);
-
-/*
- * Universal naming
- */
-
-#define UNIVERSAL_NAME_INFO_LEVEL 0x00000001
-#define REMOTE_NAME_INFO_LEVEL 0x00000002
-
-typedef struct {
- LPSTR lpUniversalName;
-} UNIVERSAL_NAME_INFOA, *LPUNIVERSAL_NAME_INFOA;
-typedef struct {
- LPWSTR lpUniversalName;
-} UNIVERSAL_NAME_INFOW, *LPUNIVERSAL_NAME_INFOW;
-
-DECL_WINELIB_TYPE_AW(UNIVERSAL_NAME_INFO)
-DECL_WINELIB_TYPE_AW(LPUNIVERSAL_NAME_INFO)
-
-typedef struct {
- LPSTR lpUniversalName;
- LPSTR lpConnectionName;
- LPSTR lpRemainingPath;
-}REMOTE_NAME_INFOA, *LPREMOTE_NAME_INFOA;
-typedef struct {
- LPWSTR lpUniversalName;
- LPWSTR lpConnectionName;
- LPWSTR lpRemainingPath;
-}REMOTE_NAME_INFOW, *LPREMOTE_NAME_INFOW;
-
-DECL_WINELIB_TYPE_AW(REMOTE_NAME_INFO)
-DECL_WINELIB_TYPE_AW(LPREMOTE_NAME_INFO)
-
-DWORD WINAPI WNetGetUniversalNameA(LPCSTR,DWORD,LPVOID,LPDWORD);
-DWORD WINAPI WNetGetUniversalNameW(LPCWSTR,DWORD,LPVOID,LPDWORD);
-#define WNetGetUniversalName WINELIB_NAME_AW(WNetGetUniversalName)
-
-/*
- * Other
- */
-
-DWORD WINAPI WNetGetUserA(LPCSTR,LPSTR,LPDWORD);
-DWORD WINAPI WNetGetUserW(LPCWSTR,LPWSTR,LPDWORD);
-#define WNetGetUser WINELIB_NAME_AW(WNetGetUser)
-
-#define WNFMT_MULTILINE 0x01
-#define WNFMT_ABBREVIATED 0x02
-#define WNFMT_INENUM 0x10
-#define WNFMT_CONNECTION 0x20
-
-DWORD WINAPI WNetGetProviderNameA(DWORD,LPSTR,LPDWORD);
-DWORD WINAPI WNetGetProviderNameW(DWORD,LPWSTR,LPDWORD);
-#define WNetGetProviderName WINELIB_NAME_AW(WNetGetProviderName)
-
-typedef struct {
- DWORD cbStructure;
- DWORD dwProviderVersion;
- DWORD dwStatus;
- DWORD dwCharacteristics;
- DWORD dwHandle;
- WORD wNetType;
- DWORD dwPrinters;
- DWORD dwDrives;
-} NETINFOSTRUCT, *LPNETINFOSTRUCT;
-
-#define NETINFO_DLL16 0x00000001
-#define NETINFO_DISKRED 0x00000004
-#define NETINFO_PRINTERRED 0x00000008
-
-DWORD WINAPI WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
-DWORD WINAPI WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
-#define WNetGetNetworkInformation WINELIB_NAME_AW(WNetGetNetworkInformation)
+#include_next <winnetwk.h>
-
-/*
- * Status codes
- */
-
-DWORD WINAPI WNetGetLastErrorA(LPDWORD,LPSTR,DWORD,LPSTR,DWORD);
-DWORD WINAPI WNetGetLastErrorW(LPDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
-#define WNetGetLastError WINELIB_NAME_AW(WNetGetLastError)
-
-#define WN_SUCCESS NO_ERROR
-#define WN_NO_ERROR NO_ERROR
-#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
-#define WN_CANCEL ERROR_CANCELLED
-#define WN_RETRY ERROR_RETRY
-#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
-#define WN_MORE_DATA ERROR_MORE_DATA
-#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
-#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
-#define WN_BAD_USER ERROR_BAD_USERNAME
-#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
-#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
-#define WN_FUNCTION_BUSY ERROR_BUSY
-#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
-#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
-#define WN_NO_NETWORK ERROR_NO_NETWORK
-#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
-#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
-#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
-#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
-#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
-
-#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
-#define WN_OPEN_FILES ERROR_OPEN_FILES
-#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
-#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
-#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
-#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
-#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
-#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
-#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
-#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
-#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
-#define WN_BAD_PROFILE ERROR_BAD_PROFILE
-#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
-#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
-
-#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
-#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
-
-#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
-#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
-#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
-
-
-/*
- * Multinet (for Shell)
- */
-
-typedef struct {
- DWORD cbStructure;
- DWORD dwFlags;
- DWORD dwSpeed;
- DWORD dwDelay;
- DWORD dwOptDataSize;
-} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
-
-#define WNCON_FORNETCARD 0x00000001
-#define WNCON_NOTROUTED 0x00000002
-#define WNCON_SLOWLINK 0x00000004
-#define WNCON_DYNAMIC 0x00000008
-
-DWORD WINAPI MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
-DWORD WINAPI MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
-#define MultinetGetConnectionPerformance WINELIB_NAME_AW(MultinetGetConnectionPerformance)
-DWORD WINAPI MultinetGetErrorTextA(DWORD,DWORD,DWORD);
-DWORD WINAPI MultinetGetErrorTextW(DWORD,DWORD,DWORD);
-#define MultinetGetErrorText WINELIB_NAME_AW(MultinetGetErrorText)
-
-/*
- * Password cache
- */
+#ifndef __WINE_WINNETWK_H
+#define __WINE_WINNETWK_H
/* WNetEnumCachedPasswords */
typedef struct tagPASSWORD_CACHE_ENTRY
@@ -392,8 +25,5 @@
typedef BOOL (CALLBACK *ENUMPASSWORDPROC)(PASSWORD_CACHE_ENTRY *, DWORD);
UINT WINAPI WNetEnumCachedPasswords( LPSTR, WORD, BYTE, ENUMPASSWORDPROC, DWORD);
-DWORD WINAPI WNetGetCachedPassword( LPSTR, WORD, LPSTR, LPWORD, BYTE );
-DWORD WINAPI WNetCachePassword( LPSTR, WORD, LPSTR, WORD, BYTE, WORD );
-
-#endif /* _WINNETWK_H_ */
+#endif /* __WINE_WINNETWK_H */
reactos/lib/comctl32
diff -u -r1.10.6.1 -r1.10.6.2
--- imagelist.c 27 Jun 2004 01:13:12 -0000 1.10.6.1
+++ imagelist.c 30 Jun 2004 21:16:03 -0000 1.10.6.2
@@ -1146,13 +1146,11 @@
PatBlt(hBlendMaskDC, 0, 0, cx, cy, PATCOPY);
SelectObject(hBlendMaskDC, hOldBrush);
-#if 0
/* Modify the blend mask if an Image Mask exist */
if(himl->hbmMask) {
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hMaskListDC, lx, ly, 0x220326); /* NOTSRCAND */
BitBlt(hBlendMaskDC, 0, 0, cx, cy, hBlendMaskDC, 0, 0, NOTSRCCOPY);
}
-#endif
/* now apply blend to the current image given the BlendMask */
if (clrBlend == CLR_DEFAULT) clrBlend = GetSysColor (COLOR_HIGHLIGHT);
reactos/lib/comctl32
diff -u -r1.11 -r1.11.4.1
--- listview.c 16 Jun 2004 06:46:13 -0000 1.11
+++ listview.c 30 Jun 2004 21:16:03 -0000 1.11.4.1
@@ -2024,7 +2024,8 @@
infoPtr->iconSize.cy + ICON_BOTTOM_PADDING;
Label.right = Label.left + labelSize.cx;
Label.bottom = Label.top + infoPtr->nItemHeight;
- if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight)
+ if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight &&
+ infoPtr->ntmHeight)
{
labelSize.cy = min(Box.bottom - Label.top, labelSize.cy);
labelSize.cy /= infoPtr->ntmHeight;
@@ -9516,7 +9517,8 @@
hOldFont = SelectObject(hdc, infoPtr->hFont);
/*Get String Length in pixels */
- GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz);
+ if(!GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz))
+ sz.cx = 0;
/*Add Extra spacing for the next character */
GetTextMetricsW(hdc, &textMetric);
reactos/lib/cpl
diff -u -r1.4 -r1.4.2.1
--- Makefile 18 Jun 2004 20:43:44 -0000 1.4
+++ Makefile 30 Jun 2004 21:16:03 -0000 1.4.2.1
@@ -6,7 +6,7 @@
include $(PATH_TO_TOP)/rules.mak
-CONTROL_PANELS = sysdm appwiz control
+CONTROL_PANELS = access appwiz control sysdm
all: $(CONTROL_PANELS)
reactos/lib/cpl/appwiz
diff -u -r1.1 -r1.1.2.1
--- Makefile 18 Jun 2004 20:43:44 -0000 1.1
+++ Makefile 30 Jun 2004 21:16:03 -0000 1.1.2.1
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2004/06/18 20:43:44 kuehng Exp $
+# $Id: Makefile,v 1.1.2.1 2004/06/30 21:16:03 hyperion Exp $
PATH_TO_TOP = ../../..
@@ -13,16 +13,22 @@
TARGET_BASE = $(TARGET_BASE_LIB_CPL_SYSDM)
TARGET_CFLAGS = \
+ -D_WIN32_IE=0x0600 \
+ -D_WIN32_WINNT=0x0501 \
-I./include \
-DUNICODE \
-D_UNICODE \
-D__REACTOS__ \
+ -D__USE_W32API \
-Wall \
-Werror \
-fno-builtin
TARGET_LFLAGS = -nostartfiles
+
+TARGET_LFLAGS = -nostartfiles
+
TARGET_SDKLIBS = kernel32.a user32.a comctl32.a
TARGET_GCCLIBS = gcc
reactos/lib/cpl/appwiz
diff -u -r1.1 -r1.1.2.1
--- appwiz.c 18 Jun 2004 20:43:44 -0000 1.1
+++ appwiz.c 30 Jun 2004 21:16:03 -0000 1.1.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: appwiz.c,v 1.1 2004/06/18 20:43:44 kuehng Exp $
+/* $Id: appwiz.c,v 1.1.2.1 2004/06/30 21:16:03 hyperion Exp $
*
* PROJECT: ReactOS Software Control Panel
* FILE: lib/cpl/system/appwiz.c
@@ -26,21 +26,15 @@
* 06-17-2004 Created
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <tchar.h>
#include <windows.h>
-
-#ifdef _MSC_VER
#include <commctrl.h>
#include <cpl.h>
-#endif
#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
#include <tchar.h>
#include <process.h>
-#include <stdio.h>
#include "resource.h"
#include "appwiz.h"
@@ -55,124 +49,162 @@
/* Applets */
APPLET Applets[NUM_APPLETS] =
{
- {IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet}
+ {IDI_CPLSYSTEM, IDS_CPLSYSTEMNAME, IDS_CPLSYSTEMDESCRIPTION, SystemApplet}
};
-void CallUninstall(HWND hwndDlg)
+
+static VOID
+CallUninstall(HWND hwndDlg)
{
- int nIndex;
- nIndex = SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_GETCURSEL,0,0);
- if(nIndex == -1)
- MessageBox(hwndDlg,L"No item selected",L"Error",MB_ICONSTOP);
- else {
- HKEY hKey;
- DWORD dwType = REG_SZ;
- TCHAR pszUninstallString[MAX_PATH];
- DWORD dwSize = MAX_PATH;
- hKey = (HKEY)SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_GETITEMDATA,(WPARAM)nIndex,0);
- if(RegQueryValueEx(hKey,L"UninstallString",NULL,&dwType,(BYTE*)pszUninstallString,&dwSize)==ERROR_SUCCESS)
- {
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- memset(&si,0x00,sizeof(si));
- si.cb = sizeof(si);
- si.wShowWindow = SW_SHOW;
- if(CreateProcess(NULL,pszUninstallString,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
- {
- CloseHandle(pi.hProcess);
- CloseHandle(pi.hThread);
- }
- } else {
- MessageBox(hwndDlg,L"Unable to read UninstallString. This entry is invalid or has been created by an MSI installer.",L"Error",MB_ICONSTOP);
- }
- }
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ int nIndex;
+ HKEY hKey;
+ DWORD dwType;
+ TCHAR pszUninstallString[MAX_PATH];
+ DWORD dwSize;
+
+ nIndex = SendDlgItemMessage(hwndDlg, IDC_SOFTWARELIST, LB_GETCURSEL, 0, 0);
+ if (nIndex == -1)
+ {
+ MessageBox(hwndDlg,
+ _TEXT("No item selected"),
+ _TEXT("Error"),
+ MB_ICONSTOP);
+ }
+ else
+ {
+ hKey = (HKEY)SendDlgItemMessage(hwndDlg, IDC_SOFTWARELIST, LB_GETITEMDATA, (WPARAM)nIndex, 0);
+
+ dwType = REG_SZ;
+ dwSize = MAX_PATH;
+ if (RegQueryValueEx(hKey,
+ _TEXT("UninstallString"),
+ NULL,
+ &dwType,
+ (LPBYTE)pszUninstallString,
+ &dwSize) == ERROR_SUCCESS)
+ {
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ si.wShowWindow = SW_SHOW;
+ if (CreateProcess(NULL,pszUninstallString,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi))
+ {
+ CloseHandle(pi.hProcess);
+ CloseHandle(pi.hThread);
+ }
+ }
+ else
+ {
+ MessageBox(hwndDlg,
+ _TEXT("Unable to read UninstallString. This entry is invalid or has been created by an MSI installer."),
+ _TEXT("Error"),
+ MB_ICONSTOP);
+ }
+ }
}
+
/* Property page dialog callback */
-BOOL CALLBACK InstallPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
+static BOOL CALLBACK
+InstallPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
- switch(uMsg)
- {
+ TCHAR pszName[MAX_PATH];
+ TCHAR pszDisplayName[MAX_PATH];
+ FILETIME FileTime;
+ HKEY hKey;
+ HKEY hSubKey;
+ DWORD dwType;
+ DWORD dwSize;
+ int i;
+ ULONG index;
+
+ switch (uMsg)
+ {
case WM_INITDIALOG:
- {
- HKEY hKey;
- int i=0;
- TCHAR pszName[MAX_PATH];
- FILETIME FileTime;
- DWORD dwSize = MAX_PATH;
- EnableWindow(GetDlgItem(hwndDlg,IDC_INSTALL),FALSE);
- if(RegOpenKey(HKEY_LOCAL_MACHINE,L"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall",&hKey)!=ERROR_SUCCESS) {
- MessageBox(hwndDlg,L"Unable to open Uninstall Key",L"Error",MB_ICONSTOP);
- return FALSE;
- }
- while(RegEnumKeyEx(hKey,i,pszName,&dwSize,NULL,NULL,NULL,&FileTime)==ERROR_SUCCESS)
- {
- HKEY hSubKey;
- if(RegOpenKey(hKey,pszName,&hSubKey)==ERROR_SUCCESS)
- {
- DWORD dwType = REG_SZ;
- TCHAR pszDisplayName[MAX_PATH];
- DWORD dwSize = MAX_PATH;
- ULONG index;
- if(RegQueryValueEx(hSubKey,L"DisplayName",NULL,&dwType,(BYTE*)pszDisplayName,&dwSize)==ERROR_SUCCESS)
- {
- index = SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_ADDSTRING,0,(LPARAM)pszDisplayName);
- SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_SETITEMDATA,index,(LPARAM)hSubKey);
- }
- }
-
- dwSize = MAX_PATH;
- i++;
- }
- RegCloseKey(hKey);
- break;
- }
- break;
- case WM_COMMAND:
- switch(LOWORD(wParam))
- {
- case IDC_SOFTWARELIST:
- if(HIWORD(wParam)==LBN_DBLCLK)
- {
- CallUninstall(hwndDlg);
- }
- break;
-
- case IDC_ADDREMOVE:
- CallUninstall(hwndDlg);
- break;
- }
- break;
- }
- return FALSE;
+ EnableWindow(GetDlgItem(hwndDlg,IDC_INSTALL), FALSE);
+ if (RegOpenKey(HKEY_LOCAL_MACHINE,
+ _TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall"),
+ &hKey) != ERROR_SUCCESS)
+ {
+ MessageBox(hwndDlg,
+ _TEXT("Unable to open Uninstall Key"),
+ _TEXT("Error"),
+ MB_ICONSTOP);
+ return FALSE;
+ }
+
+ i = 0;
+ dwSize = MAX_PATH;
+ while (RegEnumKeyEx (hKey, i, pszName, &dwSize, NULL, NULL, NULL, &FileTime) == ERROR_SUCCESS)
+ {
+ if (RegOpenKey(hKey,pszName,&hSubKey)==ERROR_SUCCESS)
+ {
+ dwType = REG_SZ;
+ dwSize = MAX_PATH;
+ if (RegQueryValueEx(hSubKey,
+ _TEXT("DisplayName"),
+ NULL,
+ &dwType,
+ (LPBYTE)pszDisplayName,
+ &dwSize) == ERROR_SUCCESS)
+ {
+ index = SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_ADDSTRING,0,(LPARAM)pszDisplayName);
+ SendDlgItemMessage(hwndDlg,IDC_SOFTWARELIST,LB_SETITEMDATA,index,(LPARAM)hSubKey);
+ }
+ }
+
+ dwSize = MAX_PATH;
+ i++;
+ }
+
+ RegCloseKey(hKey);
+ break;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam))
+ {
+ case IDC_SOFTWARELIST:
+ if (HIWORD(wParam) == LBN_DBLCLK)
+ {
+ CallUninstall(hwndDlg);
+ }
+ break;
+
+ case IDC_ADDREMOVE:
+ CallUninstall(hwndDlg);
+ break;
+ }
+ break;
+ }
+
+ return FALSE;
}
+
/* Property page dialog callback */
-BOOL CALLBACK RosPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
+static BOOL CALLBACK
+RosPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
- switch(uMsg)
- {
+ switch(uMsg)
+ {
case WM_INITDIALOG:
- {
-
- break;
- }
- }
- return FALSE;
-}
-
-static void InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
-{
- ZeroMemory(psp, sizeof(PROPSHEETPAGE));
- psp->dwSize = sizeof(PROPSHEETPAGE);
- psp->dwFlags = PSP_DEFAULT;
- psp->hInstance = hApplet;
-#ifdef _MSC_VER
- psp->pszTemplate = MAKEINTRESOURCE(idDlg);
-#else
- psp->u1.pszTemplate = MAKEINTRESOURCE(idDlg);
-#endif
- psp->pfnDlgProc = DlgProc;
+ break;
+ }
+
+ return FALSE;
+}
+
+
+static VOID
+InitPropSheetPage(PROPSHEETPAGE *psp, WORD idDlg, DLGPROC DlgProc)
+{
+ ZeroMemory(psp, sizeof(PROPSHEETPAGE));
+ psp->dwSize = sizeof(PROPSHEETPAGE);
+ psp->dwFlags = PSP_DEFAULT;
+ psp->hInstance = hApplet;
+ psp->pszTemplate = MAKEINTRESOURCE(idDlg);
+ psp->pfnDlgProc = DlgProc;
}
@@ -181,83 +213,73 @@
LONG CALLBACK
SystemApplet(VOID)
{
- PROPSHEETPAGE psp[2];
- PROPSHEETHEADER psh;
- TCHAR Caption[1024];
-
- LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
-
- ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
- psh.dwSize = sizeof(PROPSHEETHEADER);
- psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
- psh.hwndParent = NULL;
- psh.hInstance = hApplet;
-#ifdef _MSC_VER
- psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
-#else
- psh.u1.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
-#endif
- psh.pszCaption = Caption;
- psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
-#ifdef _MSC_VER
- psh.nStartPage = 0;
- psh.ppsp = psp;
-#else
- psh.u2.nStartPage = 0;
- psh.u3.ppsp = psp;
-#endif
- psh.pfnCallback = NULL;
-
-
- InitPropSheetPage(&psp[0], IDD_PROPPAGEINSTALL, InstallPageProc);
- InitPropSheetPage(&psp[1], IDD_PROPPAGEROSSETUP, RosPageProc);
-
- return (LONG)(PropertySheet(&psh) != -1);
+ PROPSHEETPAGE psp[2];
+ PROPSHEETHEADER psh;
+ TCHAR Caption[1024];
+
+ LoadString(hApplet, IDS_CPLSYSTEMNAME, Caption, sizeof(Caption) / sizeof(TCHAR));
+
+ ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
+ psh.dwSize = sizeof(PROPSHEETHEADER);
+ psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE;
+ psh.hwndParent = NULL;
+ psh.hInstance = hApplet;
+ psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
+ psh.pszCaption = Caption;
+ psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
+ psh.nStartPage = 0;
+ psh.ppsp = psp;
+ psh.pfnCallback = NULL;
+
+ InitPropSheetPage(&psp[0], IDD_PROPPAGEINSTALL, InstallPageProc);
+ InitPropSheetPage(&psp[1], IDD_PROPPAGEROSSETUP, RosPageProc);
+
+ return (LONG)(PropertySheet(&psh) != -1);
}
+
/* Control Panel Callback */
-LONG CALLBACK CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
+LONG CALLBACK
+CPlApplet(HWND hwndCPl, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
{
- int i = (int)lParam1;
-
- switch(uMsg)
- {
+ CPLINFO *CPlInfo;
+ DWORD i;
+
+ i = (DWORD)lParam1;
+ switch(uMsg)
+ {
case CPL_INIT:
- {
- return TRUE;
- }
+ return TRUE;
+
case CPL_GETCOUNT:
- {
- return NUM_APPLETS;
- }
+ return NUM_APPLETS;
+
case CPL_INQUIRE:
- {
- CPLINFO *CPlInfo = (CPLINFO*)lParam2;
- CPlInfo->lData = 0;
- CPlInfo->idIcon = Applets[i].idIcon;
- CPlInfo->idName = Applets[i].idName;
- CPlInfo->idInfo = Applets[i].idDescription;
- break;
- }
+ CPlInfo = (CPLINFO*)lParam2;
+ CPlInfo->lData = 0;
+ CPlInfo->idIcon = Applets[i].idIcon;
+ CPlInfo->idName = Applets[i].idName;
+ CPlInfo->idInfo = Applets[i].idDescription;
+ break;
+
case CPL_DBLCLK:
- {
- Applets[i].AppletProc();
- break;
- }
- }
- return FALSE;
+ Applets[i].AppletProc();
+ break;
+ }
+
+ return FALSE;
}
-BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
+BOOL WINAPI
+DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{
- switch(dwReason)
- {
+ switch(dwReason)
+ {
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
- hApplet = hinstDLL;
- break;
- }
- return TRUE;
+ hApplet = hinstDLL;
+ break;
+ }
+ return TRUE;
}
-
reactos/lib/cpl/appwiz
diff -u -r1.1 -r1.1.2.1
--- appwiz.rc 18 Jun 2004 20:43:44 -0000 1.1
+++ appwiz.rc 30 Jun 2004 21:16:03 -0000 1.1.2.1
@@ -49,7 +49,6 @@
CAPTION "Install/Uninstall"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
-
ICON IDI_CPLSYSTEM,-1,PROPSHEETPADDING,18,16,16
LTEXT "To install a new program, click Install",-1,36,18,PROPSHEETWIDTH-48,8
PUSHBUTTON "&Install...", IDC_INSTALL, PROPSHEETWIDTH-(72), 36, 60, 14
reactos/lib/cpl/control
diff -u -r1.1 -r1.1.2.1
--- Makefile 18 Jun 2004 20:43:44 -0000 1.1
+++ Makefile 30 Jun 2004 21:16:04 -0000 1.1.2.1
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.1 2004/06/18 20:43:44 kuehng Exp $
+# $Id: Makefile,v 1.1.2.1 2004/06/30 21:16:04 hyperion Exp $
PATH_TO_TOP = ../../..
@@ -10,9 +10,16 @@
TARGET_APPTYPE = windows
-MK_CFLAGS = -D_UNICODE -DUNICODE
-MK_CPPFLAGS = -D_UNICODE -DUNICODE
-MK_RCFLAGS = -D_UNICODE -DUNICODE
+TARGET_CFLAGS = \
+ -D_WIN32_IE=0x0600 \
+ -D_WIN32_WINNT=0x0501 \
+ -DUNICODE \
+ -D_UNICODE \
+ -D__REACTOS__ \
+ -D__USE_W32API \
+ -Wall \
+ -Werror \
+ -fno-builtin
TARGET_SDKLIBS = kernel32.a user32.a comctl32.a
reactos/lib/cpl/control
diff -u -r1.1 -r1.1.2.1
--- control.c 19 Jun 2004 00:11:44 -0000 1.1
+++ control.c 30 Jun 2004 21:16:04 -0000 1.1.2.1
@@ -17,25 +17,23 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: control.c,v 1.1 2004/06/19 00:11:44 kuehng Exp $
+/* $Id: control.c,v 1.1.2.1 2004/06/30 21:16:04 hyperion Exp $
*
* PROJECT: ReactOS System Control Panel
- * FILE: lib/cpl/system/control.cpp
+ * FILE: lib/cpl/system/control.c
* PURPOSE: ReactOS System Control Panel
* PROGRAMMER: Gero Kuehn (reactos.filter@gkware.com)
* UPDATE HISTORY:
* 06-13-2004 Created
*/
+#include <windows.h>
+#include <commctrl.h>
+#include <cpl.h>
+
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <tchar.h>
-#include <windows.h>
-
-#ifdef _MSC_VER
-#include <commctrl.h>
-#include <cpl.h>
-#endif
#include "resource.h"
@@ -47,6 +45,22 @@
#define CTL_DEBUG(x)
#endif
+
+#define MYWNDCLASS _T("CTLPANELCLASS")
+
+typedef LONG (CALLBACK *CPLAPPLETFUNC)(HWND hwndCPL, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
+
+typedef struct CPLLISTENTRY
+{
+ TCHAR pszPath[MAX_PATH];
+ HMODULE hDLL;
+ CPLAPPLETFUNC pFunc;
+ CPLINFO CPLInfo;
+ int nIndex;
+} CPLLISTENTRY;
+
+
+HWND hListView;
HINSTANCE hInst;
HWND hMainWnd;
@@ -60,19 +74,6 @@
va_end(va);
}
-#define MYWNDCLASS _T("CTLPANELCLASS")
-HWND hListView;
-
-typedef LONG (CALLBACK *CPLAPPLETFUNC)(HWND hwndCPL, UINT uMsg, LPARAM lParam1, LPARAM lParam2);
-
-typedef struct CPLLISTENTRY{
- TCHAR pszPath[MAX_PATH];
- HMODULE hDLL;
- CPLAPPLETFUNC pFunc;
- CPLINFO CPLInfo;
- int nIndex;
-} CPLLISTENTRY;
-
void PopulateCPLList(HWND hLisCtrl)
{
WIN32_FIND_DATA fd;
@@ -83,8 +84,8 @@
GetSystemDirectory(pszSearchPath,MAX_PATH);
_tcscat(pszSearchPath,_T("\\*.cpl"));
hFind = FindFirstFile(pszSearchPath,&fd);
- hImgListSmall = ImageList_Create(16,16,ILC_COLOR,256,1000);
- hImgListLarge = ImageList_Create(32,32,ILC_COLOR,256,1000);
+ hImgListSmall = ImageList_Create(16,16,ILC_COLOR | ILC_MASK,256,1000);
+ hImgListLarge = ImageList_Create(32,32,ILC_COLOR | ILC_MASK,256,1000);
while(hFind != INVALID_HANDLE_VALUE)
{
CPLLISTENTRY *pEntry;
@@ -99,7 +100,7 @@
pEntry->hDLL = LoadLibrary(pEntry->pszPath);
CTL_DEBUG((_T("Handle %08X\r\n"),pEntry->hDLL));
- pEntry->pFunc = (CPLAPPLETFUNC)GetProcAddress(pEntry->hDLL,_T("CPlApplet"));
+ pEntry->pFunc = (CPLAPPLETFUNC)GetProcAddress(pEntry->hDLL,"CPlApplet");
CTL_DEBUG((_T("CPLFunc %08X\r\n"),pEntry->pFunc));
if(pEntry->pFunc && pEntry->pFunc(hLisCtrl,CPL_INIT,0,0))
{
@@ -111,15 +112,16 @@
int index;
pEntry->pFunc(hLisCtrl,CPL_INQUIRE,0,(LPARAM)&pEntry->CPLInfo);
- hIcon = LoadIcon(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon));
+ hIcon = LoadImage(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon),IMAGE_ICON,16,16,LR_DEFAULTCOLOR);
index = ImageList_AddIcon(hImgListSmall,hIcon);
+ DestroyIcon(hIcon);
+ hIcon = LoadImage(pEntry->hDLL,MAKEINTRESOURCE(pEntry->CPLInfo.idIcon),IMAGE_ICON,32,32,LR_DEFAULTCOLOR);
ImageList_AddIcon(hImgListLarge,hIcon);
+ DestroyIcon(hIcon);
-
LoadString(pEntry->hDLL,pEntry->CPLInfo.idName,Name,MAX_PATH);
if(_tcslen(Name))
{
-
LV_ITEM lvi;
memset(&lvi,0x00,sizeof(lvi));
@@ -149,41 +151,41 @@
switch(uMsg)
{
case WM_CREATE:
- {
+ {
RECT rect;
LV_COLUMN column;
GetClientRect(hWnd,&rect);
- hListView = CreateWindow(WC_LISTVIEW,_T(""),LVS_REPORT | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP,0,0,rect.right ,rect.bottom,hWnd,NULL,hInst,0);
+ hListView = CreateWindow(WC_LISTVIEW,_T(""),LVS_REPORT | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD | WS_TABSTOP,0,0,rect.right ,rect.bottom,hWnd,NULL,hInst,0);
CTL_DEBUG((_T("Listview Window %08X\r\n"),hListView));
memset(&column,0x00,sizeof(column));
column.mask=LVCF_FMT | LVCF_WIDTH | LVCF_SUBITEM|LVCF_TEXT;
column.fmt=LVCFMT_LEFT;
- column.cx = 200;
+ column.cx = (rect.right - rect.left) / 3;
column.iSubItem = 0;
column.pszText = _T("Name");
ListView_InsertColumn(hListView,0,&column);
- column.cx = 200;
+ column.cx = (rect.right - rect.left) - ((rect.right - rect.left) / 3) - 1;
column.iSubItem = 1;
column.pszText = _T("Comment");
ListView_InsertColumn(hListView,1,&column);
PopulateCPLList(hListView);
ListView_SetColumnWidth(hListView,2,LVSCW_AUTOSIZE_USEHEADER);
- ListView_Update(hListView,0);
+ ListView_Update(hListView,0);
}
break;
case WM_DESTROY:
- PostQuitMessage(0);
+ PostQuitMessage(0);
break;
case WM_SIZE:
- {
+ {
RECT rect;
GetClientRect(hWnd,&rect);
MoveWindow(hListView,0,0,rect.right,rect.bottom,TRUE);
}
break;
case WM_NOTIFY:
- {
+ {
NMHDR *phdr;
phdr = (NMHDR*)lParam;
switch(phdr->code)
@@ -193,7 +195,7 @@
int nSelect;
LV_ITEM lvi;
CPLLISTENTRY *pEntry;
- nSelect=SendMessage(hListView,LVM_GETNEXTITEM,(WPARAM)-1,LVNI_FOCUSED);
+ nSelect=SendMessage(hListView,LVM_GETNEXTITEM,(WPARAM)-1,LVNI_FOCUSED);
if(nSelect==-1) // no items
{
@@ -219,22 +221,22 @@
case WM_COMMAND:
switch(LOWORD(wParam))
{
- case CM_LARGEICONS:
+ case IDM_LARGEICONS:
SetWindowLong(hListView,GWL_STYLE,LVS_ICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_SMALLICONS:
+ case IDM_SMALLICONS:
SetWindowLong(hListView,GWL_STYLE,LVS_SMALLICON | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_LIST:
+ case IDM_LIST:
SetWindowLong(hListView,GWL_STYLE,LVS_LIST | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_DETAILS:
+ case IDM_DETAILS:
SetWindowLong(hListView,GWL_STYLE,LVS_REPORT | LVS_ALIGNLEFT | LVS_AUTOARRANGE | LVS_SINGLESEL | WS_VISIBLE | WS_CHILD|WS_BORDER|WS_TABSTOP);
break;
- case CM_CLOSE:
+ case IDM_CLOSE:
DestroyWindow(hWnd);
break;
- case CM_ABOUT:
+ case IDM_ABOUT:
MessageBox(hWnd,_T("Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL"),_T("About the Control Panel"),MB_OK | MB_ICONINFORMATION);
break;
}
@@ -262,7 +264,7 @@
wc.lpfnWndProc = MyWindowProc;
RegisterClass(&wc);
InitCommonControls();
- hMainWnd = CreateWindow(MYWNDCLASS,_T("Control Panel"),WS_OVERLAPPEDWINDOW,300,300,500,300,NULL,LoadMenu(hInst,MAKEINTRESOURCE(IDM_MAINMENU)),hInst,0);
+ hMainWnd = CreateWindowEx(WS_EX_CLIENTEDGE,MYWNDCLASS,_T("Control Panel"),WS_OVERLAPPEDWINDOW,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,NULL,LoadMenu(hInst,MAKEINTRESOURCE(IDM_MAINMENU)),hInst,0);
if(!hMainWnd) {
CTL_DEBUG((_T("Unable to create window\r\n")));
return -1;
reactos/lib/cpl/control
diff -u -r1.2 -r1.2.2.1
--- control.rc 19 Jun 2004 00:11:44 -0000 1.2
+++ control.rc 30 Jun 2004 21:16:04 -0000 1.2.2.1
@@ -21,18 +21,18 @@
BEGIN
POPUP "&File"
BEGIN
- MENUITEM "&Close", CM_CLOSE
+ MENUITEM "&Close", IDM_CLOSE
END
POPUP "&View"
BEGIN
- MENUITEM "Large Icons", CM_LARGEICONS
- MENUITEM "Small Icons", CM_SMALLICONS
- MENUITEM "List", CM_LIST
- MENUITEM "Details", CM_DETAILS
+ MENUITEM "Large Icons", IDM_LARGEICONS
+ MENUITEM "Small Icons", IDM_SMALLICONS
+ MENUITEM "List", IDM_LIST
+ MENUITEM "Details", IDM_DETAILS
END
POPUP "Help"
BEGIN
- MENUITEM "About", CM_ABOUT
+ MENUITEM "About", IDM_ABOUT
END
END
reactos/lib/cpl/control
diff -u -r1.1 -r1.1.2.1
--- resource.h 18 Jun 2004 20:43:44 -0000 1.1
+++ resource.h 30 Jun 2004 21:16:04 -0000 1.1.2.1
@@ -2,25 +2,21 @@
// Microsoft Developer Studio generated include file.
// Used by control.rc
//
-#define IDR_MENU1 101
+#define IDI_MAINICON 100
#define IDM_MAINMENU 101
-#define IDI_MAINICON 104
-#define ID_VIEW_LARGEICONS 40002
-#define CM_LARGEICONS 40002
-#define ID_VIEW_SMALLICONS 40003
-#define CM_SMALLICONS 40003
-#define ID_HELP_ABOUT 40007
-#define CM_ABOUT 40007
-#define CM_CLOSE 40008
-#define CM_LIST 40009
-#define CM_DETAILS 40010
+#define IDM_LARGEICONS 40000
+#define IDM_SMALLICONS 40001
+#define IDM_LIST 40002
+#define IDM_DETAILS 40003
+#define IDM_ABOUT 40004
+#define IDM_CLOSE 40005
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 105
-#define _APS_NEXT_COMMAND_VALUE 40011
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 40006
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
reactos/lib/cpl/sysdm
diff -N userprofile.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ userprofile.c 30 Jun 2004 21:16:04 -0000 1.1.2.1
@@ -0,0 +1,48 @@
+/*
+ * ReactOS
+ * Copyright (C) 2004 ReactOS Team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/* $Id: userprofile.c,v 1.1.2.1 2004/06/30 21:16:04 hyperion Exp $
+ *
+ * PROJECT: ReactOS System Control Panel
+ * FILE: lib/cpl/system/computer.c
+ * PURPOSE: Computer settings for networking
+ * PROGRAMMER: Thomas Weidenmueller (w3seek@users.sourceforge.net)
+ * UPDATE HISTORY:
+ * 03-04-2004 Created
+ */
+#include <windows.h>
+#include <stdlib.h>
+#include "resource.h"
+#include "sysdm.h"
+
+/* Property page dialog callback */
+BOOL CALLBACK
+UserProfilePageProc(
+ HWND hwndDlg,
+ UINT uMsg,
+ WPARAM wParam,
+ LPARAM lParam
+)
+{
+ switch(uMsg)
+ {
+ case WM_INITDIALOG:
+ break; //GetUserName
+ }
+ return FALSE;
+}
reactos/lib/cpl/sysdm
diff -u -r1.2 -r1.2.4.1
--- Makefile 29 May 2004 21:24:43 -0000 1.2
+++ Makefile 30 Jun 2004 21:16:04 -0000 1.2.4.1
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.2 2004/05/29 21:24:43 hbirr Exp $
+# $Id: Makefile,v 1.2.4.1 2004/06/30 21:16:04 hyperion Exp $
PATH_TO_TOP = ../../..
@@ -13,10 +13,13 @@
TARGET_BASE = $(TARGET_BASE_LIB_CPL_SYSDM)
TARGET_CFLAGS = \
+ -D_WIN32_IE=0x0600 \
+ -D_WIN32_WINNT=0x0501 \
-I./include \
-DUNICODE \
-D_UNICODE \
-D__REACTOS__ \
+ -D__USE_W32API \
-Wall \
-Werror \
-fno-builtin
@@ -31,7 +34,7 @@
TARGET_CLEAN =
-TARGET_OBJECTS = sysdm.o general.o computer.o hardware.o advanced.o
+TARGET_OBJECTS = sysdm.o general.o computer.o hardware.o advanced.o userprofile.o
DEP_OBJECTS = $(TARGET_OBJECTS)
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- advanced.c 8 Mar 2004 14:24:47 -0000 1.1
+++ advanced.c 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: advanced.c,v 1.1 2004/03/08 14:24:47 weiden Exp $
+/* $Id: advanced.c,v 1.1.8.1 2004/06/30 21:16:04 hyperion Exp $
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/advanced.c
@@ -27,6 +27,8 @@
*/
#include <windows.h>
#include <stdlib.h>
+#include <tchar.h>
+
#include "resource.h"
#include "sysdm.h"
@@ -39,10 +41,14 @@
LPARAM lParam
)
{
- switch(uMsg)
+ switch (uMsg)
{
case WM_INITDIALOG:
break;
+
+ case WM_COMMAND:
+ break;
+
}
return FALSE;
}
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- general.c 8 Mar 2004 14:24:47 -0000 1.1
+++ general.c 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: general.c,v 1.1 2004/03/08 14:24:47 weiden Exp $
+/* $Id: general.c,v 1.1.8.1 2004/06/30 21:16:04 hyperion Exp $
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/general.c
@@ -26,21 +26,23 @@
* 03-04-2004 Created
*/
#include <windows.h>
+#include <tchar.h>
#include <stdlib.h>
+
#include "resource.h"
#include "sysdm.h"
void
ShowLastWin32Error(HWND hWndOwner)
{
- LPWSTR lpMsg;
+ LPTSTR lpMsg;
DWORD LastError;
LastError = GetLastError();
if((LastError == 0) || !FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, LastError,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),(LPWSTR)&lpMsg, 0,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),(LPTSTR)&lpMsg, 0,
NULL))
{
return;
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- hardware.c 8 Mar 2004 14:24:47 -0000 1.1
+++ hardware.c 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: hardware.c,v 1.1 2004/03/08 14:24:47 weiden Exp $
+/* $Id: hardware.c,v 1.1.8.1 2004/06/30 21:16:04 hyperion Exp $
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/hardware.c
@@ -27,17 +27,19 @@
*/
#include <windows.h>
#include <stdlib.h>
+#include <tchar.h>
+
#include "resource.h"
#include "sysdm.h"
-typedef WINBOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow);
+typedef BOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow);
BOOL LaunchDeviceManager(HWND hWndParent)
{
HMODULE hDll;
PDEVMGREXEC DevMgrExec;
BOOL Ret;
-
- if(!(hDll = LoadLibrary(L"devmgr.dll")))
+
+ if(!(hDll = LoadLibrary(_TEXT("devmgr.dll"))))
{
return FALSE;
}
@@ -68,7 +70,7 @@
case WM_COMMAND:
switch(LOWORD(wParam))
{
- case IDC_DEVMGR:
+ case IDC_HARDWARE_DEVICE_MANAGER:
if(!LaunchDeviceManager(hwndDlg))
{
/* FIXME */
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- resource.h 8 Mar 2004 14:24:47 -0000 1.1
+++ resource.h 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -19,7 +19,8 @@
#define IDD_PROPPAGEGENERAL 100
#define IDD_PROPPAGECOMPUTER 101
#define IDD_PROPPAGEHARDWARE 102
-#define IDD_PROPPAGEADVANCED 103
+#define IDD_PROPPAGEUSERPROFILE 103
+#define IDD_PROPPAGEADVANCED 104
#define IDS_CPLSYSTEMNAME 1001
#define IDS_CPLSYSTEMDESCRIPTION 2001
@@ -31,8 +32,23 @@
#define IDC_PROCESSORSPEED 104
#define IDC_SYSTEMMEMORY 105
#define IDC_DEVMGR 106
+#define IDC_ENVVAR 107
+#define IDC_STAREC 108
#define IDC_ICON1 201
+#define IDC_COMPUTERNAME 202
+#define IDC_WORKGROUPDOMAIN_NAME 203
+#define IDC_WORKGROUPDOMAIN 204
+#define IDC_NETWORK_ID 205
+#define IDC_NETWORK_PROPERTY 206
+#define IDC_HARDWARE_WIZARD 207
+#define IDC_HARDWARE_PROFILE 210
+#define IDC_HARDWARE_DRIVER_SIGN 211
+#define IDC_HARDWARE_DEVICE_MANAGER 212
+#define IDC_USERPROFILE_DELETE 213
+#define IDC_USERPROFILE_CHANGE 214
+#define IDC_USERPROFILE_COPY 215
+
#endif /* __CPL_RESOURCE_H */
/* EOF */
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- sysdm.c 8 Mar 2004 14:24:47 -0000 1.1
+++ sysdm.c 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: sysdm.c,v 1.1 2004/03/08 14:24:47 weiden Exp $
+/* $Id: sysdm.c,v 1.1.8.1 2004/06/30 21:16:04 hyperion Exp $
*
* PROJECT: ReactOS System Control Panel
* FILE: lib/cpl/system/sysdm.c
@@ -26,17 +26,17 @@
* 03-04-2004 Created
*/
#include <windows.h>
+#include <commctrl.h>
+#include <prsht.h>
+#include <cpl.h>
#include <stdlib.h>
+
#include "resource.h"
#include "sysdm.h"
#define NUM_APPLETS (1)
LONG CALLBACK SystemApplet(VOID);
-BOOL CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
-BOOL CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
HINSTANCE hApplet = 0;
/* Applets */
@@ -52,7 +52,7 @@
psp->dwSize = sizeof(PROPSHEETPAGE);
psp->dwFlags = PSP_DEFAULT;
psp->hInstance = hApplet;
- psp->u1.pszTemplate = MAKEINTRESOURCE(idDlg);
+ psp->pszTemplate = MAKEINTRESOURCE(idDlg);
psp->pfnDlgProc = DlgProc;
}
@@ -93,7 +93,7 @@
LONG CALLBACK
SystemApplet(VOID)
{
- PROPSHEETPAGE psp[4];
+ PROPSHEETPAGE psp[5];
PROPSHEETHEADER psh;
TCHAR Caption[1024];
@@ -101,20 +101,21 @@
ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
psh.dwSize = sizeof(PROPSHEETHEADER);
- psh.dwFlags = PSH_PROPSHEETPAGE | PSH_USECALLBACK | PSH_PROPTITLE;
+ psh.dwFlags = PSH_PROPSHEETPAGE | PSH_PROPTITLE; /* | PSH_USECALLBACK */
psh.hwndParent = NULL;
psh.hInstance = hApplet;
- psh.u1.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
+ psh.hIcon = LoadIcon(hApplet, MAKEINTRESOURCE(IDI_CPLSYSTEM));
psh.pszCaption = Caption;
psh.nPages = sizeof(psp) / sizeof(PROPSHEETHEADER);
- psh.u2.nStartPage = 0;
- psh.u3.ppsp = psp;
- psh.pfnCallback = PropSheetProc;
+ psh.nStartPage = 0;
+ psh.ppsp = psp;
+ psh.pfnCallback = NULL; /* PropSheetProc; */
InitPropSheetPage(&psp[0], IDD_PROPPAGEGENERAL, GeneralPageProc);
InitPropSheetPage(&psp[1], IDD_PROPPAGECOMPUTER, ComputerPageProc);
InitPropSheetPage(&psp[2], IDD_PROPPAGEHARDWARE, HardwarePageProc);
- InitPropSheetPage(&psp[3], IDD_PROPPAGEADVANCED, AdvancedPageProc);
+ InitPropSheetPage(&psp[3], IDD_PROPPAGEUSERPROFILE, UserProfilePageProc);
+ InitPropSheetPage(&psp[4], IDD_PROPPAGEADVANCED, AdvancedPageProc);
return (LONG)(PropertySheet(&psh) != -1);
}
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- sysdm.h 8 Mar 2004 14:24:47 -0000 1.1
+++ sysdm.h 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -1,20 +1,30 @@
#ifndef __CPL_SYSDM_H
#define __CPL_SYSDM_H
-typedef LONG (CALLBACK *APPLET_PROC)(VOID);
+typedef LONG (CALLBACK *APPLET_INITPROC)(VOID);
typedef struct
{
int idIcon;
int idName;
int idDescription;
- APPLET_PROC AppletProc;
+ APPLET_INITPROC AppletProc;
} APPLET, *PAPPLET;
extern HINSTANCE hApplet;
void ShowLastWin32Error(HWND hWndOwner);
+BOOL CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK ComputerPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK AdvancedPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+BOOL CALLBACK UserProfilePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+
+//BOOL CALLBACK EnvironmentDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+
+
#endif /* __CPL_SYSDM_H */
/* EOF */
reactos/lib/cpl/sysdm
diff -u -r1.1 -r1.1.8.1
--- sysdm.rc 8 Mar 2004 14:24:47 -0000 1.1
+++ sysdm.rc 30 Jun 2004 21:16:04 -0000 1.1.8.1
@@ -1,5 +1,6 @@
#include <reactos/resource.h>
#include <defines.h>
+#include <commctrl.h>
#include "resource.h"
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
@@ -61,21 +62,54 @@
IDD_PROPPAGECOMPUTER DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
-CAPTION "Computer Name"
+CAPTION "Network Identification"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- /* LTEXT "Property Page 2",-1,73,74,90,8 */
+ ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING,LABELLINE(1)-5, ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "Windows uses the following information to identify your computer on the network.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(1)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
+ LTEXT "Full computer name:",-1,PROPSHEETPADDING,LABELLINE(4)-4,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(4)-4
+ LTEXT "",IDC_COMPUTERNAME,90,LABELLINE(4)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(4)-5
+ LTEXT "Workgroup:",IDC_WORKGROUPDOMAIN,PROPSHEETPADDING,LABELLINE(6)-6,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)-6
+ LTEXT "",IDC_WORKGROUPDOMAIN_NAME,90,LABELLINE(6)-6,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)-6
+ LTEXT "To use the Network Identfication Wizard to join a domain and create a local user, click Network ID.",-1,PROPSHEETPADDING,LABELLINE(7)+5,PROPSHEETWIDTH-(12*PROPSHEETPADDING)-ICONSIZE,LABELLINE(8)+5
+ PUSHBUTTON "&Network ID",IDC_NETWORK_ID,185,LABELLINE(7)+5,54,LABELLINE(1)+4
+ LTEXT "To rename this computer or join a domain, click Properties.",-1,PROPSHEETPADDING,LABELLINE(11)+2,PROPSHEETWIDTH-(12*PROPSHEETPADDING)-ICONSIZE,LABELLINE(12)+2
+ PUSHBUTTON "&Properties",IDC_NETWORK_PROPERTY,185,LABELLINE(11)+2,54,LABELLINE(1)+4
END
IDD_PROPPAGEHARDWARE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
CAPTION "Hardware"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- GROUPBOX "Hardware Devices",-1,PROPSHEETPADDING,PROPSHEETPADDING,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+BEGIN
+ GROUPBOX "Hardware Wizard",-1,PROPSHEETPADDING,LABELLINE(1),PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+ LTEXT "The Hardware wizard helps you install, uninstall, repair, unplug, eject, and configure your hardware.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON
- LTEXT "The Device Manager lists all the hardware devices that are installed on your computer. Use the Device Manger to change their settings.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
- PUSHBUTTON "&Device Manager",IDC_DEVMGR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
+ PUSHBUTTON "&Hardware Wizard",IDC_HARDWARE_WIZARD,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
+
+ GROUPBOX "Device Manager",-1,PROPSHEETPADDING,LABELLINE(8)+5,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(7)+2
+ ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(10)-3,ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "The Device Manager lists all the hardware devices installed on your computer. Use the Device Manager to change the properties of any device.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(10)-3,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
+
+ PUSHBUTTON "&Device Manager",IDC_HARDWARE_DEVICE_MANAGER,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(13)+2,(15*PROPSHEETPADDING),14
+
+ GROUPBOX "Hardware Profiles",-1,PROPSHEETPADDING,LABELLINE(16)+3,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+ ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(18)-5, ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "Hardware profiles provide a way for you to set up and store different hardware configurations.",0,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(18)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
+ PUSHBUTTON "&Hardware Profiles",IDC_HARDWARE_PROFILE,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(20)+2,(15*PROPSHEETPADDING),14
+END
+
+IDD_PROPPAGEUSERPROFILE DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION
+CAPTION "User Profiles"
+FONT 8, "MS Shell Dlg", 0, 0, 0x0
+BEGIN
+ ICON IDI_DEVMGR, IDC_ICON1, PROPSHEETPADDING,LABELLINE(1), ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "User profiles contain desktop settings and other information related to your login. A different profile can be created on each computer you use, or you can select a roaming profile that is the same on every computer you use.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(1),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(4)
+ LTEXT "Profiles stored on this computer:",-1,PROPSHEETPADDING,LABELLINE(6),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(6)
+ PUSHBUTTON "Delete",IDC_USERPROFILE_DELETE,PROPSHEETPADDING,LABELLINE(23),60,LABELLINE(1)+2
+ PUSHBUTTON "Change Type",IDC_USERPROFILE_CHANGE,95,LABELLINE(23),60,LABELLINE(1)+2
+ PUSHBUTTON "Copy To",IDC_USERPROFILE_COPY,180,LABELLINE(23),60,LABELLINE(1)+2
END
IDD_PROPPAGEADVANCED DIALOGEX 0, 0, PROPSHEETWIDTH, PROPSHEETHEIGHT
@@ -83,7 +117,18 @@
CAPTION "Advanced"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- /* LTEXT "Property Page 4",-1,73,74,90,8 */
+ GROUPBOX "Performance",-1,PROPSHEETPADDING,LABELLINE(1),PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+ ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(2), ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "Performance options control how applications use memory, which affects the speed of your computer.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(2),PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
+ PUSHBUTTON "&Performance Options",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(5)+2,(15*PROPSHEETPADDING),14
+ GROUPBOX "Environment Variables",-1,PROPSHEETPADDING,LABELLINE(8)+2,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+ ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(10)-5, ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "Environment variables tell your computer where to find certain types of information.",-1,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(10)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(11)
+ PUSHBUTTON "&Environment Variables",IDC_ENVVAR,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(12)+2,(15*PROPSHEETPADDING),14
+ GROUPBOX "Startup and Recovery",-1,PROPSHEETPADDING,LABELLINE(15)+3,PROPSHEETWIDTH-(2*PROPSHEETPADDING),LABELLINE(6)+PROPSHEETPADDING
+ ICON IDI_DEVMGR, IDC_ICON1, (2*PROPSHEETPADDING),LABELLINE(17)-5, ICONSIZE, ICONSIZE, SS_ICON
+ LTEXT "Startup and recovery options tell your computer how to start and what to do if an error causes your computer to stop.",0,(4*PROPSHEETPADDING)+ICONSIZE,LABELLINE(17)-5,PROPSHEETWIDTH-(6*PROPSHEETPADDING)-ICONSIZE,LABELLINE(3)
+ PUSHBUTTON "&Startup and Recovery",IDC_STAREC,PROPSHEETWIDTH-(17*PROPSHEETPADDING),LABELLINE(19)+2,(15*PROPSHEETPADDING),14
END
STRINGTABLE
reactos/lib/kernel32/file
diff -u -r1.45 -r1.45.4.1
--- dir.c 2 Jun 2004 18:26:57 -0000 1.45
+++ dir.c 30 Jun 2004 21:16:04 -0000 1.45.4.1
@@ -1,4 +1,4 @@
-/* $Id: dir.c,v 1.45 2004/06/02 18:26:57 gvg Exp $
+/* $Id: dir.c,v 1.45.4.1 2004/06/30 21:16:04 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -433,43 +433,157 @@
/*
- * @unimplemented
+ * NOTE: Copied from Wine.
+ * @implemented
*/
DWORD
STDCALL
GetShortPathNameA (
- LPCSTR lpszLongPath,
- LPSTR lpszShortPath,
- DWORD cchBuffer
+ LPCSTR longpath,
+ LPSTR shortpath,
+ DWORD shortlen
)
{
- //1 remove unicode chars and spaces
- //2 remove preceding and trailing periods.
- //3 remove embedded periods except the last one
+ UNICODE_STRING longpathW;
+ WCHAR shortpathW[MAX_PATH];
+ DWORD ret, retW;
+
+ if (!longpath)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
- //4 Split the string in two parts before and after the period
- // truncate the part before the period to 6 chars and add ~1
- // truncate the part after the period to 3 chars
- //3 Put the new name in uppercase
+ if (!RtlCreateUnicodeStringFromAsciiz(&longpathW, longpath))
+ {
+ SetLastError(ERROR_NOT_ENOUGH_MEMORY);
+ return 0;
+ }
- //4 Increment the ~1 string if the resulting name allready exists
+ retW = GetShortPathNameW(longpathW.Buffer, shortpathW, MAX_PATH);
- return 0;
+ if (!retW)
+ ret = 0;
+ else if (retW > PATH_MAX)
+ {
+ SetLastError(ERROR_FILENAME_EXCED_RANGE);
+ ret = 0;
+ }
+ else
+ {
+ ret = WideCharToMultiByte(CP_ACP, 0, shortpathW, -1, NULL, 0, NULL, NULL);
+ if (ret <= shortlen)
+ {
+ WideCharToMultiByte(CP_ACP, 0, shortpathW, -1, shortpath, shortlen, NULL, NULL);
+ ret--; /* length without 0 */
+ }
+ }
+
+ RtlFreeUnicodeString(&longpathW);
+ return ret;
}
/*
- * @unimplemented
+ * NOTE: Copied from Wine.
+ * @implemented
*/
DWORD
STDCALL
GetShortPathNameW (
- LPCWSTR lpszLongPath,
- LPWSTR lpszShortPath,
- DWORD cchBuffer
- )
-{
+ LPCWSTR longpath,
+ LPWSTR shortpath,
+ DWORD shortlen
+ )
+{
+ WCHAR tmpshortpath[PATH_MAX];
+ LPCWSTR p;
+ DWORD sp = 0, lp = 0;
+ DWORD tmplen;
+ WIN32_FIND_DATAW wfd;
+ HANDLE goit;
+ UNICODE_STRING ustr;
+ WCHAR ustr_buf[8+1+3+1];
+
+ if (!longpath)
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+ if (!longpath[0])
+ {
+ SetLastError(ERROR_BAD_PATHNAME);
return 0;
+ }
+
+ /* check for drive letter */
+ if (longpath[1] == ':' )
+ {
+ tmpshortpath[0] = longpath[0];
+ tmpshortpath[1] = ':';
+ sp = lp = 2;
+ }
+
+ ustr.Buffer = ustr_buf;
+ ustr.Length = 0;
+ ustr.MaximumLength = sizeof(ustr_buf);
+
+ while (longpath[lp])
+ {
+ /* check for path delimiters and reproduce them */
+ if (longpath[lp] == '\\' || longpath[lp] == '/')
+ {
+ if (!sp || tmpshortpath[sp-1] != '\\')
+ {
+ /* strip double "\\" */
+ tmpshortpath[sp] = '\\';
+ sp++;
+ }
+ tmpshortpath[sp] = 0; /* terminate string */
+ lp++;
+ continue;
+ }
+
+ for (p = longpath + lp; *p && *p != '/' && *p != '\\'; p++);
+ tmplen = p - (longpath + lp);
+ lstrcpynW(tmpshortpath + sp, longpath + lp, tmplen + 1);
+ /* Check, if the current element is a valid dos name */
+ if (tmplen <= 8+1+3+1)
+ {
+ BOOLEAN spaces;
+ memcpy(ustr_buf, longpath + lp, tmplen * sizeof(WCHAR));
+ ustr_buf[tmplen] = '\0';
+ ustr.Length = tmplen * sizeof(WCHAR);
+ if (RtlIsNameLegalDOS8Dot3(&ustr, NULL, &spaces) && !spaces)
+ {
+ sp += tmplen;
+ lp += tmplen;
+ continue;
+ }
+ }
+
+ /* Check if the file exists and use the existing short file name */
+ goit = FindFirstFileW(tmpshortpath, &wfd);
+ if (goit == INVALID_HANDLE_VALUE) goto notfound;
+ FindClose(goit);
+ lstrcpyW(tmpshortpath + sp, wfd.cAlternateFileName);
+ sp += lstrlenW(tmpshortpath + sp);
+ lp += tmplen;
+ }
+ tmpshortpath[sp] = 0;
+
+ tmplen = lstrlenW(tmpshortpath) + 1;
+ if (tmplen <= shortlen)
+ {
+ lstrcpyW(shortpath, tmpshortpath);
+ tmplen--; /* length without 0 */
+ }
+
+ return tmplen;
+
+ notfound:
+ SetLastError ( ERROR_FILE_NOT_FOUND );
+ return 0;
}
reactos/lib/kernel32/include
diff -u -r1.5 -r1.5.4.1
--- kernel32.h 13 Jun 2004 20:04:55 -0000 1.5
+++ kernel32.h 30 Jun 2004 21:16:04 -0000 1.5.4.1
@@ -37,6 +37,7 @@
extern BOOL bIsFileApiAnsi;
extern HANDLE hProcessHeap;
extern HANDLE hBaseDir;
+extern HMODULE hCurrentModule;
extern CRITICAL_SECTION DllLock;
reactos/lib/kernel32
diff -u -r1.80 -r1.80.4.1
--- makefile 29 May 2004 21:24:44 -0000 1.80
+++ makefile 30 Jun 2004 21:16:04 -0000 1.80.4.1
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.80 2004/05/29 21:24:44 hbirr Exp $
+# $Id: makefile,v 1.80.4.1 2004/06/30 21:16:04 hyperion Exp $
PATH_TO_TOP = ../..
@@ -34,7 +34,7 @@
misc/stubs.o misc/lang.o misc/ldr.o misc/res.o \
misc/sysinfo.o misc/profile.o \
misc/mbchars.o misc/muldiv.o misc/computername.o \
- misc/perfcnt.o misc/lzexpand_main.o
+ misc/perfcnt.o misc/lzexpand_main.o misc/lcformat.o
FILE_OBJECTS = file/file.o file/curdir.o file/lfile.o file/dir.o \
file/iocompl.o file/volume.o file/deviceio.o file/dosdev.o \
reactos/lib/kernel32/misc
diff -N lcformat.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lcformat.c 30 Jun 2004 21:16:06 -0000 1.1.2.1
@@ -0,0 +1,1947 @@
+/*
+ * Locale-dependent format handling
+ *
+ * Copyright 1995 Martin von Loewis
+ * Copyright 1998 David Lee Lambert
+ * Copyright 2000 Julio C��sar G��zquez
+ * Copyright 2003 Jon Griffiths
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+/*
+ * Whole file ripped from Wine's dlls\kernel\lcformat.c, rev 1.7 and is
+ * unchanged except that includes are different. I thought about adding
+ * @implemeted to each exported function, but this might make merging harder?
+ * -Gunnar
+ */
+
+#define WINVER 0x0500
+
+#include <k32.h>
+
+#include "wine/config.h"
+#include "wine/port.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
+
+
+WINE_DEFAULT_DEBUG_CHANNEL(nls);
+
+#define DATE_DATEVARSONLY 0x0100 /* only date stuff: yMdg */
+#define TIME_TIMEVARSONLY 0x0200 /* only time stuff: hHmst */
+
+/* Since calculating the formatting data for each locale is time-consuming,
+ * we get the format data for each locale only once and cache it in memory.
+ * We cache both the system default and user overridden data, after converting
+ * them into the formats that the functions here expect. Since these functions
+ * will typically be called with only a small number of the total locales
+ * installed, the memory overhead is minimal while the speedup is significant.
+ *
+ * Our cache takes the form of a singly linked list, whose node is below:
+ */
+#define NLS_NUM_CACHED_STRINGS 45
+
+typedef struct _NLS_FORMAT_NODE
+{
+ LCID lcid; /* Locale Id */
+ DWORD dwFlags; /* 0 or LOCALE_NOUSEROVERRIDE */
+ DWORD dwCodePage; /* Default code page (if LOCALE_USE_ANSI_CP not given) */
+ NUMBERFMTW fmt; /* Default format for numbers */
+ CURRENCYFMTW cyfmt; /* Default format for currencies */
+ LPWSTR lppszStrings[NLS_NUM_CACHED_STRINGS]; /* Default formats,day/month names */
+ WCHAR szShortAM[2]; /* Short 'AM' marker */
+ WCHAR szShortPM[2]; /* Short 'PM' marker */
+ struct _NLS_FORMAT_NODE *next;
+} NLS_FORMAT_NODE;
+
+/* Macros to get particular data strings from a format node */
+#define GetNegative(fmt) fmt->lppszStrings[0]
+#define GetLongDate(fmt) fmt->lppszStrings[1]
+#define GetShortDate(fmt) fmt->lppszStrings[2]
+#define GetTime(fmt) fmt->lppszStrings[3]
+#define GetAM(fmt) fmt->lppszStrings[42]
+#define GetPM(fmt) fmt->lppszStrings[43]
+#define GetYearMonth(fmt) fmt->lppszStrings[44]
+
+#define GetLongDay(fmt,day) fmt->lppszStrings[4 + day]
+#define GetShortDay(fmt,day) fmt->lppszStrings[11 + day]
+#define GetLongMonth(fmt,mth) fmt->lppszStrings[18 + mth]
+#define GetShortMonth(fmt,mth) fmt->lppszStrings[30 + mth]
+
+/* Write access to the cache is protected by this critical section */
+static CRITICAL_SECTION NLS_FormatsCS;
+static CRITICAL_SECTION_DEBUG NLS_FormatsCS_debug =
+{
+ 0, 0, &NLS_FormatsCS,
+ { &NLS_FormatsCS_debug.ProcessLocksList,
+ &NLS_FormatsCS_debug.ProcessLocksList },
+ 0, 0, { 0, (DWORD)(__FILE__ ": NLS_Formats") }
+};
+static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 };
+
+/**************************************************************************
+ * NLS_GetLocaleNumber <internal>
+ *
+ * Get a numeric locale format value.
+ */
+static DWORD NLS_GetLocaleNumber(LCID lcid, DWORD dwFlags)
+{
+ WCHAR szBuff[80];
+ DWORD dwVal = 0;
+
+ szBuff[0] = '\0';
+ GetLocaleInfoW(lcid, dwFlags, szBuff, sizeof(szBuff) / sizeof(WCHAR));
+
+ if (szBuff[0] && szBuff[1] == ';' && szBuff[2] != '0')
+ dwVal = (szBuff[0] - '0') * 10 + (szBuff[2] - '0');
+ else
+ {
+ const WCHAR* iter = szBuff;
+ dwVal = 0;
+ while(*iter >= '0' && *iter <= '9')
+ dwVal = dwVal * 10 + (*iter++ - '0');
+ }
+ return dwVal;
+}
+
+/**************************************************************************
+ * NLS_GetLocaleString <internal>
+ *
+ * Get a string locale format value.
+ */
+static WCHAR* NLS_GetLocaleString(LCID lcid, DWORD dwFlags)
+{
+ WCHAR szBuff[80], *str;
+ DWORD dwLen;
+
+ szBuff[0] = '\0';
+ GetLocaleInfoW(lcid, dwFlags, szBuff, sizeof(szBuff) / sizeof(WCHAR));
+ dwLen = strlenW(szBuff) + 1;
+ str = HeapAlloc(GetProcessHeap(), 0, dwLen * sizeof(WCHAR));
+ if (str)
+ memcpy(str, szBuff, dwLen * sizeof(WCHAR));
+ return str;
+}
+
+#define GET_LOCALE_NUMBER(num, type) num = NLS_GetLocaleNumber(lcid, type|dwFlags); \
+ TRACE( #type ": %ld (%08lx)\n", (DWORD)num, (DWORD)num)
+
+#define GET_LOCALE_STRING(str, type) str = NLS_GetLocaleString(lcid, type|dwFlags); \
+ TRACE( #type ": '%s'\n", debugstr_w(str))
+
+/**************************************************************************
+ * NLS_GetFormats <internal>
+ *
+ * Calculate (and cache) the number formats for a locale.
+ */
+static const NLS_FORMAT_NODE *NLS_GetFormats(LCID lcid, DWORD dwFlags)
+{
+ /* GetLocaleInfo() identifiers for cached formatting strings */
+ static const USHORT NLS_LocaleIndices[] = {
+ LOCALE_SNEGATIVESIGN,
+ LOCALE_SLONGDATE, LOCALE_SSHORTDATE,
+ LOCALE_STIMEFORMAT,
+ LOCALE_SDAYNAME1, LOCALE_SDAYNAME2, LOCALE_SDAYNAME3,
+ LOCALE_SDAYNAME4, LOCALE_SDAYNAME5, LOCALE_SDAYNAME6, LOCALE_SDAYNAME7,
+ LOCALE_SABBREVDAYNAME1, LOCALE_SABBREVDAYNAME2, LOCALE_SABBREVDAYNAME3,
+ LOCALE_SABBREVDAYNAME4, LOCALE_SABBREVDAYNAME5, LOCALE_SABBREVDAYNAME6,
+ LOCALE_SABBREVDAYNAME7,
+ LOCALE_SMONTHNAME1, LOCALE_SMONTHNAME2, LOCALE_SMONTHNAME3,
+ LOCALE_SMONTHNAME4, LOCALE_SMONTHNAME5, LOCALE_SMONTHNAME6,
+ LOCALE_SMONTHNAME7, LOCALE_SMONTHNAME8, LOCALE_SMONTHNAME9,
+ LOCALE_SMONTHNAME10, LOCALE_SMONTHNAME11, LOCALE_SMONTHNAME12,
+ LOCALE_SABBREVMONTHNAME1, LOCALE_SABBREVMONTHNAME2, LOCALE_SABBREVMONTHNAME3,
+ LOCALE_SABBREVMONTHNAME4, LOCALE_SABBREVMONTHNAME5, LOCALE_SABBREVMONTHNAME6,
+ LOCALE_SABBREVMONTHNAME7, LOCALE_SABBREVMONTHNAME8, LOCALE_SABBREVMONTHNAME9,
+ LOCALE_SABBREVMONTHNAME10, LOCALE_SABBREVMONTHNAME11, LOCALE_SABBREVMONTHNAME12,
+ LOCALE_S1159, LOCALE_S2359,
+ LOCALE_SYEARMONTH
+ };
+ static NLS_FORMAT_NODE *NLS_CachedFormats = NULL;
+ NLS_FORMAT_NODE *node = NLS_CachedFormats;
+
+ dwFlags &= LOCALE_NOUSEROVERRIDE;
+
+ TRACE("(0x%04lx,0x%08lx)\n", lcid, dwFlags);
+
+ /* See if we have already cached the locales number format */
+ while (node && (node->lcid != lcid || node->dwFlags != dwFlags) && node->next)
+ node = node->next;
+
+ if (!node || node->lcid != lcid || node->dwFlags != dwFlags)
+ {
+ NLS_FORMAT_NODE *new_node;
+ DWORD i;
+
+ TRACE("Creating new cache entry\n");
+
+ if (!(new_node = HeapAlloc(GetProcessHeap(), 0, sizeof(NLS_FORMAT_NODE))))
+ return NULL;
+
+ GET_LOCALE_NUMBER(new_node->dwCodePage, LOCALE_IDEFAULTANSICODEPAGE);
+
+ /* Number Format */
+ new_node->lcid = lcid;
+ new_node->dwFlags = dwFlags;
+ new_node->next = NULL;
+
+ GET_LOCALE_NUMBER(new_node->fmt.NumDigits, LOCALE_IDIGITS);
+ GET_LOCALE_NUMBER(new_node->fmt.LeadingZero, LOCALE_ILZERO);
+ GET_LOCALE_NUMBER(new_node->fmt.NegativeOrder, LOCALE_INEGNUMBER);
+
+ GET_LOCALE_NUMBER(new_node->fmt.Grouping, LOCALE_SGROUPING);
+ if (new_node->fmt.Grouping > 9 && new_node->fmt.Grouping != 32)
+ {
+ WARN("LOCALE_SGROUPING (%d) unhandled, please report!\n",
+ new_node->fmt.Grouping);
+ new_node->fmt.Grouping = 0;
+ }
+
+ GET_LOCALE_STRING(new_node->fmt.lpDecimalSep, LOCALE_SDECIMAL);
+ GET_LOCALE_STRING(new_node->fmt.lpThousandSep, LOCALE_STHOUSAND);
+
+ /* Currency Format */
+ new_node->cyfmt.NumDigits = new_node->fmt.NumDigits;
+ new_node->cyfmt.LeadingZero = new_node->fmt.LeadingZero;
+
+ GET_LOCALE_NUMBER(new_node->cyfmt.Grouping, LOCALE_SGROUPING);
+
+ if (new_node->cyfmt.Grouping > 9)
+ {
+ WARN("LOCALE_SMONGROUPING (%d) unhandled, please report!\n",
+ new_node->cyfmt.Grouping);
+ new_node->cyfmt.Grouping = 0;
+ }
+
+ GET_LOCALE_NUMBER(new_node->cyfmt.NegativeOrder, LOCALE_INEGCURR);
+ if (new_node->cyfmt.NegativeOrder > 15)
+ {
+ WARN("LOCALE_INEGCURR (%d) unhandled, please report!\n",
+ new_node->cyfmt.NegativeOrder);
+ new_node->cyfmt.NegativeOrder = 0;
+ }
+ GET_LOCALE_NUMBER(new_node->cyfmt.PositiveOrder, LOCALE_ICURRENCY);
+ if (new_node->cyfmt.PositiveOrder > 3)
+ {
+ WARN("LOCALE_IPOSCURR (%d) unhandled,please report!\n",
+ new_node->cyfmt.PositiveOrder);
+ new_node->cyfmt.PositiveOrder = 0;
+ }
+ GET_LOCALE_STRING(new_node->cyfmt.lpDecimalSep, LOCALE_SMONDECIMALSEP);
+ GET_LOCALE_STRING(new_node->cyfmt.lpThousandSep, LOCALE_SMONTHOUSANDSEP);
+ GET_LOCALE_STRING(new_node->cyfmt.lpCurrencySymbol, LOCALE_SCURRENCY);
+
+ /* Date/Time Format info, negative character, etc */
+ for (i = 0; i < sizeof(NLS_LocaleIndices)/sizeof(NLS_LocaleIndices[0]); i++)
+ {
+ GET_LOCALE_STRING(new_node->lppszStrings[i], NLS_LocaleIndices[i]);
+ }
+ new_node->szShortAM[0] = GetAM(new_node)[0]; new_node->szShortAM[1] = '\0';
+ new_node->szShortPM[0] = GetPM(new_node)[0]; new_node->szShortPM[1] = '\0';
+
+ /* Now add the computed format to the cache */
+ RtlEnterCriticalSection(&NLS_FormatsCS);
+
+ /* Search again: We may have raced to add the node */
+ node = NLS_CachedFormats;
+ while (node && (node->lcid != lcid || node->dwFlags != dwFlags) && node->next)
+ node = node->next;
+
+ if (!node)
+ {
+ node = NLS_CachedFormats = new_node; /* Empty list */
+ new_node = NULL;
+ }
+ else if (node->lcid != lcid || node->dwFlags != dwFlags)
+ {
+ node->next = new_node; /* Not in the list, add to end */
+ node = new_node;
+ new_node = NULL;
+ }
+
+ RtlLeaveCriticalSection(&NLS_FormatsCS);
+
+ if (new_node)
+ {
+ /* We raced and lost: The node was already added by another thread.
+ * node points to the currently cached node, so free new_node.
+ */
+ for (i = 0; i < sizeof(NLS_LocaleIndices)/sizeof(NLS_LocaleIndices[0]); i++)
+ HeapFree(GetProcessHeap(), 0, new_node->lppszStrings[i]);
+ HeapFree(GetProcessHeap(), 0, new_node->fmt.lpDecimalSep);
+ HeapFree(GetProcessHeap(), 0, new_node->fmt.lpThousandSep);
+ HeapFree(GetProcessHeap(), 0, new_node->cyfmt.lpDecimalSep);
+ HeapFree(GetProcessHeap(), 0, new_node->cyfmt.lpThousandSep);
+ HeapFree(GetProcessHeap(), 0, new_node->cyfmt.lpCurrencySymbol);
+ HeapFree(GetProcessHeap(), 0, new_node);
+ }
+ }
+ return node;
+}
+
+/**************************************************************************
+ * NLS_IsUnicodeOnlyLcid <internal>
+ *
+ * Determine if a locale is Unicode only, and thus invalid in ASCII calls.
+ */
+BOOL NLS_IsUnicodeOnlyLcid(LCID lcid)
+{
+ switch (PRIMARYLANGID(lcid))
+ {
+ case LANG_ARMENIAN:
+ case LANG_DIVEHI:
+ case LANG_GEORGIAN:
+ case LANG_GUJARATI:
+ case LANG_HINDI:
+ case LANG_KANNADA:
+ case LANG_KONKANI:
+ case LANG_MARATHI:
+ case LANG_PUNJABI:
+ case LANG_SANSKRIT:
+ TRACE("lcid 0x%08lx: langid 0x%4x is Unicode Only\n", lcid, PRIMARYLANGID(lcid));
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+/*
+ * Formatting of dates, times, numbers and currencies.
+ */
+
+#define IsLiteralMarker(p) (p == '\'')
+#define IsDateFmtChar(p) (p == 'd'||p == 'M'||p == 'y'||p == 'g')
+#define IsTimeFmtChar(p) (p == 'H'||p == 'h'||p == 'm'||p == 's'||p == 't')
+
+/* Only the following flags can be given if a date/time format is specified */
+#define DATE_FORMAT_FLAGS (DATE_DATEVARSONLY|LOCALE_NOUSEROVERRIDE)
+#define TIME_FORMAT_FLAGS (TIME_TIMEVARSONLY|TIME_FORCE24HOURFORMAT| \
+ TIME_NOMINUTESORSECONDS|TIME_NOSECONDS| \
+ TIME_NOTIMEMARKER|LOCALE_NOUSEROVERRIDE)
+
+/******************************************************************************
+ * NLS_GetDateTimeFormatW <internal>
+ *
+ * Performs the formatting for GetDateFormatW/GetTimeFormatW.
+ *
+ * FIXME
+ * DATE_USE_ALT_CALENDAR - Requires GetCalendarInfo to work first.
+ * DATE_LTRREADING/DATE_RTLREADING - Not yet implemented.
+ */
+static INT NLS_GetDateTimeFormatW(LCID lcid, DWORD dwFlags,
+ const SYSTEMTIME* lpTime, LPCWSTR lpFormat,
+ LPWSTR lpStr, INT cchOut)
+{
+ const NLS_FORMAT_NODE *node;
+ SYSTEMTIME st;
+ INT cchWritten = 0;
+ INT lastFormatPos = 0;
+ BOOL bSkipping = FALSE; /* Skipping text around marker? */
+
+ /* Verify our arguments */
+ if ((cchOut && !lpStr) || !(node = NLS_GetFormats(lcid, dwFlags)))
+ {
+NLS_GetDateTimeFormatW_InvalidParameter:
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ if (dwFlags & ~(DATE_DATEVARSONLY|TIME_TIMEVARSONLY))
+ {
+ if (lpFormat &&
+ ((dwFlags & DATE_DATEVARSONLY && dwFlags & ~DATE_FORMAT_FLAGS) ||
+ (dwFlags & TIME_TIMEVARSONLY && dwFlags & ~TIME_FORMAT_FLAGS)))
+ {
+NLS_GetDateTimeFormatW_InvalidFlags:
+ SetLastError(ERROR_INVALID_FLAGS);
+ return 0;
+ }
+
+ if (dwFlags & DATE_DATEVARSONLY)
+ {
+ if ((dwFlags & (DATE_LTRREADING|DATE_RTLREADING)) == (DATE_LTRREADING|DATE_RTLREADING))
+ goto NLS_GetDateTimeFormatW_InvalidFlags;
+ else if (dwFlags & (DATE_LTRREADING|DATE_RTLREADING))
+ FIXME("Unsupported flags: DATE_LTRREADING/DATE_RTLREADING\n");
+
+ switch (dwFlags & (DATE_SHORTDATE|DATE_LONGDATE|DATE_YEARMONTH))
+ {
+ case 0:
+ break;
+ case DATE_SHORTDATE:
+ case DATE_LONGDATE:
+ case DATE_YEARMONTH:
+ if (lpFormat)
+ goto NLS_GetDateTimeFormatW_InvalidFlags;
+ break;
+ default:
+ goto NLS_GetDateTimeFormatW_InvalidFlags;
+ }
+ }
+ }
+
+ if (!lpFormat)
+ {
+ /* Use the appropriate default format */
+ if (dwFlags & DATE_DATEVARSONLY)
+ {
+ if (dwFlags & DATE_YEARMONTH)
+ lpFormat = GetYearMonth(node);
+ else if (dwFlags & DATE_LONGDATE)
+ lpFormat = GetLongDate(node);
+ else
+ lpFormat = GetShortDate(node);
+ }
+ else
+ lpFormat = GetTime(node);
+ }
+
+ if (!lpTime)
+ {
+ GetSystemTime(&st); /* Default to current time */
+ lpTime = &st;
+ }
+ else
+ {
+ if (dwFlags & DATE_DATEVARSONLY)
+ {
+ FILETIME ftTmp;
+
+ /* Verify the date and correct the D.O.W. if needed */
+ memset(&st, 0, sizeof(st));
+ st.wYear = lpTime->wYear;
+ st.wMonth = lpTime->wMonth;
+ st.wDay = lpTime->wDay;
+
+ if (st.wDay > 31 || st.wMonth > 12 || !SystemTimeToFileTime(&st, &ftTmp))
+ goto NLS_GetDateTimeFormatW_InvalidParameter;
+
+ FileTimeToSystemTime(&ftTmp, &st);
+ lpTime = &st;
+ }
+
+ if (dwFlags & TIME_TIMEVARSONLY)
+ {
+ /* Verify the time */
+ if (lpTime->wHour > 24 || lpTime->wMinute > 59 || lpTime->wSecond > 59)
+ goto NLS_GetDateTimeFormatW_InvalidParameter;
+ }
+ }
+
+ /* Format the output */
+ while (*lpFormat)
+ {
+ if (IsLiteralMarker(*lpFormat))
+ {
+ /* Start of a literal string */
+ lpFormat++;
+
+ /* Loop until the end of the literal marker or end of the string */
+ while (*lpFormat)
+ {
+ if (IsLiteralMarker(*lpFormat))
+ {
+ lpFormat++;
+ if (!IsLiteralMarker(*lpFormat))
+ break; /* Terminating literal marker */
+ }
+
+ if (!cchOut)
+ cchWritten++; /* Count size only */
+ else if (cchWritten >= cchOut)
+ goto NLS_GetDateTimeFormatW_Overrun;
+ else if (!bSkipping)
+ {
+ lpStr[cchWritten] = *lpFormat;
+ cchWritten++;
+ }
+ lpFormat++;
+ }
+ }
+ else if ((dwFlags & DATE_DATEVARSONLY && IsDateFmtChar(*lpFormat)) ||
+ (dwFlags & TIME_TIMEVARSONLY && IsTimeFmtChar(*lpFormat)))
+ {
+ char buffA[32];
+ WCHAR buff[32], fmtChar;
+ LPCWSTR szAdd = NULL;
+ DWORD dwVal = 0;
+ int count = 0, dwLen;
+
+ bSkipping = FALSE;
+
+ fmtChar = *lpFormat;
+ while (*lpFormat == fmtChar)
+ {
+ count++;
+ lpFormat++;
+ }
+ buff[0] = '\0';
+
+ switch(fmtChar)
+ {
+ case 'd':
+ if (count >= 4)
+ szAdd = GetLongDay(node, (lpTime->wDayOfWeek + 6) % 7);
+ else if (count == 3)
+ szAdd = GetShortDay(node, (lpTime->wDayOfWeek + 6) % 7);
+ else
+ {
+ dwVal = lpTime->wDay;
+ szAdd = buff;
+ }
+ break;
+
+ case 'M':
+ if (count >= 4)
+ szAdd = GetLongMonth(node, lpTime->wMonth - 1);
+ else if (count == 3)
+ szAdd = GetShortMonth(node, lpTime->wMonth - 1);
+ else
+ {
+ dwVal = lpTime->wMonth;
+ szAdd = buff;
+ }
+ break;
+
+ case 'y':
+ if (count >= 4)
+ {
+ count = 4;
+ dwVal = lpTime->wYear;
+ }
+ else
+ {
+ count = count > 2 ? 2 : count;
+ dwVal = lpTime->wYear % 100;
+ }
+ szAdd = buff;
+ break;
+
+ case 'g':
+ if (count == 2)
+ {
+ /* FIXME: Our GetCalendarInfo() does not yet support CAL_SERASTRING.
+ * When it is fixed, this string should be cached in 'node'.
+ */
+ FIXME("Should be using GetCalendarInfo(CAL_SERASTRING), defaulting to 'AD'\n");
+ buff[0] = 'A'; buff[1] = 'D'; buff[2] = '\0';
+ }
+ else
+ {
+ buff[0] = 'g'; buff[1] = '\0'; /* Add a literal 'g' */
+ }
+ szAdd = buff;
+ break;
+
+ case 'h':
+ if (!(dwFlags & TIME_FORCE24HOURFORMAT))
+ {
+ count = count > 2 ? 2 : count;
+ dwVal = lpTime->wHour == 0 ? 12 : (lpTime->wHour - 1) % 12 + 1;
+ szAdd = buff;
+ break;
+ }
+ /* .. fall through if we are forced to output in 24 hour format */
+
+ case 'H':
+ count = count > 2 ? 2 : count;
+ dwVal = lpTime->wHour;
+ szAdd = buff;
+ break;
+
+ case 'm':
+ if (dwFlags & TIME_NOMINUTESORSECONDS)
+ {
+ cchWritten = lastFormatPos; /* Skip */
+ bSkipping = TRUE;
+ }
+ else
+ {
+ count = count > 2 ? 2 : count;
+ dwVal = lpTime->wMinute;
+ szAdd = buff;
+ }
+ break;
+
+ case 's':
+ if (dwFlags & (TIME_NOSECONDS|TIME_NOMINUTESORSECONDS))
+ {
+ cchWritten = lastFormatPos; /* Skip */
+ bSkipping = TRUE;
+ }
+ else
+ {
+ count = count > 2 ? 2 : count;
+ dwVal = lpTime->wSecond;
+ szAdd = buff;
+ }
+ break;
+
+ case 't':
+ if (dwFlags & TIME_NOTIMEMARKER)
+ {
+ cchWritten = lastFormatPos; /* Skip */
+ bSkipping = TRUE;
+ }
+ else
+ {
+ if (count == 1)
+ szAdd = lpTime->wHour < 12 ? node->szShortAM : node->szShortPM;
+ else
+ szAdd = lpTime->wHour < 12 ? GetAM(node) : GetPM(node);
+ }
+ break;
+ }
+
+ if (szAdd == buff && buff[0] == '\0')
+ {
+ /* We have a numeric value to add */
+ sprintf(buffA, "%.*ld", count, dwVal);
+ MultiByteToWideChar(CP_ACP, 0, buffA, -1, buff, sizeof(buff)/sizeof(WCHAR));
+ }
+
+ dwLen = szAdd ? strlenW(szAdd) : 0;
+
+ if (cchOut && dwLen)
+ {
+ if (cchWritten + dwLen < cchOut)
+ memcpy(lpStr + cchWritten, szAdd, dwLen * sizeof(WCHAR));
+ else
+ {
+ memcpy(lpStr + cchWritten, szAdd, (cchOut - cchWritten) * sizeof(WCHAR));
+ goto NLS_GetDateTimeFormatW_Overrun;
+ }
+ }
+ cchWritten += dwLen;
+ lastFormatPos = cchWritten; /* Save position of last output format text */
+ }
+ else
+ {
+ /* Literal character */
+ if (!cchOut)
+ cchWritten++; /* Count size only */
+ else if (cchWritten >= cchOut)
+ goto NLS_GetDateTimeFormatW_Overrun;
+ else if (!bSkipping || *lpFormat == ' ')
+ {
+ lpStr[cchWritten] = *lpFormat;
+ cchWritten++;
+ }
+ lpFormat++;
+ }
+ }
+
+ /* Final string terminator and sanity check */
+ if (cchOut)
+ {
+ if (cchWritten >= cchOut)
+ goto NLS_GetDateTimeFormatW_Overrun;
+ else
+ lpStr[cchWritten] = '\0';
+ }
+ cchWritten++; /* Include terminating NUL */
+
+ TRACE("returning length=%d, ouput='%s'\n", cchWritten, debugstr_w(lpStr));
+ return cchWritten;
+
+NLS_GetDateTimeFormatW_Overrun:
+ TRACE("returning 0, (ERROR_INSUFFICIENT_BUFFER)\n");
+ SetLastError(ERROR_INSUFFICIENT_BUFFER);
+ return 0;
+}
+
+/******************************************************************************
+ * NLS_GetDateTimeFormatA <internal>
+ *
+ * ASCII wrapper for GetDateFormatA/GetTimeFormatA.
+ */
+static INT NLS_GetDateTimeFormatA(LCID lcid, DWORD dwFlags,
+ const SYSTEMTIME* lpTime,
+ LPCSTR lpFormat, LPSTR lpStr, INT cchOut)
+{
+ DWORD cp = CP_ACP;
+ WCHAR szFormat[128], szOut[128];
+ INT iRet;
+
+ TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpStr, cchOut);
+
+ if (NLS_IsUnicodeOnlyLcid(lcid))
+ {
+GetDateTimeFormatA_InvalidParameter:
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ if (!(dwFlags & LOCALE_USE_CP_ACP))
+ {
+ const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
+ if (!node)
+ goto GetDateTimeFormatA_InvalidParameter;
+ cp = node->dwCodePage;
+ }
+
+ if (lpFormat)
+ MultiByteToWideChar(cp, 0, lpFormat, -1, szFormat, sizeof(szFormat)/sizeof(WCHAR));
+
+ if (cchOut > (int)(sizeof(szOut)/sizeof(WCHAR)))
+ cchOut = sizeof(szOut)/sizeof(WCHAR);
+
+ szOut[0] = '\0';
+
+ iRet = NLS_GetDateTimeFormatW(lcid, dwFlags, lpTime, lpFormat ? szFormat : NULL,
+ lpStr ? szOut : NULL, cchOut);
+
+ if (lpStr)
+ {
+ if (szOut[0])
+ WideCharToMultiByte(cp, 0, szOut, -1, lpStr, cchOut, 0, 0);
+ else if (cchOut && iRet)
+ *lpStr = '\0';
+ }
+ return iRet;
+}
+
+/******************************************************************************
+ * GetDateFormatA [KERNEL32.@]
+ *
+ * Format a date for a given locale.
+ *
+ * PARAMS
+ * lcid [I] Locale to format for
+ * dwFlags [I] LOCALE_ and DATE_ flags from "winnls.h"
+ * lpTime [I] Date to format
+ * lpFormat [I] Format string, or NULL to use the system defaults
+ * lpDateStr [O] Destination for formatted string
+ * cchOut [I] Size of lpDateStr, or 0 to calculate the resulting size
+ *
+ * NOTES
+ * - If lpFormat is NULL, lpDateStr will be formatted according to the format
+ * details returned by GetLocaleInfoA() and modified by dwFlags.
+ * - lpFormat is a string of characters and formatting tokens. Any characters
+ * in the string are copied verbatim to lpDateStr, with tokens being replaced
+ * by the date values they represent.
+ * - The following tokens have special meanings in a date format string:
+ *| Token Meaning
+ *| ----- -------
+ *| d Single digit day of the month (no leading 0)
+ *| dd Double digit day of the month
+ *| ddd Short name for the day of the week
+ *| dddd Long name for the day of the week
+ *| M Single digit month of the year (no leading 0)
+ *| MM Double digit month of the year
+ *| MMM Short name for the month of the year
+ *| MMMM Long name for the month of the year
+ *| y Double digit year number (no leading 0)
+ *| yy Double digit year number
+ *| yyyy Four digit year number
+ *| gg Era string, for example 'AD'.
+ * - To output any literal character that could be misidentified as a token,
+ * enclose it in single quotes.
+ * - The Ascii version of this function fails if lcid is Unicode only.
+ *
+ * RETURNS
+ * Success: The number of character written to lpDateStr, or that would
+ * have been written, if cchOut is 0.
+ * Failure: 0. Use GetLastError() to determine the cause.
+ */
+INT WINAPI GetDateFormatA( LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
+ LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
+{
+ TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpDateStr, cchOut);
+
+ return NLS_GetDateTimeFormatA(lcid, dwFlags | DATE_DATEVARSONLY, lpTime,
+ lpFormat, lpDateStr, cchOut);
+}
+
+
+/******************************************************************************
+ * GetDateFormatW [KERNEL32.@]
+ *
+ * See GetDateFormatA.
+ */
+INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
+ LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
+{
+ TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime,
+ debugstr_w(lpFormat), lpDateStr, cchOut);
+
+ return NLS_GetDateTimeFormatW(lcid, dwFlags|DATE_DATEVARSONLY, lpTime,
+ lpFormat, lpDateStr, cchOut);
+}
+
+/******************************************************************************
+ * GetTimeFormatA [KERNEL32.@]
+ *
+ * Format a time for a given locale.
+ *
+ * PARAMS
+ * lcid [I] Locale to format for
+ * dwFlags [I] LOCALE_ and TIME_ flags from "winnls.h"
+ * lpTime [I] Time to format
+ * lpFormat [I] Formatting overrides
+ * lpTimeStr [O] Destination for formatted string
+ * cchOut [I] Size of lpTimeStr, or 0 to calculate the resulting size
+ *
+ * NOTES
+ * - If lpFormat is NULL, lpszValue will be formatted according to the format
+ * details returned by GetLocaleInfoA() and modified by dwFlags.
+ * - lpFormat is a string of characters and formatting tokens. Any characters
+ * in the string are copied verbatim to lpTimeStr, with tokens being replaced
+ * by the time values they represent.
+ * - The following tokens have special meanings in a time format string:
+ *| Token Meaning
+ *| ----- -------
+ *| h Hours with no leading zero (12-hour clock)
+ *| hh Hours with full two digits (12-hour clock)
+ *| H Hours with no leading zero (24-hour clock)
+ *| HH Hours with full two digits (24-hour clock)
+ *| m Minutes with no leading zero
+ *| mm Minutes with full two digits
+ *| s Seconds with no leading zero
+ *| ss Seconds with full two digits
+ *| t Short time marker (e.g. "A" or "P")
+ *| tt Long time marker (e.g. "AM", "PM")
+ * - To output any literal character that could be misidentified as a token,
+ * enclose it in single quotes.
+ * - The Ascii version of this function fails if lcid is Unicode only.
+ *
+ * RETURNS
+ * Success: The number of character written to lpTimeStr, or that would
+ * have been written, if cchOut is 0.
+ * Failure: 0. Use GetLastError() to determine the cause.
+ */
+INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
+ LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut)
+{
+ TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_a(lpFormat), lpTimeStr, cchOut);
+
+ return NLS_GetDateTimeFormatA(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime,
+ lpFormat, lpTimeStr, cchOut);
+}
+
+/******************************************************************************
+ * GetTimeFormatW [KERNEL32.@]
+ *
+ * See GetTimeFormatA.
+ */
+INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime,
+ LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
+{
+ TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime,
+ debugstr_w(lpFormat), lpTimeStr, cchOut);
+
+ return NLS_GetDateTimeFormatW(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime,
+ lpFormat, lpTimeStr, cchOut);
+}
+
+/**************************************************************************
+ * GetNumberFormatA (KERNEL32.@)
+ *
+ * Format a number string for a given locale.
+ *
+ * PARAMS
+ * lcid [I] Locale to format for
+ * dwFlags [I] LOCALE_ flags from "winnls.h"
+ * lpszValue [I] String to format
+ * lpFormat [I] Formatting overrides
+ * lpNumberStr [O] Destination for formatted string
+ * cchOut [I] Size of lpNumberStr, or 0 to calculate the resulting size
+ *
+ * NOTES
+ * - lpszValue can contain only '0' - '9', '-' and '.'.
+ * - If lpFormat is non-NULL, dwFlags must be 0. In this case lpszValue will
+ * be formatted according to the format details returned by GetLocaleInfoA().
+ * - This function rounds the number string if the number of decimals exceeds the
+ * locales normal number of decimal places.
+ * - If cchOut is 0, this function does not write to lpNumberStr.
+ * - The Ascii version of this function fails if lcid is Unicode only.
+ *
+ * RETURNS
+ * Success: The number of character written to lpNumberStr, or that would
+ * have been written, if cchOut is 0.
+ * Failure: 0. Use GetLastError() to determine the cause.
+ */
+INT WINAPI GetNumberFormatA(LCID lcid, DWORD dwFlags,
+ LPCSTR lpszValue, const NUMBERFMTA *lpFormat,
+ LPSTR lpNumberStr, int cchOut)
+{
+ DWORD cp = CP_ACP;
+ WCHAR szDec[8], szGrp[8], szIn[128], szOut[128];
+ NUMBERFMTW fmt;
+ const NUMBERFMTW *pfmt = NULL;
+ INT iRet;
+
+ TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue),
+ lpFormat, lpNumberStr, cchOut);
+
+ if (NLS_IsUnicodeOnlyLcid(lcid))
+ {
+GetNumberFormatA_InvalidParameter:
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ if (!(dwFlags & LOCALE_USE_CP_ACP))
+ {
+ const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
+ if (!node)
+ goto GetNumberFormatA_InvalidParameter;
+ cp = node->dwCodePage;
+ }
+
+ if (lpFormat)
+ {
+ memcpy(&fmt, lpFormat, sizeof(fmt));
+ pfmt = &fmt;
+ if (lpFormat->lpDecimalSep)
+ {
+ MultiByteToWideChar(cp, 0, lpFormat->lpDecimalSep, -1, szDec, sizeof(szDec)/sizeof(WCHAR));
+ fmt.lpDecimalSep = szDec;
+ }
+ if (lpFormat->lpThousandSep)
+ {
+ MultiByteToWideChar(cp, 0, lpFormat->lpThousandSep, -1, szGrp, sizeof(szGrp)/sizeof(WCHAR));
+ fmt.lpThousandSep = szGrp;
+ }
+ }
+
+ if (lpszValue)
+ MultiByteToWideChar(cp, 0, lpszValue, -1, szIn, sizeof(szIn)/sizeof(WCHAR));
+
+ if (cchOut > (int)(sizeof(szOut)/sizeof(WCHAR)))
+ cchOut = sizeof(szOut)/sizeof(WCHAR);
+
+ szOut[0] = '\0';
+
+ iRet = GetNumberFormatW(lcid, dwFlags, lpszValue ? szIn : NULL, pfmt,
+ lpNumberStr ? szOut : NULL, cchOut);
+
+ if (szOut[0] && lpNumberStr)
+ WideCharToMultiByte(cp, 0, szOut, -1, lpNumberStr, cchOut, 0, 0);
+ return iRet;
+}
+
+/* Number parsing state flags */
+#define NF_ISNEGATIVE 0x1 /* '-' found */
+#define NF_ISREAL 0x2 /* '.' found */
+#define NF_DIGITS 0x4 /* '0'-'9' found */
+#define NF_DIGITS_OUT 0x8 /* Digits before the '.' found */
+#define NF_ROUND 0x10 /* Number needs to be rounded */
+
+/* Formatting options for Numbers */
+#define NLS_NEG_PARENS 0 /* "(1.1)" */
+#define NLS_NEG_LEFT 1 /* "-1.1" */
+#define NLS_NEG_LEFT_SPACE 2 /* "- 1.1" */
+#define NLS_NEG_RIGHT 3 /* "1.1-" */
+#define NLS_NEG_RIGHT_SPACE 4 /* "1.1 -" */
+
+/**************************************************************************
+ * GetNumberFormatW (KERNEL32.@)
+ *
+ * See GetNumberFormatA.
+ */
+INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
+ LPCWSTR lpszValue, const NUMBERFMTW *lpFormat,
+ LPWSTR lpNumberStr, int cchOut)
+{
+ WCHAR szBuff[128], *szOut = szBuff + sizeof(szBuff) / sizeof(WCHAR) - 1;
+ WCHAR szNegBuff[8];
+ const WCHAR *lpszNeg = NULL, *lpszNegStart, *szSrc;
+ DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0;
+ INT iRet;
+
+ TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue),
+ lpFormat, lpNumberStr, cchOut);
+
+ if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpNumberStr) ||
+ !IsValidLocale(lcid, 0) ||
+ (lpFormat && (dwFlags || !lpFormat->lpDecimalSep || !lpFormat->lpThousandSep)))
+ {
+GetNumberFormatW_Error:
+ SetLastError(lpFormat && dwFlags ? ERROR_INVALID_FLAGS : ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
+ if (!lpFormat)
+ {
+ const NLS_FORMAT_NODE *node = NLS_GetFormats(lcid, dwFlags);
+
+ if (!node)
+ goto GetNumberFormatW_Error;
+ lpFormat = &node->fmt;
+ lpszNegStart = lpszNeg = GetNegative(node);
+ }
+ else
+ {
+ GetLocaleInfoW(lcid, LOCALE_SNEGATIVESIGN|(dwFlags & LOCALE_NOUSEROVERRIDE),
+ szNegBuff, sizeof(szNegBuff)/sizeof(WCHAR));
+ lpszNegStart = lpszNeg = szNegBuff;
+ }
+ lpszNeg = lpszNeg + strlenW(lpszNeg) - 1;
[truncated at 1000 lines; 951 more skipped]
reactos/lib/kernel32/misc
diff -u -r1.34 -r1.34.8.1
--- dllmain.c 22 Feb 2004 17:30:32 -0000 1.34
+++ dllmain.c 30 Jun 2004 21:16:04 -0000 1.34.8.1
@@ -1,4 +1,4 @@
-/* $Id: dllmain.c,v 1.34 2004/02/22 17:30:32 chorns Exp $
+/* $Id: dllmain.c,v 1.34.8.1 2004/06/30 21:16:04 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -23,6 +23,7 @@
extern UNICODE_STRING WindowsDirectory;
HANDLE hProcessHeap = NULL;
+HMODULE hCurrentModule = NULL;
HANDLE hBaseDir = NULL;
static BOOL DllInitialized = FALSE;
@@ -117,6 +118,7 @@
}
hProcessHeap = RtlGetProcessHeap();
+ hCurrentModule = hDll;
/*
* Initialize WindowsDirectory and SystemDirectory
reactos/lib/kernel32/misc
diff -u -r1.19 -r1.19.4.1
--- lang.c 13 Jun 2004 20:04:56 -0000 1.19
+++ lang.c 30 Jun 2004 21:16:04 -0000 1.19.4.1
@@ -1,4 +1,4 @@
-/* $Id: lang.c,v 1.19 2004/06/13 20:04:56 navaraf Exp $
+/* $Id: lang.c,v 1.19.4.1 2004/06/30 21:16:04 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT : ReactOS user mode libraries
@@ -21,68 +21,56 @@
#define LOCALE_USE_CP_ACP 0x40000000
#define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|LOCALE_RETURN_NUMBER)
-static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT);
+//static LCID SystemLocale = MAKELCID(LANG_ENGLISH, SORT_DEFAULT);
//#define _OLE2NLS_IN_BUILD_
-/*
+
+/******************************************************************************
* @implemented
+ * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.42
+ *
+ * ConvertDefaultLocale (KERNEL32.@)
+ *
+ * Convert a default locale identifier into a real identifier.
+ *
+ * PARAMS
+ * lcid [I] LCID identifier of the locale to convert
+ *
+ * RETURNS
+ * lcid unchanged, if not a default locale or its sublanguage is
+ * not SUBLANG_NEUTRAL.
+ * GetSystemDefaultLCID(), if lcid == LOCALE_SYSTEM_DEFAULT.
+ * GetUserDefaultLCID(), if lcid == LOCALE_USER_DEFAULT or LOCALE_NEUTRAL.
+ * Otherwise, lcid with sublanguage changed to SUBLANG_DEFAULT.
*/
-LCID
-STDCALL
-ConvertDefaultLocale (
- LCID Locale
- )
+LCID WINAPI ConvertDefaultLocale( LCID lcid )
{
- switch(Locale)
- {
+ LANGID langid;
+
+ switch (lcid)
+ {
case LOCALE_SYSTEM_DEFAULT:
- return GetSystemDefaultLCID();
-
+ lcid = GetSystemDefaultLCID();
+ break;
case LOCALE_USER_DEFAULT:
- return GetUserDefaultLCID();
-
- /*case LOCALE_NEUTRAL:
- return MAKELCID(LANG_NEUTRAL, SUBLANG_NEUTRAL);*/
- }
-
- /* ported from wine, is that right? */
- return MAKELANGID(PRIMARYLANGID(Locale), SUBLANG_NEUTRAL);
+ case LOCALE_NEUTRAL:
+ lcid = GetUserDefaultLCID();
+ break;
+ default:
+ /* Replace SUBLANG_NEUTRAL with SUBLANG_DEFAULT */
+ langid = LANGIDFROMLCID(lcid);
+ if (SUBLANGID(langid) == SUBLANG_NEUTRAL)
+ {
+ langid = MAKELANGID(PRIMARYLANGID(langid), SUBLANG_DEFAULT);
+ lcid = MAKELCID(langid, SORTIDFROMLCID(lcid));
+ }
+ }
+ return lcid;
}
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumCalendarInfoW (
- CALINFO_ENUMPROCW lpCalInfoEnumProc,
- LCID Locale,
- CALID Calendar,
- CALTYPE CalType
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumCalendarInfoA (
- CALINFO_ENUMPROCA lpCalInfoEnumProc,
- LCID Locale,
- CALID Calendar,
- CALTYPE CalType
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
/*
@@ -117,36 +105,6 @@
}
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumDateFormatsW (
- DATEFMT_ENUMPROCW lpDateFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumDateFormatsA (
- DATEFMT_ENUMPROCA lpDateFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
/*
@@ -327,36 +285,6 @@
#endif
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumTimeFormatsW (
- TIMEFMT_ENUMPROCW lpTimeFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
-
-
-/*
- * @unimplemented
- */
-BOOL
-STDCALL
-EnumTimeFormatsA (
- TIMEFMT_ENUMPROCA lpTimeFmtEnumProc,
- LCID Locale,
- DWORD dwFlags
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
-}
/*
@@ -509,86 +437,6 @@
*/
int
STDCALL
-GetCurrencyFormatW (
- LCID Locale,
- DWORD dwFlags,
- LPCWSTR lpValue,
- CONST CURRENCYFMTW * lpFormat,
- LPWSTR lpCurrencyStr,
- int cchCurrency
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetCurrencyFormatA (
- LCID Locale,
- DWORD dwFlags,
- LPCSTR lpValue,
- CONST CURRENCYFMTA * lpFormat,
- LPSTR lpCurrencyStr,
- int cchCurrency
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-#ifndef _OLE2NLS_IN_BUILD_
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetDateFormatW (
- LCID Locale,
- DWORD dwFlags,
- CONST SYSTEMTIME * lpDate,
- LPCWSTR lpFormat,
- LPWSTR lpDateStr,
- int cchDate
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetDateFormatA (
- LCID Locale,
- DWORD dwFlags,
- CONST SYSTEMTIME * lpDate,
- LPCSTR lpFormat,
- LPSTR lpDateStr,
- int cchDate
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-#endif
-
-
-/*
- * @unimplemented
- */
-int
-STDCALL
GetGeoInfoW(
GEOID Location,
GEOTYPE GeoType,
@@ -931,43 +779,8 @@
}
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetNumberFormatW (
- LCID Locale,
- DWORD dwFlags,
- LPCWSTR lpValue,
- CONST NUMBERFMTW * lpFormat,
- LPWSTR lpNumberStr,
- int cchNumber
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-/*
- * @unimplemented
- */
-int
-STDCALL
-GetNumberFormatA (
- LCID Locale,
- DWORD dwFlags,
- LPCSTR lpValue,
- CONST NUMBERFMTA * lpFormat,
- LPSTR lpNumberStr,
- int cchNumber
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
/*
* @unimplemented
@@ -984,18 +797,13 @@
#ifndef _OLE2NLS_IN_BUILD_
/*
- * @unimplemented
+ * @implemented
*/
LANGID
STDCALL
GetSystemDefaultLangID (VOID)
{
- /* FIXME: ??? */
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return MAKELANGID(
- LANG_ENGLISH,
- SUBLANG_ENGLISH_US
- );
+ return LANGIDFROMLCID(GetSystemDefaultLCID());
}
@@ -1006,7 +814,11 @@
STDCALL
GetSystemDefaultLCID (VOID)
{
- return SystemLocale;
+ LCID lcid;
+ NtQueryDefaultLocale( FALSE, &lcid );
+ return lcid;
+
+// return SystemLocale;
}
#endif
@@ -1038,269 +850,7 @@
#endif
-INT RosGetTimeFormat(LCID Locale, DWORD dwFlags, CONST SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, int cchTime)
-{
- INT nPos = 0, nLastFormatPos = 0;
- BOOL bDrop = FALSE;
-
- while( *lpFormat )
- {
- if (*lpFormat == L'\'')
- {
- lpFormat++;
-
- while(*lpFormat)
- {
- if (*lpFormat == L'\'')
- {
- lpFormat++;
- if(*lpFormat != L'\'')
- break;
- }
- if (!cchTime)
- nPos++;
- else if(nPos > cchTime)
- {
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- else
- {
- if(!bDrop)
- {
- lpTimeStr[nPos] = *lpFormat;
- nPos++;
- }
- }
- *lpFormat++;
- }
- }
- else if(*lpFormat==L'H' || *lpFormat==L'h' || *lpFormat==L'm' || *lpFormat==L's' || *lpFormat==L't' )
- {
- int nCount, nBufLen;
- WCHAR nType = *lpFormat;
- WCHAR Buffer[40];
-
- bDrop = FALSE;
-
- Buffer[0] = 0;
-
- for(nCount = 1; *lpFormat == nType; lpFormat++)
- nCount++;
-
- switch(nType)
- {
- case L'h':
- {
- if(!(dwFlags & TIME_FORCE24HOURFORMAT))
- {
- swprintf( Buffer, L"%.*d", nCount > 2 ? 2 : nCount,
- lpTime->wHour == 0 ? 12 : (lpTime->wHour - 1) % 12 + 1);
- break;
- }
- }
- case L'H':
- {
- swprintf( Buffer, L"%.*d", nCount > 2 ? 2 : nCount, lpTime->wHour );
- break;
- }
- case L'm':
- {
- if(!(dwFlags & TIME_NOMINUTESORSECONDS))
- {
- swprintf( Buffer, L"%.*d", nCount > 2 ? 2 : nCount, lpTime->wMinute );
- }
- else
- nPos = nLastFormatPos;
-
- break;
- }
- case L's':
- {
- if(!(dwFlags & (TIME_NOSECONDS|TIME_NOMINUTESORSECONDS)))
- {
- swprintf( Buffer, L"%.*d", nCount > 2 ? 2 : nCount, lpTime->wSecond );
- }
- else
- nPos = nLastFormatPos;
-
- break;
- }
- case L't':
- {
- if(!(dwFlags & TIME_NOTIMEMARKER))
- {
- GetLocaleInfoW(Locale, (lpTime->wHour < 12) ? LOCALE_S1159 : LOCALE_S2359, Buffer, sizeof(Buffer) );
- if(nCount == 1)
- Buffer[1] = 0;
- }
- else
- {
- nPos = nLastFormatPos;
- bDrop = TRUE;
- }
- break;
- }
- }
- nBufLen = wcslen(Buffer);
-
- if(!cchTime)
- {
- /* wine does nothing here?!? */
- }
- else if(nPos + nBufLen < cchTime)
- wcscpy( lpTimeStr + nPos, Buffer );
- else
- {
- lstrcpynW( lpTimeStr + nPos, Buffer, cchTime - nPos );
-
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- nPos += nBufLen;
- nLastFormatPos = nPos;
- }
- else
- {
- if(!cchTime)
- nPos++;
- else if(nPos > cchTime)
- {
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- else
- {
- if(!bDrop)
- {
- lpTimeStr[nPos] = *lpFormat;
- nPos++;
- }
- }
- lpFormat++;
- }
- }
-
- /* Are we not only counting? */
- if (cchTime)
- {
- if (nPos >= cchTime)
- {
- SetLastError(ERROR_INSUFFICIENT_BUFFER);
- return 0;
- }
- else
- lpTimeStr[nPos] = L'\0';
- }
-
- nPos++;
- return nPos;
-}
-
-/*
- * @implemented
- */
-INT
-STDCALL
-GetTimeFormatW (
- LCID Locale,
- DWORD dwFlags,
- CONST SYSTEMTIME* lpTime,
- LPCWSTR lpFormat,
- LPWSTR lpTimeStr,
- int cchTime
- )
-{
- WCHAR Buffer[40];
- SYSTEMTIME t;
-
- if (!Locale)
- Locale = LOCALE_SYSTEM_DEFAULT;
-
- Locale = ConvertDefaultLocale( Locale );
-
- if (lpFormat == NULL)
- {
- if (dwFlags & LOCALE_NOUSEROVERRIDE)
- Locale = GetSystemDefaultLCID();
-
- if (!GetLocaleInfoW(Locale, LOCALE_STIMEFORMAT, Buffer, 40))
- return 0;
- lpFormat = Buffer;
- }
- if (dwFlags & LOCALE_NOUSEROVERRIDE)
- {
- SetLastError(ERROR_INVALID_FLAGS);
- return 0;
- }
- if (lpTime == NULL)
- {
- GetLocalTime(&t);
- lpTime = &t;
- }
- if((lpTime->wHour > 24) || (lpTime->wMinute >= 60) || (lpTime->wSecond >= 60))
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
- return RosGetTimeFormat(Locale, dwFlags, lpTime, lpFormat, lpTimeStr, cchTime);
-}
-
-
-/*
- * @implemented
- */
-int
-STDCALL
-GetTimeFormatA (
- LCID Locale,
- DWORD dwFlags,
- CONST SYSTEMTIME* lpTime,
- LPCSTR lpFormat,
- LPSTR lpTimeStr,
- int cchTime
- )
-{
- LPWSTR lpFormatU = NULL;
- LPWSTR lpTimeStrU;
- int numCharsU;
- int retVal = 0;
-
- if (lpFormat != NULL) {
- /* First just determine the number of necessary bytes
- for the unicode string */
- int numBytes = MultiByteToWideChar(CP_ACP, 0, lpFormat, -1, NULL, 0);
-
- if (numBytes > 0) {
- lpFormatU = HeapAlloc(GetProcessHeap(), 0, numBytes);
-
- if (lpFormatU != NULL)
- MultiByteToWideChar(CP_ACP, 0, lpFormat, -1, lpFormatU, numBytes);
- }
- }
-
- /* Just get the number of characters needed to store the
- Unicode output */
- numCharsU = GetTimeFormatW(Locale, dwFlags, lpTime, lpFormatU, NULL, 0);
-
- if (numCharsU != 0) {
- lpTimeStrU = HeapAlloc(GetProcessHeap(), 0, numCharsU*sizeof(WCHAR));
-
- if (lpTimeStrU != NULL) {
- if (GetTimeFormatW(Locale, dwFlags, lpTime, lpFormatU, lpTimeStrU, numCharsU))
- /* Convert the output string to ANSI */
- retVal = WideCharToMultiByte(CP_ACP, 0, lpTimeStrU, numCharsU, lpTimeStr, cchTime, NULL, NULL);
-
- HeapFree(GetProcessHeap(), 0, lpTimeStrU);
- }
- }
-
- if (lpFormatU != NULL)
- HeapFree(GetProcessHeap(), 0, lpFormatU);
-
- return retVal;
-}
@@ -1385,21 +935,40 @@
}
-/*
- * @unimplemented
+
+/******************************************************************************
+ * @implemented
+ * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.44
+ *
+ * IsValidLocale (KERNEL32.@)
+ *
+ * Determine if a locale is valid.
+ *
+ * PARAMS
+ * lcid [I] LCID of the locale to check
+ * flags [I] LCID_SUPPORTED = Valid, LCID_INSTALLED = Valid and installed on the system
+ *
+ * RETURN
+ * TRUE, if lcid is valid,
+ * FALSE, otherwise.
+ *
+ * NOTES
+ * Wine does not currently make the distinction between supported and installed. All
+ * languages supported are installed by default.
*/
-BOOL
-STDCALL
-IsValidLocale (
- LCID Locale,
- DWORD dwFlags
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+BOOL STDCALL
+IsValidLocale(
+ LCID lcid,
+ DWORD flags
+ )
+{
+ /* check if language is registered in the kernel32 resources */
+ return FindResourceExW( hCurrentModule, (LPWSTR)RT_STRING,
+ (LPCWSTR)LOCALE_ILANGUAGE, LANGIDFROMLCID(lcid)) != 0;
}
+
#ifndef _OLE2NLS_IN_BUILD_
/*
@@ -1507,19 +1076,48 @@
}
-/*
+/**********************************************************************
* @implemented
+ * RIPPED FROM WINE's dlls\kernel\locale.c rev 1.42
+ *
+ * SetThreadLocale (KERNEL32.@)
+ *
+ * Set the current threads locale.
+ *
+ * PARAMS
+ * lcid [I] LCID of the locale to set
+ *
+ * RETURNS
+ * Success: TRUE. The threads locale is set to lcid.
+ * Failure: FALSE. Use GetLastError() to determine the cause.
+ *
*/
-BOOL
-STDCALL
-SetThreadLocale (
- LCID Locale
- )
+BOOL WINAPI SetThreadLocale( LCID lcid )
{
- /* FIXME - Check if locale is valid */
-
- NtCurrentTeb()->CurrentLocale = Locale;
- return TRUE;
+ DPRINT("SetThreadLocale(0x%04lX)\n", lcid);
+
+ lcid = ConvertDefaultLocale(lcid);
+
+ if (lcid != GetThreadLocale())
+ {
+ if (!IsValidLocale(lcid, LCID_SUPPORTED))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ NtCurrentTeb()->CurrentLocale = lcid;
+ /* FIXME: NtCurrentTeb()->code_page = get_lcid_codepage( lcid );
+ * Wine save the acp for easy/fast access, but ROS has no such Teb member.
+ * Maybe add this member to ros as well?
+ */
+
+ /*
+ Lag test app for � se om locale etc, endres i en app. etter at prosessen er
+ startet, eller om bare nye prosesser blir ber�rt.
+ */
+ }
+ return TRUE;
}
#endif
reactos/lib/kernel32/misc
diff -u -r1.78.2.1 -r1.78.2.2
--- stubs.c 27 Jun 2004 01:13:12 -0000 1.78.2.1
+++ stubs.c 30 Jun 2004 21:16:06 -0000 1.78.2.2
@@ -1,4 +1,4 @@
-/* $Id: stubs.c,v 1.78.2.1 2004/06/27 01:13:12 hyperion Exp $
+/* $Id: stubs.c,v 1.78.2.2 2004/06/30 21:16:06 hyperion Exp $
*
* KERNEL32.DLL stubs (unimplemented functions)
* Remove from this file, if you implement them.
reactos/lib/ntdll/def
diff -u -r1.121 -r1.121.4.1
--- ntdll.def 13 Jun 2004 10:35:52 -0000 1.121
+++ ntdll.def 30 Jun 2004 21:16:06 -0000 1.121.4.1
@@ -1,4 +1,4 @@
-; $Id: ntdll.def,v 1.121 2004/06/13 10:35:52 navaraf Exp $
+; $Id: ntdll.def,v 1.121.4.1 2004/06/30 21:16:06 hyperion Exp $
;
; ReactOS Operating System
;
@@ -51,7 +51,7 @@
LdrGetProcedureAddress@16
LdrInitializeThunk@16
LdrLoadDll@16
-;LdrProcessRelocationBlock@16
+LdrProcessRelocationBlock@16
LdrQueryImageFileExecutionOptions@24
LdrQueryProcessModuleInformation@12
LdrShutdownProcess@0
reactos/lib/ntdll/def
diff -u -r1.111 -r1.111.4.1
--- ntdll.edf 13 Jun 2004 10:35:52 -0000 1.111
+++ ntdll.edf 30 Jun 2004 21:16:06 -0000 1.111.4.1
@@ -1,4 +1,4 @@
-; $Id: ntdll.edf,v 1.111 2004/06/13 10:35:52 navaraf Exp $
+; $Id: ntdll.edf,v 1.111.4.1 2004/06/30 21:16:06 hyperion Exp $
;
; ReactOS Operating System
;
@@ -51,7 +51,7 @@
LdrGetProcedureAddress=LdrGetProcedureAddress@16
LdrInitializeThunk=LdrInitializeThunk@16
LdrLoadDll=LdrLoadDll@16
-;LdrProcessRelocationBlock
+LdrProcessRelocationBlock=LdrProcessRelocationBlock@16
LdrQueryImageFileExecutionOptions=LdrQueryImageFileExecutionOptions@24
LdrQueryProcessModuleInformation=LdrQueryProcessModuleInformation@12
LdrShutdownProcess=LdrShutdownProcess@0
reactos/lib/ntdll/ldr
diff -u -r1.90.2.1 -r1.90.2.2
--- utils.c 27 Jun 2004 01:13:12 -0000 1.90.2.1
+++ utils.c 30 Jun 2004 21:16:06 -0000 1.90.2.2
@@ -1,4 +1,4 @@
-/* $Id: utils.c,v 1.90.2.1 2004/06/27 01:13:12 hyperion Exp $
+/* $Id: utils.c,v 1.90.2.2 2004/06/30 21:16:06 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -1226,10 +1226,10 @@
{
PIMAGE_DATA_DIRECTORY RelocationDDir;
PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
- ULONG Count, ProtectSize, OldProtect, OldProtect2, i;
+ ULONG Count, ProtectSize, OldProtect, OldProtect2;
PVOID Page, ProtectPage, ProtectPage2;
- PWORD TypeOffset;
- ULONG Delta = (ULONG_PTR)ImageBase - NTHeaders->OptionalHeader.ImageBase;
+ PUSHORT TypeOffset;
+ ULONG_PTR Delta;
NTSTATUS Status;
if (NTHeaders->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED)
@@ -1244,19 +1244,21 @@
{
return STATUS_SUCCESS;
}
-
+
ProtectSize = PAGE_SIZE;
- RelocationDir = (IMAGE_BASE_RELOCATION*)((ULONG_PTR)ImageBase +
+ Delta = (ULONG_PTR)ImageBase - NTHeaders->OptionalHeader.ImageBase;
+ RelocationDir = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)ImageBase +
RelocationDDir->VirtualAddress);
- RelocationEnd = (IMAGE_BASE_RELOCATION*)((ULONG_PTR)ImageBase +
+ RelocationEnd = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)ImageBase +
RelocationDDir->VirtualAddress + RelocationDDir->Size);
+
while (RelocationDir < RelocationEnd &&
RelocationDir->SizeOfBlock > 0)
{
Count = (RelocationDir->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) /
- sizeof(WORD);
+ sizeof(USHORT);
Page = ImageBase + RelocationDir->VirtualAddress;
- TypeOffset = (PWORD)(RelocationDir + 1);
+ TypeOffset = (PUSHORT)(RelocationDir + 1);
/* Unprotect the page(s) we're about to relocate. */
ProtectPage = Page;
@@ -1268,7 +1270,7 @@
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to unprotect relocation target.\n");
- return(Status);
+ return Status;
}
if (RelocationDir->VirtualAddress + PAGE_SIZE <
@@ -1288,36 +1290,21 @@
&ProtectSize,
OldProtect,
&OldProtect);
- return(Status);
+ return Status;
}
}
-
- /* Patch the page. */
- for (i = 0; i < Count; i++)
+ else
{
- SHORT Offset = TypeOffset[i] & 0xFFF;
- USHORT Type = TypeOffset[i] >> 12;
-
- switch (Type)
- {
- case IMAGE_REL_BASED_ABSOLUTE:
- break;
- case IMAGE_REL_BASED_HIGH:
- *(PUSHORT)(Page + Offset) += HIWORD(Delta);
- break;
- case IMAGE_REL_BASED_LOW:
- *(PUSHORT)(Page + Offset) += LOWORD(Delta);
- break;
- case IMAGE_REL_BASED_HIGHLOW:
- *(PULONG)(Page + Offset) += Delta;
- break;
- case IMAGE_REL_BASED_HIGHADJ:
- default:
- DPRINT("Unknown/unsupported fixup type %d.\n", type);
- return STATUS_UNSUCCESSFUL;
- }
+ ProtectPage2 = NULL;
}
+ RelocationDir = LdrProcessRelocationBlock(Page,
+ Count,
+ TypeOffset,
+ Delta);
+ if (RelocationDir == NULL)
+ return STATUS_UNSUCCESSFUL;
+
/* Restore old page protection. */
NtProtectVirtualMemory(NtCurrentProcess(),
&ProtectPage,
@@ -1325,8 +1312,7 @@
OldProtect,
&OldProtect);
- if (RelocationDir->VirtualAddress + PAGE_SIZE <
- NTHeaders->OptionalHeader.SizeOfImage)
+ if (ProtectPage2 != NULL)
{
NtProtectVirtualMemory(NtCurrentProcess(),
&ProtectPage2,
@@ -3030,4 +3016,55 @@
return Status;
}
+
+PIMAGE_BASE_RELOCATION STDCALL
+LdrProcessRelocationBlock(IN PVOID Address,
+ IN USHORT Count,
+ IN PUSHORT TypeOffset,
+ IN ULONG_PTR Delta)
+{
+ SHORT Offset;
+ USHORT Type;
+ USHORT i;
+ PUSHORT ShortPtr;
+ PULONG LongPtr;
+
+ for (i = 0; i < Count; i++)
+ {
+ Offset = *TypeOffset & 0xFFF;
+ Type = *TypeOffset >> 12;
+
+ switch (Type)
+ {
+ case IMAGE_REL_BASED_ABSOLUTE:
+ break;
+
+ case IMAGE_REL_BASED_HIGH:
+ ShortPtr = (PUSHORT)(Address + Offset);
+ *ShortPtr += HIWORD(Delta);
+ break;
+
+ case IMAGE_REL_BASED_LOW:
+ ShortPtr = (PUSHORT)(Address + Offset);
+ *ShortPtr += LOWORD(Delta);
+ break;
+
+ case IMAGE_REL_BASED_HIGHLOW:
+ LongPtr = (PULONG)(Address + Offset);
+ *LongPtr += Delta;
+ break;
+
+ case IMAGE_REL_BASED_HIGHADJ:
+ case IMAGE_REL_BASED_MIPS_JMPADDR:
+ default:
+ DPRINT1("Unknown/unsupported fixup type %hu.\n", Type);
+ return NULL;
+ }
+
+ TypeOffset++;
+ }
+
+ return (PIMAGE_BASE_RELOCATION)TypeOffset;
+}
+
/* EOF */
reactos/lib/shell32
diff -u -r1.3 -r1.3.10.1
--- classes.c 17 Jan 2004 16:08:38 -0000 1.3
+++ classes.c 30 Jun 2004 21:16:06 -0000 1.3.10.1
@@ -265,7 +265,7 @@
*
* Gets the name of a registred class
*/
-static WCHAR swEmpty[] = {0};
+static const WCHAR swEmpty[] = {0};
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
{
reactos/lib/shell32
diff -u -r1.6 -r1.6.10.1
--- dialogs.c 21 Jan 2004 18:38:53 -0000 1.6
+++ dialogs.c 30 Jun 2004 21:16:06 -0000 1.6.10.1
@@ -379,7 +379,7 @@
/*************************************************************************
- * RestartWindowsDialog [SHELL32.730]
+ * RestartDialogEx [SHELL32.730]
*/
int WINAPI RestartDialogEx(HWND hwndOwner, LPCWSTR lpwstrReason, UINT uFlags, UINT uReason)
@@ -410,27 +410,12 @@
/*************************************************************************
- * RestartWindowsDialog [SHELL32.59]
+ * RestartDialog [SHELL32.59]
*/
-int WINAPI RestartDialog(HWND hwndOwner, LPCSTR lpstrReason, UINT uFlags)
+int WINAPI RestartDialog(HWND hwndOwner, LPCWSTR lpstrReason, UINT uFlags)
{
- LPWSTR lpwcsReason;
- int len, ret;
-
- if (lpstrReason) {
- len = MultiByteToWideChar(CP_ACP, 0, lpstrReason, -1, NULL, 0);
- lpwcsReason = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, lpstrReason, -1, lpwcsReason, len);
- } else
- lpwcsReason = NULL;
-
- ret = RestartDialogEx(hwndOwner, lpwcsReason, uFlags, 0);
-
- if (lpwcsReason)
- HeapFree(GetProcessHeap(), 0, lpwcsReason);
-
- return ret;
+ return RestartDialogEx(hwndOwner, lpstrReason, uFlags, 0);
}
reactos/lib/shell32
diff -u -r1.20 -r1.20.6.1
--- pidl.c 9 Apr 2004 20:24:24 -0000 1.20
+++ pidl.c 30 Jun 2004 21:16:07 -0000 1.20.6.1
@@ -204,7 +204,7 @@
* NOTES
* when pidl=Desktop return=FALSE
*/
-BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl)
+BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
{
TRACE_(shell)("pidl=%p\n",pidl);
reactos/lib/shell32
diff -u -r1.5 -r1.5.8.1
--- shell.c 16 Feb 2004 21:46:12 -0000 1.5
+++ shell.c 30 Jun 2004 21:16:07 -0000 1.5.8.1
@@ -611,7 +611,7 @@
/*************************************************************************
* SHELL_Execute16 [Internal]
*/
-static UINT SHELL_Execute16(const WCHAR *lpCmd, void *env, BOOL shWait,
+static UINT SHELL_Execute16(const WCHAR *lpCmd, WCHAR *env, BOOL shWait,
LPSHELLEXECUTEINFOW psei, LPSHELLEXECUTEINFOW psei_out)
{
UINT ret;
reactos/lib/shell32
diff -u -r1.5 -r1.5.8.1
--- shell32_main.c 22 Mar 2004 21:40:12 -0000 1.5
+++ shell32_main.c 30 Jun 2004 21:16:07 -0000 1.5.8.1
@@ -706,7 +706,7 @@
* the shell process and release it immediately
*/
-DWORD WINAPI SHLoadInProc (REFCLSID rclsid)
+HRESULT WINAPI SHLoadInProc (REFCLSID rclsid)
{
void *ptr = NULL;
reactos/lib/shell32
diff -u -r1.17 -r1.17.6.1
--- shell32_main.h 9 Apr 2004 20:24:24 -0000 1.17
+++ shell32_main.h 30 Jun 2004 21:16:07 -0000 1.17.6.1
@@ -236,9 +236,6 @@
UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpOperation,
LPWSTR lpResult, int resultLen, LPWSTR key, void **env, LPITEMIDLIST pidl, LPCWSTR args);
-int WINAPI RestartDialog(HWND hwndOwner, LPCSTR lpstrReason, UINT uFlags);
-int WINAPI RestartDialogEx(HWND hwndOwner, LPCWSTR lpwstrReason, UINT uFlags, UINT uReason);
-
extern WCHAR swShell32Name[MAX_PATH];
#endif
reactos/lib/shell32
diff -u -r1.3 -r1.3.10.1
--- shellole.c 23 Jan 2004 21:44:15 -0000 1.3
+++ shellole.c 30 Jun 2004 21:16:07 -0000 1.3.10.1
@@ -495,7 +495,7 @@
/*************************************************************************
* SHGetDesktopFolder [SHELL32.@]
*/
-DWORD WINAPI SHGetDesktopFolder(IShellFolder **psf)
+HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
{
HRESULT hres = S_OK;
TRACE("\n");
reactos/lib/shell32
diff -u -r1.3 -r1.3.8.1
--- shellord.c 16 Feb 2004 21:46:12 -0000 1.3
+++ shellord.c 30 Jun 2004 21:16:07 -0000 1.3.8.1
@@ -612,9 +612,8 @@
* NOTES
* exported by name
*
- * FIXME: ?? MSDN shows this as a VOID
*/
-DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
+void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
{
/* If list is a string list lpfnCompare has the following prototype
* int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2)
@@ -653,20 +652,20 @@
ret=SHADD_get_policy( "NoRecentDocsHistory", &type, &data, &datalen);
if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) {
ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret);
- return 0;
+ return;
}
if (ret == ERROR_SUCCESS) {
if (!( (type == REG_DWORD) ||
((type == REG_BINARY) && (datalen == 4)) )) {
ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n",
type, datalen);
- return 0;
+ return;
}
TRACE("policy value for NoRecentDocsHistory = %08lx\n", data[0]);
/* now test the actual policy value */
if ( data[0] != 0)
- return 0;
+ return;
}
/* Open key to where the necessary info is
@@ -679,7 +678,7 @@
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer",
0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) {
ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n");
- return 0;
+ return;
}
/* Get path to user's "Recent" directory
@@ -729,7 +728,7 @@
*/
RegDeleteKeyA(HCUbasekey, "RecentDocs");
RegCloseKey(HCUbasekey);
- return 0;
+ return;
}
/* Have data to add, the jobs to be done:
@@ -785,7 +784,7 @@
/* MRU failed */
ERR("MRU processing failed, handle zero\n");
RegCloseKey(HCUbasekey);
- return 0;
+ return;
}
len = lstrlenA(doc_name);
pos = FindMRUData(mruhandle, doc_name, len, 0);
@@ -934,7 +933,7 @@
/* all done */
RegCloseKey(HCUbasekey);
- return 0;
+ return;
}
/*************************************************************************
reactos/lib/shell32
diff -u -r1.4 -r1.4.8.1
--- shlfileop.c 28 Feb 2004 19:12:46 -0000 1.4
+++ shlfileop.c 30 Jun 2004 21:16:07 -0000 1.4.8.1
@@ -545,7 +545,7 @@
* ERROR_ALREADY_EXISTS when the directory already exists
* ERROR_FILENAME_EXCED_RANGE if the filename was to long to process
*/
-DWORD WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec)
+int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec)
{
WCHAR wPath[MAX_PATH];
TRACE("(%p, %s, %p)\n",hWnd, debugstr_a(path), sec);
@@ -557,9 +557,9 @@
/*************************************************************************
* SHCreateDirectoryExW [SHELL32.@]
*/
-DWORD WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
+int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec)
{
- DWORD ret = ERROR_BAD_PATHNAME;
+ int ret = ERROR_BAD_PATHNAME;
TRACE("(%p, %s, %p)\n",hWnd, debugstr_w(path), sec);
if (PathIsRelativeW(path))
reactos/lib/shell32
diff -u -r1.3 -r1.3.10.1
--- shlfsbind.c 28 Jan 2004 20:10:59 -0000 1.3
+++ shlfsbind.c 30 Jun 2004 21:16:07 -0000 1.3.10.1
@@ -62,7 +62,7 @@
IFileSystemBindData_fnSetFindData,
};
-static WCHAR wFileSystemBindData[] = {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d','D','a','t','a',0};
+static const WCHAR wFileSystemBindData[] = {'F','i','l','e',' ','S','y','s','t','e','m',' ','B','i','n','d','D','a','t','a',0};
HRESULT WINAPI IFileSystemBindData_Constructor(const WIN32_FIND_DATAW *pfd, LPBC *ppV)
{
@@ -93,7 +93,7 @@
bindOpts.grfMode = STGM_CREATE;
bindOpts.dwTickCountDeadline = 0;
IBindCtx_SetBindOptions(*ppV, &bindOpts);
- IBindCtx_RegisterObjectParam(*ppV, wFileSystemBindData, (LPUNKNOWN)sb);
+ IBindCtx_RegisterObjectParam(*ppV, (LPOLESTR)wFileSystemBindData, (LPUNKNOWN)sb);
IFileSystemBindData_Release((IFileSystemBindData*)sb);
}
@@ -113,7 +113,7 @@
if (!pfd)
return E_INVALIDARG;
- ret = IBindCtx_GetObjectParam(pbc, wFileSystemBindData, &pUnk);
+ ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk);
if (SUCCEEDED(ret))
{
ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd);
@@ -135,7 +135,7 @@
TRACE("%p, %p\n", pbc, pfd);
- ret = IBindCtx_GetObjectParam(pbc, wFileSystemBindData, &pUnk);
+ ret = IBindCtx_GetObjectParam(pbc, (LPOLESTR)wFileSystemBindData, &pUnk);
if (SUCCEEDED(ret))
{
ret = IUnknown_QueryInterface(pUnk, &IID_IFileSystemBindData, (LPVOID *)&pfsbd);
reactos/lib/shell32
diff -u -r1.2 -r1.2.12.1
--- shv_bg_cmenu.c 10 Jan 2004 10:35:52 -0000 1.2
+++ shv_bg_cmenu.c 30 Jun 2004 21:16:07 -0000 1.2.12.1
@@ -223,7 +223,7 @@
TRACE("\n");
- if(SUCCEEDED(pOleGetClipboard(&pda)))
+ if(SUCCEEDED(OleGetClipboard(&pda)))
{
STGMEDIUM medium;
FORMATETC formatetc;
@@ -277,7 +277,7 @@
SHFree(pidl);
/* release the medium*/
- pReleaseStgMedium(&medium);
+ ReleaseStgMedium(&medium);
}
IDataObject_Release(pda);
}
reactos/lib/syssetup
diff -u -r1.12.6.1 -r1.12.6.2
--- install.c 27 Jun 2004 01:13:12 -0000 1.12.6.1
+++ install.c 30 Jun 2004 21:16:07 -0000 1.12.6.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: install.c,v 1.12.6.1 2004/06/27 01:13:12 hyperion Exp $
+/* $Id: install.c,v 1.12.6.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/lib/user32/windows
diff -u -r1.29.6.1 -r1.29.6.2
--- bitmap.c 27 Jun 2004 01:13:12 -0000 1.29.6.1
+++ bitmap.c 30 Jun 2004 21:16:07 -0000 1.29.6.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitmap.c,v 1.29.6.1 2004/06/27 01:13:12 hyperion Exp $
+/* $Id: bitmap.c,v 1.29.6.2 2004/06/30 21:16:07 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
reactos/lib/user32/windows
diff -u -r1.9 -r1.9.12.1
--- font.c 21 Dec 2003 16:49:41 -0000 1.9
+++ font.c 30 Jun 2004 21:16:07 -0000 1.9.12.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: font.c,v 1.9 2003/12/21 16:49:41 navaraf Exp $
+/* $Id: font.c,v 1.9.12.1 2004/06/30 21:16:07 hyperion Exp $
*
* PROJECT: ReactOS user32.dll
* FILE: lib/user32/windows/input.c
@@ -97,8 +97,10 @@
else
{
TEXTMETRICA tm;
- GetTextMetricsA( hdc, &tm );
- defWidth = 8 * tm.tmAveCharWidth;
+ if (GetTextMetricsA( hdc, &tm ))
+ defWidth = 8 * tm.tmAveCharWidth;
+ else
+ defWidth = 0;
if (cTabStops == 1)
cTabStops = 0; /* on negative *lpTabPos */
}
@@ -742,7 +744,7 @@
{
int i = 0, j = 0;
int plen = 0;
- SIZE size;
+ SIZE size = {0, 0};
int maxl = *len;
int seg_i, seg_count, seg_j;
int max_seg_width;
@@ -950,7 +952,7 @@
{
int prefix_x;
int prefix_end;
- SIZE size;
+ SIZE size = {0, 0};
HPEN hpen;
HPEN oldPen;
reactos/lib/userenv
diff -u -r1.3.6.1 -r1.3.6.2
--- environment.c 27 Jun 2004 01:13:13 -0000 1.3.6.1
+++ environment.c 30 Jun 2004 21:16:07 -0000 1.3.6.2
@@ -1,4 +1,4 @@
-/* $Id: environment.c,v 1.3.6.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: environment.c,v 1.3.6.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
@@ -21,6 +21,7 @@
LPWSTR lpValue,
BOOL bExpand)
{
+ WCHAR ShortName[MAX_PATH];
UNICODE_STRING Name;
UNICODE_STRING SrcValue;
UNICODE_STRING DstValue;
@@ -36,8 +37,8 @@
DstValue.Length = 0;
DstValue.MaximumLength = Length;
- DstValue.Buffer = LocalAlloc (LPTR,
- Length);
+ DstValue.Buffer = LocalAlloc(LPTR,
+ Length);
if (DstValue.Buffer == NULL)
{
DPRINT1("LocalAlloc() failed\n");
@@ -50,8 +51,8 @@
&Length);
if (!NT_SUCCESS(Status))
{
- DPRINT1 ("RtlExpandEnvironmentStrings_U() failed (Status %lx)\n", Status);
- DPRINT1 ("Length %lu\n", Length);
+ DPRINT1("RtlExpandEnvironmentStrings_U() failed (Status %lx)\n", Status);
+ DPRINT1("Length %lu\n", Length);
return FALSE;
}
}
@@ -61,14 +62,27 @@
lpValue);
}
- RtlInitUnicodeString (&Name,
- lpName);
+ if (!_wcsicmp (lpName, L"temp") || !_wcsicmp (lpName, L"tmp"))
+ {
+ if (!GetShortPathNameW(DstValue.Buffer, ShortName, MAX_PATH))
+ {
+ DPRINT1("GetShortPathNameW() failed (Error %lu)\n", GetLastError());
+ return FALSE;
+ }
+
+ DPRINT("Buffer: %S\n", ShortName);
+ RtlInitUnicodeString(&DstValue,
+ ShortName);
+ }
+
+ RtlInitUnicodeString(&Name,
+ lpName);
DPRINT("Value: %wZ\n", &DstValue);
- Status = RtlSetEnvironmentVariable ((PWSTR*)Environment,
- &Name,
- &DstValue);
+ Status = RtlSetEnvironmentVariable((PWSTR*)Environment,
+ &Name,
+ &DstValue);
if (bExpand)
{
@@ -77,7 +91,7 @@
if (!NT_SUCCESS(Status))
{
- DPRINT1 ("RtlSetEnvironmentVariable() failed (Status %lx)\n", Status);
+ DPRINT1("RtlSetEnvironmentVariable() failed (Status %lx)\n", Status);
return FALSE;
}
reactos/lib/userenv
diff -u -r1.4.8.1 -r1.4.8.2
--- setup.c 27 Jun 2004 01:13:13 -0000 1.4.8.1
+++ setup.c 30 Jun 2004 21:16:07 -0000 1.4.8.2
@@ -1,4 +1,4 @@
-/* $Id: setup.c,v 1.4.8.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: setup.c,v 1.4.8.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
reactos/ntoskrnl
diff -u -r1.125.4.2 -r1.125.4.3
--- Makefile 27 Jun 2004 22:11:20 -0000 1.125.4.2
+++ Makefile 30 Jun 2004 21:16:07 -0000 1.125.4.3
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.125.4.2 2004/06/27 22:11:20 hyperion Exp $
+# $Id: Makefile,v 1.125.4.3 2004/06/30 21:16:07 hyperion Exp $
#
# ReactOS Operating System
#
reactos/ntoskrnl/ex
diff -u -r1.12.6.1 -r1.12.6.2
--- interlck.c 27 Jun 2004 01:13:13 -0000 1.12.6.1
+++ interlck.c 30 Jun 2004 21:16:07 -0000 1.12.6.2
@@ -1,4 +1,4 @@
-/* $Id: interlck.c,v 1.12.6.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: interlck.c,v 1.12.6.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ex
diff -u -r1.11.24.1 -r1.11.24.2
--- list.c 27 Jun 2004 01:13:13 -0000 1.11.24.1
+++ list.c 30 Jun 2004 21:16:07 -0000 1.11.24.2
@@ -1,4 +1,4 @@
-/* $Id: list.c,v 1.11.24.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: list.c,v 1.11.24.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ex
diff -u -r1.36.6.1 -r1.36.6.2
--- sysinfo.c 27 Jun 2004 01:13:13 -0000 1.36.6.1
+++ sysinfo.c 30 Jun 2004 21:16:07 -0000 1.36.6.2
@@ -1,4 +1,4 @@
-/* $Id: sysinfo.c,v 1.36.6.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: sysinfo.c,v 1.36.6.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ex
diff -u -r1.19.20.1 -r1.19.20.2
--- time.c 27 Jun 2004 01:13:13 -0000 1.19.20.1
+++ time.c 30 Jun 2004 21:16:07 -0000 1.19.20.2
@@ -1,4 +1,4 @@
-/* $Id: time.c,v 1.19.20.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: time.c,v 1.19.20.2 2004/06/30 21:16:07 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/fs
diff -u -r1.11.14.1 -r1.11.14.2
--- mcb.c 27 Jun 2004 01:13:13 -0000 1.11.14.1
+++ mcb.c 30 Jun 2004 21:16:08 -0000 1.11.14.2
@@ -1,4 +1,4 @@
-/* $Id: mcb.c,v 1.11.14.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: mcb.c,v 1.11.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* reactos/ntoskrnl/fs/mcb.c
*
reactos/ntoskrnl/fs
diff -u -r1.5.24.1 -r1.5.24.2
--- mdl.c 27 Jun 2004 01:13:13 -0000 1.5.24.1
+++ mdl.c 30 Jun 2004 21:16:08 -0000 1.5.24.2
@@ -1,4 +1,4 @@
-/* $Id: mdl.c,v 1.5.24.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: mdl.c,v 1.5.24.2 2004/06/30 21:16:08 hyperion Exp $
*
* reactos/ntoskrnl/fs/mdl.c
*
reactos/ntoskrnl/fs
diff -u -r1.9.14.1 -r1.9.14.2
--- notify.c 27 Jun 2004 01:13:13 -0000 1.9.14.1
+++ notify.c 30 Jun 2004 21:16:08 -0000 1.9.14.2
@@ -1,4 +1,4 @@
-/* $Id: notify.c,v 1.9.14.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: notify.c,v 1.9.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* reactos/ntoskrnl/fs/notify.c
*
@@ -315,8 +315,8 @@
STDCALL
NTSTATUS
FsRtlRegisterFileSystemFilterCallbacks (
- IN struct _DRIVER_OBJECT *FilterDriverObject,
- IN PFS_FILTER_CALLBACKS Callbacks
+ IN PVOID Unknown1,
+ IN PVOID Unknown2
)
{
UNIMPLEMENTED;
reactos/ntoskrnl/fs
diff -u -r1.15.24.1 -r1.15.24.2
--- util.c 27 Jun 2004 01:13:13 -0000 1.15.24.1
+++ util.c 30 Jun 2004 21:16:08 -0000 1.15.24.2
@@ -1,4 +1,4 @@
-/* $Id: util.c,v 1.15.24.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: util.c,v 1.15.24.2 2004/06/30 21:16:08 hyperion Exp $
*
* reactos/ntoskrnl/fs/util.c
*
reactos/ntoskrnl/include/internal
diff -u -r1.24.10.1 -r1.24.10.2
--- kd.h 27 Jun 2004 01:13:13 -0000 1.24.10.1
+++ kd.h 30 Jun 2004 21:16:08 -0000 1.24.10.2
@@ -1,4 +1,4 @@
-/* $Id: kd.h,v 1.24.10.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: kd.h,v 1.24.10.2 2004/06/30 21:16:08 hyperion Exp $
*
* kernel debugger prototypes
*/
reactos/ntoskrnl/include/internal
diff -u -r1.58.10.1 -r1.58.10.2
--- ps.h 27 Jun 2004 01:13:13 -0000 1.58.10.1
+++ ps.h 30 Jun 2004 21:16:08 -0000 1.58.10.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: ps.h,v 1.58.10.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: ps.h,v 1.58.10.2 2004/06/30 21:16:08 hyperion Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Process manager definitions
reactos/ntoskrnl/io
diff -u -r1.70.8.1 -r1.70.8.2
--- device.c 27 Jun 2004 01:13:13 -0000 1.70.8.1
+++ device.c 30 Jun 2004 21:16:08 -0000 1.70.8.2
@@ -1,4 +1,4 @@
-/* $Id: device.c,v 1.70.8.1 2004/06/27 01:13:13 hyperion Exp $
+/* $Id: device.c,v 1.70.8.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.47.4.1 -r1.47.4.2
--- driver.c 27 Jun 2004 01:13:14 -0000 1.47.4.1
+++ driver.c 30 Jun 2004 21:16:08 -0000 1.47.4.2
@@ -1,4 +1,4 @@
-/* $Id: driver.c,v 1.47.4.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: driver.c,v 1.47.4.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.16.14.1 -r1.16.14.2
--- errlog.c 27 Jun 2004 01:13:14 -0000 1.16.14.1
+++ errlog.c 30 Jun 2004 21:16:08 -0000 1.16.14.2
@@ -1,4 +1,4 @@
-/* $Id: errlog.c,v 1.16.14.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: errlog.c,v 1.16.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.28.14.1 -r1.28.14.2
--- file.c 27 Jun 2004 01:13:14 -0000 1.28.14.1
+++ file.c 30 Jun 2004 21:16:08 -0000 1.28.14.2
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.28.14.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: file.c,v 1.28.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.61.6.1 -r1.61.6.2
--- irp.c 27 Jun 2004 01:13:14 -0000 1.61.6.1
+++ irp.c 30 Jun 2004 21:16:08 -0000 1.61.6.2
@@ -1,4 +1,4 @@
-/* $Id: irp.c,v 1.61.6.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: irp.c,v 1.61.6.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.29.6.1 -r1.29.6.2
--- pnpmgr.c 27 Jun 2004 01:13:14 -0000 1.29.6.1
+++ pnpmgr.c 30 Jun 2004 21:16:08 -0000 1.29.6.2
@@ -1,4 +1,4 @@
-/* $Id: pnpmgr.c,v 1.29.6.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: pnpmgr.c,v 1.29.6.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.16.14.1 -r1.16.14.2
--- process.c 27 Jun 2004 01:13:14 -0000 1.16.14.1
+++ process.c 30 Jun 2004 21:16:08 -0000 1.16.14.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: process.c,v 1.16.14.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: process.c,v 1.16.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.9.24.1 -r1.9.24.2
--- share.c 27 Jun 2004 01:13:14 -0000 1.9.24.1
+++ share.c 30 Jun 2004 21:16:08 -0000 1.9.24.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: share.c,v 1.9.24.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: share.c,v 1.9.24.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/io
diff -u -r1.8.24.1 -r1.8.24.2
--- xhaldisp.c 27 Jun 2004 01:13:14 -0000 1.8.24.1
+++ xhaldisp.c 30 Jun 2004 21:16:08 -0000 1.8.24.2
@@ -1,4 +1,4 @@
-/* $Id: xhaldisp.c,v 1.8.24.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: xhaldisp.c,v 1.8.24.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/kd
diff -u -r1.51.10.1 -r1.51.10.2
--- kdebug.c 27 Jun 2004 01:13:14 -0000 1.51.10.1
+++ kdebug.c 30 Jun 2004 21:16:08 -0000 1.51.10.2
@@ -1,4 +1,4 @@
-/* $Id: kdebug.c,v 1.51.10.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: kdebug.c,v 1.51.10.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.42.8.3 -r1.42.8.4
--- catch.c 27 Jun 2004 01:13:14 -0000 1.42.8.3
+++ catch.c 30 Jun 2004 21:16:08 -0000 1.42.8.4
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: catch.c,v 1.42.8.3 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: catch.c,v 1.42.8.4 2004/06/30 21:16:08 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/catch.c
reactos/ntoskrnl/ke
diff -u -r1.30.12.1 -r1.30.12.2
--- dpc.c 27 Jun 2004 01:13:14 -0000 1.30.12.1
+++ dpc.c 30 Jun 2004 21:16:08 -0000 1.30.12.2
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dpc.c,v 1.30.12.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: dpc.c,v 1.30.12.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.46.14.1 -r1.46.14.2
--- kthread.c 27 Jun 2004 01:13:14 -0000 1.46.14.1
+++ kthread.c 30 Jun 2004 21:16:08 -0000 1.46.14.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: kthread.c,v 1.46.14.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: kthread.c,v 1.46.14.2 2004/06/30 21:16:08 hyperion Exp $
*
* FILE: ntoskrnl/ke/kthread.c
* PURPOSE: Microkernel thread support
reactos/ntoskrnl/ke
diff -u -r1.19.10.1 -r1.19.10.2
--- process.c 27 Jun 2004 01:13:14 -0000 1.19.10.1
+++ process.c 30 Jun 2004 21:16:08 -0000 1.19.10.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: process.c,v 1.19.10.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: process.c,v 1.19.10.2 2004/06/30 21:16:08 hyperion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/process.c
reactos/ntoskrnl/ke
diff -u -r1.20.12.1 -r1.20.12.2
--- spinlock.c 27 Jun 2004 01:13:14 -0000 1.20.12.1
+++ spinlock.c 30 Jun 2004 21:16:08 -0000 1.20.12.2
@@ -1,4 +1,4 @@
-/* $Id: spinlock.c,v 1.20.12.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: spinlock.c,v 1.20.12.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke
diff -u -r1.73.6.1 -r1.73.6.2
--- timer.c 27 Jun 2004 01:13:14 -0000 1.73.6.1
+++ timer.c 30 Jun 2004 21:16:08 -0000 1.73.6.2
@@ -1,4 +1,4 @@
-/* $Id: timer.c,v 1.73.6.1 2004/06/27 01:13:14 hyperion Exp $
+/* $Id: timer.c,v 1.73.6.2 2004/06/30 21:16:08 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ke/i386
diff -u -r1.25.24.1 -r1.25.24.2
--- usercall.c 27 Jun 2004 01:13:16 -0000 1.25.24.1
+++ usercall.c 30 Jun 2004 21:16:09 -0000 1.25.24.2
@@ -1,4 +1,4 @@
-/* $Id: usercall.c,v 1.25.24.1 2004/06/27 01:13:16 hyperion Exp $
+/* $Id: usercall.c,v 1.25.24.2 2004/06/30 21:16:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ldr
diff -u -r1.6.24.1 -r1.6.24.2
--- resource.c 27 Jun 2004 01:13:16 -0000 1.6.24.1
+++ resource.c 30 Jun 2004 21:16:09 -0000 1.6.24.2
@@ -1,4 +1,4 @@
-/* $Id: resource.c,v 1.6.24.1 2004/06/27 01:13:16 hyperion Exp $
+/* $Id: resource.c,v 1.6.24.2 2004/06/30 21:16:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/ldr
diff -u -r1.18 -r1.18.14.1
--- rtl.c 30 Dec 2003 18:52:05 -0000 1.18
+++ rtl.c 30 Jun 2004 21:16:09 -0000 1.18.14.1
@@ -1,4 +1,4 @@
-/* $Id: rtl.c,v 1.18 2003/12/30 18:52:05 fireball Exp $
+/* $Id: rtl.c,v 1.18.14.1 2004/06/30 21:16:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -175,7 +175,7 @@
AddressPtr = (PULONG)RVA((char*)BaseAddress, ExportDir->AddressOfFunctions);
if (Name && Name->Length)
{
- ULONG minn, maxn;
+ LONG minn, maxn;
/* by name */
OrdinalPtr =
@@ -185,7 +185,7 @@
minn = 0; maxn = ExportDir->NumberOfNames;
while (minn <= maxn)
{
- ULONG mid;
+ LONG mid;
LONG res;
mid = (minn + maxn) / 2;
reactos/ntoskrnl/lpc
diff -u -r1.19.24.1 -r1.19.24.2
--- reply.c 27 Jun 2004 01:13:16 -0000 1.19.24.1
+++ reply.c 30 Jun 2004 21:16:09 -0000 1.19.24.2
@@ -1,4 +1,4 @@
-/* $Id: reply.c,v 1.19.24.1 2004/06/27 01:13:16 hyperion Exp $
+/* $Id: reply.c,v 1.19.24.2 2004/06/30 21:16:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/ntoskrnl/mm
diff -u -r1.28.8.1 -r1.28.8.2
--- pool.c 27 Jun 2004 01:13:16 -0000 1.28.8.1
+++ pool.c 30 Jun 2004 21:16:09 -0000 1.28.8.2
@@ -1,4 +1,4 @@
-/* $Id: pool.c,v 1.28.8.1 2004/06/27 01:13:16 hyperion Exp $
+/* $Id: pool.c,v 1.28.8.2 2004/06/30 21:16:09 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/subsys/csrss/api
diff -u -r1.33 -r1.33.6.1
--- process.c 9 Apr 2004 20:03:15 -0000 1.33
+++ process.c 30 Jun 2004 21:16:09 -0000 1.33.6.1
@@ -1,4 +1,4 @@
-/* $Id: process.c,v 1.33 2004/04/09 20:03:15 navaraf Exp $
+/* $Id: process.c,v 1.33.6.1 2004/06/30 21:16:09 hyperion Exp $
*
* reactos/subsys/csrss/api/process.c
*
reactos/subsys/csrss/api
diff -u -r1.34 -r1.34.6.1
--- wapi.c 9 Apr 2004 20:03:15 -0000 1.34
+++ wapi.c 30 Jun 2004 21:16:09 -0000 1.34.6.1
@@ -1,4 +1,4 @@
-/* $Id: wapi.c,v 1.34 2004/04/09 20:03:15 navaraf Exp $
+/* $Id: wapi.c,v 1.34.6.1 2004/06/30 21:16:09 hyperion Exp $
*
* reactos/subsys/csrss/api/wapi.c
*
reactos/subsys/system/cmd
diff -u -r1.6.2.1 -r1.6.2.2
--- console.c 27 Jun 2004 01:13:16 -0000 1.6.2.1
+++ console.c 30 Jun 2004 21:16:09 -0000 1.6.2.2
@@ -1,4 +1,4 @@
-/* $Id: console.c,v 1.6.2.1 2004/06/27 01:13:16 hyperion Exp $
+/* $Id: console.c,v 1.6.2.2 2004/06/30 21:16:09 hyperion Exp $
*
* CONSOLE.C - console input/output functions.
*
reactos/subsys/system/explorer/utility
diff -u -r1.11 -r1.11.4.1
--- xmlstorage.cpp 13 Jun 2004 12:45:29 -0000 1.11
+++ xmlstorage.cpp 30 Jun 2004 21:16:09 -0000 1.11.4.1
@@ -87,10 +87,11 @@
{
XMLReaderBase* pReader = (XMLReaderBase*) userData;
- if (version) {
+ if (version)
pReader->_xml_version = version;
+
+ if (encoding)
pReader->_encoding = encoding;
- }
}
/// notifications about XML start tag
@@ -217,11 +218,14 @@
case XML_ERROR_FEATURE_REQUIRES_XML_DTD: return "XML_ERROR_FEATURE_REQUIRES_XML_DTD";
case XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING: return "XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING";
case XML_ERROR_UNBOUND_PREFIX: return "XML_ERROR_UNBOUND_PREFIX";
+ // EXPAT version >= 1.95.8
+#if XML_MAJOR_VERSION>1 || (XML_MAJOR_VERSION==1 && XML_MINOR_VERSION>95) || (XML_MAJOR_VERSION==1 && XML_MINOR_VERSION==95 && XML_MICRO_VERSION>7)
case XML_ERROR_SUSPENDED: return "XML_ERROR_SUSPENDED";
case XML_ERROR_NOT_SUSPENDED: return "XML_ERROR_NOT_SUSPENDED";
case XML_ERROR_ABORTED: return "XML_ERROR_ABORTED";
case XML_ERROR_FINISHED: return "XML_ERROR_FINISHED";
case XML_ERROR_SUSPEND_PE: return "XML_ERROR_SUSPEND_PE";
+#endif
}
std::ostringstream out;
reactos/subsys/system/explorer/utility
diff -u -r1.21 -r1.21.2.1
--- xmlstorage.h 18 Jun 2004 16:36:00 -0000 1.21
+++ xmlstorage.h 30 Jun 2004 21:16:09 -0000 1.21.2.1
@@ -1205,7 +1205,7 @@
int _value;
private:
- void operator=(const XMLBool&); // disallow assignment operations
+ void operator=(const XMLInt&); // disallow assignment operations
};
struct XMLIntRef
@@ -1242,6 +1242,84 @@
};
+struct XMLString
+{
+ XMLString(const String& value)
+ : _value(value)
+ {
+ }
+
+ XMLString(LPCTSTR value, LPCTSTR def=TEXT(""))
+ {
+ if (value && *value)
+ _value = value;
+ else
+ _value = def;
+ }
+
+ XMLString(const XMLNode* node, const String& attr_name, LPCTSTR def=TEXT(""))
+ {
+ const String& value = node->get(attr_name);
+
+ if (!value.empty())
+ _value = value;
+ else
+ _value = def;
+ }
+
+ XMLString(const XMLNode* node, const String& name, const String& attr_name, LPCTSTR def=TEXT(""))
+ {
+ const String& value = node->value(name, attr_name);
+
+ if (!value.empty())
+ _value = value;
+ else
+ _value = def;
+ }
+
+ operator const String&() const
+ {
+ return _value;
+ }
+
+protected:
+ String _value;
+
+private:
+ void operator=(const XMLString&); // disallow assignment operations
+};
+
+struct XMStringRef
+{
+ XMStringRef(XMLNode* node, const String& name, const String& attr_name, LPCTSTR def=TEXT(""))
+ : _ref(node->value(name, attr_name))
+ {
+ if (_ref.empty())
+ assign(def);
+ }
+
+ XMStringRef& operator=(const String& value)
+ {
+ assign(value);
+
+ return *this;
+ }
+
+ operator const String&() const
+ {
+ return _ref;
+ }
+
+ void assign(const String& value)
+ {
+ _ref.assign(value);
+ }
+
+protected:
+ String& _ref;
+};
+
+
#ifdef _MSC_VER
#pragma warning(disable: 4355)
#endif
reactos/subsys/system/usetup
diff -u -r1.6.22.1 -r1.6.22.2
--- bootsup.h 27 Jun 2004 01:13:17 -0000 1.6.22.1
+++ bootsup.h 30 Jun 2004 21:16:09 -0000 1.6.22.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bootsup.h,v 1.6.22.1 2004/06/27 01:13:17 hyperion Exp $
+/* $Id: bootsup.h,v 1.6.22.2 2004/06/30 21:16:09 hyperion Exp $
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS text-mode setup
* FILE: subsys/system/usetup/bootsup.h
reactos/subsys/win32k/eng
diff -u -r1.6.6.1 -r1.6.6.2
--- misc.c 27 Jun 2004 01:13:17 -0000 1.6.6.1
+++ misc.c 30 Jun 2004 21:16:10 -0000 1.6.6.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: misc.c,v 1.6.6.1 2004/06/27 01:13:17 hyperion Exp $ */
+/* $Id: misc.c,v 1.6.6.2 2004/06/30 21:16:10 hyperion Exp $ */
#include <w32k.h>
BOOL STDCALL
reactos/subsys/win32k/eng
diff -u -r1.72.2.1 -r1.72.2.2
--- mouse.c 27 Jun 2004 01:13:17 -0000 1.72.2.1
+++ mouse.c 30 Jun 2004 21:16:10 -0000 1.72.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: mouse.c,v 1.72.2.1 2004/06/27 01:13:17 hyperion Exp $
+/* $Id: mouse.c,v 1.72.2.2 2004/06/30 21:16:10 hyperion Exp $
*
* PROJECT: ReactOS kernel
* PURPOSE: Mouse
reactos/subsys/win32k/eng
diff -u -r1.21 -r1.21.6.1
--- palette.c 10 May 2004 17:07:17 -0000 1.21
+++ palette.c 30 Jun 2004 21:16:11 -0000 1.21.6.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: palette.c,v 1.21 2004/05/10 17:07:17 weiden Exp $
+/* $Id: palette.c,v 1.21.6.1 2004/06/30 21:16:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -32,22 +32,18 @@
* @implemented
*/
HPALETTE STDCALL
-EngCreatePalette(ULONG Mode,
- ULONG NumColors,
- ULONG *Colors,
- ULONG Red,
- ULONG Green,
- ULONG Blue)
+EngCreatePalette(ULONG Mode, ULONG NumColors, ULONG *Colors,
+ ULONG Red, ULONG Green, ULONG Blue)
{
- HPALETTE Palette;
+ HPALETTE Palette;
- Palette = PALETTE_AllocPalette(Mode, NumColors, Colors, Red, Green, Blue);
- if (NULL != Palette)
- {
+ Palette = PALETTE_AllocPalette(Mode, NumColors, Colors, Red, Green, Blue);
+ if (Palette != NULL)
+ {
GDIOBJ_SetOwnership(Palette, NULL);
- }
+ }
- return Palette;
+ return Palette;
}
/*
@@ -56,34 +52,31 @@
BOOL STDCALL
EngDeletePalette(IN HPALETTE Palette)
{
- GDIOBJ_SetOwnership(Palette, PsGetCurrentProcess());
+ GDIOBJ_SetOwnership(Palette, PsGetCurrentProcess());
- return PALETTE_FreePalette(Palette);
+ return PALETTE_FreePalette(Palette);
}
/*
* @implemented
*/
ULONG STDCALL
-PALOBJ_cGetColors(PALOBJ *PalObj,
- ULONG Start,
- ULONG Colors,
- ULONG *PaletteEntry)
+PALOBJ_cGetColors(PALOBJ *PalObj, ULONG Start, ULONG Colors, ULONG *PaletteEntry)
{
- ULONG i;
- PALGDI *PalGDI;
+ PALGDI *PalGDI;
- PalGDI = (PALGDI*)PalObj;
- //PalGDI = (PALGDI*)AccessInternalObjectFromUserObject(PalObj);
+ PalGDI = (PALGDI*)PalObj;
+ /* PalGDI = (PALGDI*)AccessInternalObjectFromUserObject(PalObj); */
- for(i=Start; i<Colors; i++)
- {
- PaletteEntry[i] = RGB(
- PalGDI->IndexedColors[i].peRed,
- PalGDI->IndexedColors[i].peGreen,
- PalGDI->IndexedColors[i].peBlue);
- }
+ if (Start >= PalGDI->NumColors)
+ return 0;
- return Colors;
+ Colors = min(Colors, PalGDI->NumColors - Start);
+
+ /* NOTE: PaletteEntry ULONGs are in the same order as PALETTEENTRY. */
+ RtlCopyMemory(PaletteEntry, PalGDI->IndexedColors + Start, sizeof(ULONG) * Colors);
+
+ return Colors;
}
+
/* EOF */
reactos/subsys/win32k/eng
diff -u -r1.40.4.1 -r1.40.4.2
--- surface.c 27 Jun 2004 01:13:17 -0000 1.40.4.1
+++ surface.c 30 Jun 2004 21:16:11 -0000 1.40.4.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: surface.c,v 1.40.4.1 2004/06/27 01:13:17 hyperion Exp $
+/* $Id: surface.c,v 1.40.4.2 2004/06/30 21:16:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/subsys/win32k/eng
diff -u -r1.35 -r1.35.4.1
--- xlate.c 30 May 2004 14:01:12 -0000 1.35
+++ xlate.c 30 Jun 2004 21:16:11 -0000 1.35.4.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: xlate.c,v 1.35 2004/05/30 14:01:12 weiden Exp $
+/* $Id: xlate.c,v 1.35.4.1 2004/06/30 21:16:11 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -30,8 +30,6 @@
// TODO: Cache XLATEOBJs that are created by EngCreateXlate by checking if the given palettes match a cached list
-ULONG CCMLastSourceColor = 0, CCMLastColorMatch = 0;
-
static ULONG FASTCALL ShiftAndMask(XLATEGDI *XlateGDI, ULONG Color)
{
ULONG TranslatedColor;
@@ -62,37 +60,17 @@
// Takes indexed palette and a
ULONG STDCALL
-ClosestColorMatch(XLATEGDI *XlateGDI, ULONG SourceColor,
+ClosestColorMatch(XLATEGDI *XlateGDI, LPPALETTEENTRY SourceColor,
PALETTEENTRY *DestColors, ULONG NumColors)
{
- LPPALETTEENTRY cSourceColor;
LONG idx = 0;
ULONG i;
- ULONG SourceRGB;
ULONG SourceRed, SourceGreen, SourceBlue;
ULONG cxRed, cxGreen, cxBlue, rt, BestMatch = 16777215;
- // Simple cache -- only one value because we don't want to waste time
- // if the colors aren't very sequential
-
- if(SourceColor == CCMLastSourceColor)
- {
- return CCMLastColorMatch;
- }
-
- if (PAL_BITFIELDS == XlateGDI->XlateObj.iSrcType || PAL_BGR == XlateGDI->XlateObj.iSrcType)
- {
- /* FIXME: must use bitfields */
- SourceRGB = ShiftAndMask(XlateGDI, SourceColor);
- cSourceColor = (LPPALETTEENTRY) &SourceRGB;
- }
- else
- {
- cSourceColor = (LPPALETTEENTRY)&SourceColor;
- }
- SourceRed = cSourceColor->peRed;
- SourceGreen = cSourceColor->peGreen;
- SourceBlue = cSourceColor->peBlue;
+ SourceRed = SourceColor->peRed;
+ SourceGreen = SourceColor->peGreen;
+ SourceBlue = SourceColor->peBlue;
for (i=0; i<NumColors; i++)
{
@@ -112,9 +90,6 @@
}
}
- CCMLastSourceColor = SourceColor;
- CCMLastColorMatch = idx;
-
return idx;
}
@@ -128,7 +103,7 @@
Trivial = TRUE;
for(i=0; i<PalSource->NumColors; i++)
{
- TranslationTable[i] = ClosestColorMatch(XlateGDI, *((ULONG*)&PalSource->IndexedColors[i]), PalDest->IndexedColors, PalDest->NumColors);
+ TranslationTable[i] = ClosestColorMatch(XlateGDI, PalSource->IndexedColors + i, PalDest->IndexedColors, PalDest->NumColors);
Trivial = Trivial && (TranslationTable[i] == i);
}
if (Trivial)
@@ -141,6 +116,10 @@
BitMasksFromPal(USHORT PalType, PPALGDI Palette,
PULONG RedMask, PULONG BlueMask, PULONG GreenMask)
{
+ static const union { PALETTEENTRY Color; ULONG Mask; } Red = {{255, 0, 0}};
+ static const union { PALETTEENTRY Color; ULONG Mask; } Green = {{0, 255, 0}};
+ static const union { PALETTEENTRY Color; ULONG Mask; } Blue = {{0, 0, 255}};
+
switch(PalType)
{
case PAL_RGB:
@@ -155,8 +134,13 @@
break;
case PAL_BITFIELDS:
*RedMask = Palette->RedMask;
- *BlueMask = Palette->BlueMask;
*GreenMask = Palette->GreenMask;
+ *BlueMask = Palette->BlueMask;
+ break;
+ case PAL_INDEXED:
+ *RedMask = Red.Mask;
+ *GreenMask = Green.Mask;
+ *BlueMask = Blue.Mask;
break;
}
}
@@ -201,185 +185,121 @@
FreeGDIHandle((ULONG)HXlate);
}
-XLATEOBJ * STDCALL IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
- HPALETTE PaletteDest, HPALETTE PaletteSource)
+XLATEOBJ* STDCALL
+IntEngCreateXlate(USHORT DestPalType, USHORT SourcePalType,
+ HPALETTE PaletteDest, HPALETTE PaletteSource)
{
- // FIXME: Add support for BGR conversions
-
- HPALETTE NewXlate;
- XLATEOBJ *XlateObj;
- XLATEGDI *XlateGDI;
- PALGDI *SourcePalGDI, *DestPalGDI;
- ULONG IndexedColors;
- ULONG SourceRedMask, SourceGreenMask, SourceBlueMask;
- ULONG DestRedMask, DestGreenMask, DestBlueMask;
- UINT i;
-
- NewXlate = (HPALETTE)CreateGDIHandle(sizeof( XLATEGDI ), sizeof( XLATEOBJ ), (PVOID*)&XlateGDI, (PVOID*)&XlateObj);
- if ( !ValidEngHandle ( NewXlate ) )
- return NULL;
-
- if (NULL != PaletteSource)
- {
- SourcePalGDI = PALETTE_LockPalette(PaletteSource);
- }
- if (PaletteDest == PaletteSource)
- {
- DestPalGDI = SourcePalGDI;
- }
- else if (NULL != PaletteDest)
- {
- DestPalGDI = PALETTE_LockPalette(PaletteDest);
- }
+ ULONG NewXlate;
+ XLATEOBJ *XlateObj;
+ XLATEGDI *XlateGDI;
+ PALGDI *SourcePalGDI = 0;
+ PALGDI *DestPalGDI = 0;
+ ULONG SourceRedMask, SourceGreenMask, SourceBlueMask;
+ ULONG DestRedMask, DestGreenMask, DestBlueMask;
+ ULONG i;
- XlateObj->iSrcType = SourcePalType;
- XlateObj->iDstType = DestPalType;
+ NewXlate = CreateGDIHandle(sizeof(XLATEGDI), sizeof(XLATEOBJ), (PVOID*)&XlateGDI, (PVOID*)&XlateObj);
+ if (!ValidEngHandle(NewXlate))
+ return NULL;
- // Store handles of palettes in internal Xlate GDI object (or NULLs)
- XlateGDI->DestPal = PaletteDest;
- XlateGDI->SourcePal = PaletteSource;
+ if (PaletteSource != NULL)
+ SourcePalGDI = PALETTE_LockPalette(PaletteSource);
+ if (PaletteDest == PaletteSource)
+ DestPalGDI = SourcePalGDI;
+ else if (PaletteDest != NULL)
+ DestPalGDI = PALETTE_LockPalette(PaletteDest);
- XlateObj->flXlate = 0;
+ XlateObj->iSrcType = SourcePalType;
+ XlateObj->iDstType = DestPalType;
+ XlateObj->flXlate = 0;
- XlateGDI->UseShiftAndMask = FALSE;
+ /* Store handles of palettes in internal Xlate GDI object (or NULLs) */
+ XlateGDI->SourcePal = PaletteSource;
+ XlateGDI->DestPal = PaletteDest;
- /* Compute bit fiddeling constants unless both palettes are indexed, then we don't need them */
- if (PAL_INDEXED != SourcePalType || PAL_INDEXED != DestPalType)
- {
- BitMasksFromPal(PAL_INDEXED == SourcePalType ? PAL_RGB : SourcePalType,
- SourcePalGDI, &SourceRedMask, &SourceBlueMask, &SourceGreenMask);
- BitMasksFromPal(PAL_INDEXED == DestPalType ? PAL_RGB : DestPalType,
- DestPalGDI, &DestRedMask, &DestBlueMask, &DestGreenMask);
- XlateGDI->RedShift = CalculateShift(SourceRedMask) - CalculateShift(DestRedMask);
- XlateGDI->RedMask = DestRedMask;
- XlateGDI->GreenShift = CalculateShift(SourceGreenMask) - CalculateShift(DestGreenMask);
- XlateGDI->GreenMask = DestGreenMask;
- XlateGDI->BlueShift = CalculateShift(SourceBlueMask) - CalculateShift(DestBlueMask);
- XlateGDI->BlueMask = DestBlueMask;
- }
+ XlateGDI->UseShiftAndMask = FALSE;
- // If source and destination palettes are the same or if they're RGB/BGR
- if( (PaletteDest == PaletteSource) ||
- ((DestPalType == PAL_RGB) && (SourcePalType == PAL_RGB)) ||
- ((DestPalType == PAL_BGR) && (SourcePalType == PAL_BGR)) )
- {
- XlateObj->flXlate |= XO_TRIVIAL;
- if (NULL != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteSource);
- }
- if (NULL != PaletteDest && PaletteDest != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteDest);
- }
- return XlateObj;
- }
+ /*
+ * Compute bit fiddeling constants unless both palettes are indexed, then
+ * we don't need them.
+ */
+ if (SourcePalType != PAL_INDEXED || DestPalType != PAL_INDEXED)
+ {
+ BitMasksFromPal(SourcePalType, SourcePalGDI, &SourceRedMask,
+ &SourceBlueMask, &SourceGreenMask);
+ BitMasksFromPal(DestPalType, DestPalGDI, &DestRedMask,
+ &DestBlueMask, &DestGreenMask);
+ XlateGDI->RedShift = CalculateShift(SourceRedMask) - CalculateShift(DestRedMask);
+ XlateGDI->RedMask = DestRedMask;
+ XlateGDI->GreenShift = CalculateShift(SourceGreenMask) - CalculateShift(DestGreenMask);
+ XlateGDI->GreenMask = DestGreenMask;
+ XlateGDI->BlueShift = CalculateShift(SourceBlueMask) - CalculateShift(DestBlueMask);
+ XlateGDI->BlueMask = DestBlueMask;
+ }
- /* If source and destination are bitfield based (RGB and BGR are just special bitfields) */
- if ((PAL_RGB == DestPalType || PAL_BGR == DestPalType || PAL_BITFIELDS == DestPalType) &&
- (PAL_RGB == SourcePalType || PAL_BGR == SourcePalType || PAL_BITFIELDS == SourcePalType))
- {
- if (SourceRedMask == DestRedMask &&
- SourceBlueMask == DestBlueMask &&
- SourceGreenMask == DestGreenMask)
- {
+ /* If source and destination palettes are the same or if they're RGB/BGR */
+ if (PaletteDest == PaletteSource ||
+ (DestPalType == PAL_RGB && SourcePalType == PAL_RGB) ||
+ (DestPalType == PAL_BGR && SourcePalType == PAL_BGR))
+ {
XlateObj->flXlate |= XO_TRIVIAL;
- }
- XlateGDI->UseShiftAndMask = TRUE;
- if (NULL != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteSource);
- }
- if (NULL != PaletteDest && PaletteDest != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteDest);
- }
- return XlateObj;
- }
-
- // Prepare the translation table
- if (PAL_INDEXED == SourcePalType || PAL_RGB == SourcePalType || PAL_BGR == SourcePalType)
- {
- XlateObj->flXlate |= XO_TABLE;
- if ((SourcePalType == PAL_INDEXED) && (DestPalType == PAL_INDEXED))
- {
- if(SourcePalGDI->NumColors > DestPalGDI->NumColors)
- {
- IndexedColors = SourcePalGDI->NumColors;
- } else
- IndexedColors = DestPalGDI->NumColors;
- }
- else if (SourcePalType == PAL_INDEXED) { IndexedColors = SourcePalGDI->NumColors; }
- else if (DestPalType == PAL_INDEXED) { IndexedColors = DestPalGDI->NumColors; }
+ goto end;
+ }
- XlateGDI->translationTable = EngAllocMem(FL_ZERO_MEMORY, sizeof(ULONG)*IndexedColors, 0);
- if (NULL == XlateGDI->translationTable)
+ /*
+ * If source and destination are bitfield based (RGB and BGR are just
+ * special bitfields) we can use simple shifting.
+ */
+ if ((DestPalType == PAL_RGB || DestPalType == PAL_BGR ||
+ DestPalType == PAL_BITFIELDS) &&
+ (SourcePalType == PAL_RGB || SourcePalType == PAL_BGR ||
+ SourcePalType == PAL_BITFIELDS))
+ {
+ if (SourceRedMask == DestRedMask &&
+ SourceBlueMask == DestBlueMask &&
+ SourceGreenMask == DestGreenMask)
{
- if (NULL != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteSource);
- }
- if (NULL != PaletteDest && PaletteDest != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteDest);
- }
- EngDeleteXlate(XlateObj);
- return NULL;
+ XlateObj->flXlate |= XO_TRIVIAL;
}
- }
+ XlateGDI->UseShiftAndMask = TRUE;
+ goto end;
+ }
- // Source palette is indexed
- if(XlateObj->iSrcType == PAL_INDEXED)
- {
- if(XlateObj->iDstType == PAL_INDEXED)
- {
- // Converting from indexed to indexed
+ /* Indexed -> Indexed */
+ if (SourcePalType == PAL_INDEXED && DestPalType == PAL_INDEXED)
+ {
+ XlateGDI->translationTable =
+ EngAllocMem(0, sizeof(ULONG) * SourcePalGDI->NumColors, 0);
IndexedToIndexedTranslationTable(XlateGDI, XlateGDI->translationTable, DestPalGDI, SourcePalGDI);
- } else
- if (PAL_RGB == XlateObj->iDstType || PAL_BITFIELDS == XlateObj->iDstType )
- {
- // FIXME: Is this necessary? I think the driver has to call this
- // function anyways if pulXlate is NULL and Source is PAL_INDEXED
-
- // Converting from indexed to RGB
-
- RtlCopyMemory(XlateGDI->translationTable, SourcePalGDI->IndexedColors, sizeof(ULONG) * SourcePalGDI->NumColors);
- if (PAL_BITFIELDS == XlateObj->iDstType)
- {
- for (i = 0; i < SourcePalGDI->NumColors; i++)
- {
- XlateGDI->translationTable[i] = ShiftAndMask(XlateGDI, XlateGDI->translationTable[i]);
- }
- }
- }
-
- XlateObj->pulXlate = XlateGDI->translationTable;
- }
+ XlateObj->flXlate |= XO_TABLE;
+ XlateObj->pulXlate = XlateGDI->translationTable;
+ goto end;
+ }
- // Source palette is RGB
- if (PAL_RGB == XlateObj->iSrcType || PAL_BGR == XlateObj->iSrcType)
- {
- if(PAL_INDEXED == XlateObj->iDstType)
- {
- // FIXME: Is this necessary? I think the driver has to call this
- // function anyways if pulXlate is NULL and Dest is PAL_INDEXED
+ /* Indexed -> Bitfields/RGB/BGR */
+ if (SourcePalType == PAL_INDEXED)
+ {
+ XlateGDI->translationTable =
+ EngAllocMem(0, sizeof(ULONG) * SourcePalGDI->NumColors, 0);
+ for (i = 0; i < SourcePalGDI->NumColors; i++)
+ XlateGDI->translationTable[i] =
+ ShiftAndMask(XlateGDI, *((ULONG *)&SourcePalGDI->IndexedColors[i]));
+ XlateObj->flXlate |= XO_TABLE;
+ XlateObj->pulXlate = XlateGDI->translationTable;
+ goto end;
+ }
- // Converting from RGB to indexed
- RtlCopyMemory(XlateGDI->translationTable, DestPalGDI->IndexedColors, sizeof(ULONG) * DestPalGDI->NumColors);
- }
- }
+ /*
+ * Last case: Bitfields/RGB/BGR -> Indexed
+ * isn't handled here yet and all the logic is in XLATEOBJ_iXlate now.
+ */
- // FIXME: Add support for XO_TO_MONO
- if (NULL != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteSource);
- }
- if (NULL != PaletteDest && PaletteDest != PaletteSource)
- {
- PALETTE_UnlockPalette(PaletteDest);
- }
-
- return XlateObj;
+end:
+ if (PaletteSource != NULL)
+ PALETTE_UnlockPalette(PaletteSource);
+ if (PaletteDest != NULL && PaletteDest != PaletteSource)
+ PALETTE_UnlockPalette(PaletteDest);
+ return XlateObj;
}
XLATEOBJ * STDCALL IntEngCreateMonoXlate(
@@ -410,10 +330,10 @@
XlateGDI->BackgroundColor = NtGdiGetNearestPaletteIndex(
PaletteSource, BackgroundColor);
break;
- case PAL_RGB:
+ case PAL_BGR:
XlateGDI->BackgroundColor = BackgroundColor;
break;
- case PAL_BGR:
+ case PAL_RGB:
XlateGDI->BackgroundColor =
((BackgroundColor & 0xFF) << 16) |
((BackgroundColor & 0xFF0000) >> 16) |
@@ -458,6 +378,7 @@
ULONG STDCALL
XLATEOBJ_iXlate(XLATEOBJ *XlateObj, ULONG Color)
{
+ XLATEGDI *XlateGDI;
PALGDI *PalGDI;
ULONG Closest;
@@ -466,41 +387,38 @@
return Color;
if (XlateObj->flXlate & XO_TRIVIAL)
- {
return Color;
- } else
+
+ if (XlateObj->flXlate & XO_TABLE)
+ return XlateObj->pulXlate[Color];
+
+ XlateGDI = (XLATEGDI *)AccessInternalObjectFromUserObject(XlateObj);
+
+ if (XlateObj->flXlate & XO_TO_MONO)
+ return Color == XlateGDI->BackgroundColor;
+
+ if (XlateGDI->UseShiftAndMask)
+ return ShiftAndMask(XlateGDI, Color);
+
+ if (XlateObj->iSrcType == PAL_RGB || XlateObj->iSrcType == PAL_BGR ||
+ XlateObj->iSrcType == PAL_BITFIELDS)
{
- XLATEGDI *XlateGDI = (XLATEGDI *)AccessInternalObjectFromUserObject(XlateObj);
+ /* FIXME: should we cache colors used often? */
+ /* FIXME: won't work if destination isn't indexed */
- if (XlateObj->flXlate & XO_TO_MONO)
- {
- return Color == XlateGDI->BackgroundColor;
- } else
- if (XlateGDI->UseShiftAndMask)
- {
- return ShiftAndMask(XlateGDI, Color);
- } else
- if (XlateObj->iSrcType == PAL_RGB || XlateObj->iSrcType == PAL_BGR ||
- XlateObj->iSrcType == PAL_BITFIELDS)
- {
- /* FIXME: should we cache colors used often? */
- /* FIXME: won't work if destination isn't indexed */
+ /* Extract the destination palette. */
+ PalGDI = PALETTE_LockPalette(XlateGDI->DestPal);
- /* Extract the destination palette. */
- PalGDI = PALETTE_LockPalette(XlateGDI->DestPal);
+ /* Convert the source color to the palette RGB format. */
+ Color = ShiftAndMask(XlateGDI, Color);
- /* Return closest match for the given color. */
- Closest = ClosestColorMatch(XlateGDI, Color, PalGDI->IndexedColors, PalGDI->NumColors);
- PALETTE_UnlockPalette(XlateGDI->DestPal);
- return Closest;
- } else
- if (XlateObj->iSrcType == PAL_INDEXED)
- {
- return XlateGDI->translationTable[Color];
- }
- }
+ /* Return closest match for the given color. */
+ Closest = ClosestColorMatch(XlateGDI, (LPPALETTEENTRY)&Color, PalGDI->IndexedColors, PalGDI->NumColors);
+ PALETTE_UnlockPalette(XlateGDI->DestPal);
+ return Closest;
+ }
- return 0;
+ return 0;
}
/*
reactos/subsys/win32k/ldr
diff -u -r1.16 -r1.16.6.1
--- loader.c 11 Apr 2004 09:09:38 -0000 1.16
+++ loader.c 30 Jun 2004 21:16:12 -0000 1.16.6.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: loader.c,v 1.16 2004/04/11 09:09:38 gvg Exp $
+/* $Id: loader.c,v 1.16.6.1 2004/06/30 21:16:12 hyperion Exp $
*
*/
@@ -29,58 +29,12 @@
#ifdef __USE_W32API
PIMAGE_NT_HEADERS STDCALL
-RtlImageNtHeader(IN PVOID BaseAddress);
+RtlImageNtHeader(PVOID);
+PVOID STDCALL
+RtlImageDirectoryEntryToData(PVOID,BOOLEAN,ULONG,PULONG);
#endif
/*
- * This is copied from ntdll... It's needed for loading keyboard dlls.
- */
-
-PVOID
-STDCALL
-RtlImageDirectoryEntryToData (
- PVOID BaseAddress,
- BOOLEAN bFlag,
- ULONG Directory,
- PULONG Size
- )
-{
- PIMAGE_NT_HEADERS NtHeader;
- PIMAGE_SECTION_HEADER SectionHeader;
- ULONG Va;
- ULONG Count;
-
- NtHeader = RtlImageNtHeader (BaseAddress);
- if (NtHeader == NULL)
- return NULL;
-
- if (Directory >= NtHeader->OptionalHeader.NumberOfRvaAndSizes)
- return NULL;
-
- Va = NtHeader->OptionalHeader.DataDirectory[Directory].VirtualAddress;
- if (Va == 0)
- return NULL;
-
- if (Size)
- *Size = NtHeader->OptionalHeader.DataDirectory[Directory].Size;
-
- if (bFlag)
- return (PVOID)(BaseAddress + Va);
-
- /* image mapped as ordinary file, we must find raw pointer */
- SectionHeader = (PIMAGE_SECTION_HEADER)(NtHeader + 1);
- Count = NtHeader->FileHeader.NumberOfSections;
- while (Count--)
- {
- if (SectionHeader->VirtualAddress == Va)
- return (PVOID)(BaseAddress + SectionHeader->PointerToRawData);
- SectionHeader++;
- }
-
- return NULL;
-}
-
-/*
* Blatantly stolen from ldr/utils.c in ntdll. I can't link ntdll from
* here, though.
*/
reactos/subsys/win32k/ntuser
diff -u -r1.23.2.1 -r1.23.2.2
--- focus.c 27 Jun 2004 01:13:17 -0000 1.23.2.1
+++ focus.c 30 Jun 2004 21:16:12 -0000 1.23.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: focus.c,v 1.23.2.1 2004/06/27 01:13:17 hyperion Exp $
+ * $Id: focus.c,v 1.23.2.2 2004/06/30 21:16:12 hyperion Exp $
*/
#include <w32k.h>
reactos/subsys/win32k/ntuser
diff -u -r1.79.2.1 -r1.79.2.2
--- misc.c 27 Jun 2004 01:13:17 -0000 1.79.2.1
+++ misc.c 30 Jun 2004 21:16:12 -0000 1.79.2.2
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.79.2.1 2004/06/27 01:13:17 hyperion Exp $
+/* $Id: misc.c,v 1.79.2.2 2004/06/30 21:16:12 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
reactos/subsys/win32k/ntuser
diff -u -r1.32 -r1.32.6.1
--- timer.c 10 May 2004 17:07:18 -0000 1.32
+++ timer.c 30 Jun 2004 21:16:12 -0000 1.32.6.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: timer.c,v 1.32 2004/05/10 17:07:18 weiden Exp $
+/* $Id: timer.c,v 1.32.6.1 2004/06/30 21:16:12 hyperion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -175,7 +175,6 @@
UINT_PTR FASTCALL
IntSetTimer(HWND hWnd, UINT_PTR nIDEvent, UINT uElapse, TIMERPROC lpTimerFunc, BOOL SystemTimer)
{
- ULONG Index;
PMSG_TIMER_ENTRY MsgTimer = NULL;
PMSG_TIMER_ENTRY NewTimer;
LARGE_INTEGER CurrentTime;
@@ -190,15 +189,15 @@
if((hWnd == NULL) && !SystemTimer)
{
/* find a free, window-less timer id */
- Index = RtlFindClearBitsAndSet(&WindowLessTimersBitMap, 1, HintIndex);
+ nIDEvent = RtlFindClearBitsAndSet(&WindowLessTimersBitMap, 1, HintIndex);
- if(Index == (ULONG) -1)
+ if(nIDEvent == (UINT_PTR) -1)
{
IntUnLockTimerList();
return 0;
}
- HintIndex = ++Index;
+ HintIndex = ++nIDEvent;
}
else
{
@@ -302,7 +301,6 @@
/* FIXME: set the last error */
return FALSE;
}
-
RtlClearBits(&WindowLessTimersBitMap, uIDEvent - 1, 1);
}
else
reactos/subsys/win32k/objects
diff -u -r1.74 -r1.74.2.1
--- bitmaps.c 20 Jun 2004 00:45:37 -0000 1.74
+++ bitmaps.c 30 Jun 2004 21:16:12 -0000 1.74.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: bitmaps.c,v 1.74 2004/06/20 00:45:37 navaraf Exp $ */
+/* $Id: bitmaps.c,v 1.74.2.1 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
#define IN_RECT(r,x,y) \
@@ -193,7 +193,7 @@
Colors[0] = DCSrc->w.textColor;
Colors[1] = DCSrc->w.backgroundColor;
- Mono = EngCreatePalette(PAL_INDEXED, 2, Colors, 0, 0, 0);
+ Mono = PALETTE_AllocPaletteIndexedRGB(2, (RGBQUAD*)Colors);
if (NULL != Mono)
{
XlateObj = (XLATEOBJ*)IntEngCreateXlate(DestMode, PAL_INDEXED, DestPalette, Mono);
@@ -630,6 +630,7 @@
PalMode = PalGDI->Mode;
PALETTE_UnlockPalette(Pal);
+ /* FIXME: Verify if it shouldn't be PAL_BGR! */
XlateObj = (XLATEOBJ*)IntEngCreateXlate ( PAL_RGB, PalMode, NULL, Pal );
if ( XlateObj )
{
reactos/subsys/win32k/objects
diff -u -r1.42.6.1 -r1.42.6.2
--- color.c 27 Jun 2004 01:13:17 -0000 1.42.6.1
+++ color.c 30 Jun 2004 21:16:12 -0000 1.42.6.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: color.c,v 1.42.6.1 2004/06/27 01:13:17 hyperion Exp $ */
+/* $Id: color.c,v 1.42.6.2 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
// FIXME: Use PXLATEOBJ logicalToSystem instead of int *mapping
@@ -44,14 +44,14 @@
{ 0x00, 0x80, 0x80, PC_SYS_USED },
{ 0xc0, 0xc0, 0xc0, PC_SYS_USED },
{ 0xc0, 0xdc, 0xc0, PC_SYS_USED },
- { 0xa6, 0xca, 0xf0, PC_SYS_USED },
+ { 0xd4, 0xd0, 0xc7, PC_SYS_USED },
// ... c_min/2 dynamic colorcells
// ... gap (for sparse palettes)
// ... c_min/2 dynamic colorcells
{ 0xff, 0xfb, 0xf0, PC_SYS_USED },
- { 0xa0, 0xa0, 0xa4, PC_SYS_USED },
+ { 0x3a, 0x6e, 0xa5, PC_SYS_USED },
{ 0x80, 0x80, 0x80, PC_SYS_USED },
{ 0xff, 0x00, 0x00, PC_SYS_USED },
{ 0x00, 0xff, 0x00, PC_SYS_USED },
@@ -200,7 +200,7 @@
if (NULL != palGDI)
{
/* Return closest match for the given RGB color */
- index = COLOR_PaletteLookupPixel((LPPALETTEENTRY)palGDI->IndexedColors, palGDI->NumColors, NULL, Color, FALSE);
+ index = COLOR_PaletteLookupPixel(palGDI->IndexedColors, palGDI->NumColors, NULL, Color, FALSE);
PALETTE_UnlockPalette(hpal);
}
@@ -233,7 +233,7 @@
PALETTE_UnlockPalette(hpal);
return 0;
}
- memcpy(pe, &palGDI->IndexedColors[StartIndex], Entries * sizeof(PALETTEENTRY));
+ memcpy(pe, palGDI->IndexedColors + StartIndex, Entries * sizeof(PALETTEENTRY));
for (numEntries = 0; numEntries < Entries; numEntries++)
{
if (pe[numEntries].peFlags & 0xF0)
@@ -493,7 +493,7 @@
{
Entries = numEntries - Start;
}
- memcpy(&palGDI->IndexedColors[Start], pe, Entries * sizeof(PALETTEENTRY));
+ memcpy(palGDI->IndexedColors + Start, pe, Entries * sizeof(PALETTEENTRY));
PALETTE_ValidateFlags(palGDI->IndexedColors, palGDI->NumColors);
ExFreePool(palGDI->logicalToSystem);
palGDI->logicalToSystem = NULL;
@@ -536,8 +536,10 @@
for( i = 0; i < size && diff ; i++ )
{
+#if 0
if(!(palPalEntry[i].peFlags & PC_SYS_USED) || (skipReserved && palPalEntry[i].peFlags & PC_SYS_RESERVED))
continue;
+#endif
r = palPalEntry[i].peRed - GetRValue(col);
g = palPalEntry[i].peGreen - GetGValue(col);
@@ -556,7 +558,6 @@
COLORREF STDCALL COLOR_LookupNearestColor( PALETTEENTRY* palPalEntry, int size, COLORREF color )
{
-#if 1
INT index;
index = COLOR_PaletteLookupPixel(palPalEntry, size, NULL, color, FALSE);
@@ -564,29 +565,6 @@
palPalEntry[index].peRed,
palPalEntry[index].peGreen,
palPalEntry[index].peBlue);
-#else
- unsigned char spec_type = color >> 24;
- int i;
- PALETTEENTRY *COLOR_sysPal = (PALETTEENTRY*)ReturnSystemPalette();
-
- // we need logical palette for PALETTERGB and PALETTEINDEX colorrefs
-
- if( spec_type == 2 ) /* PALETTERGB */
- color = *(COLORREF*)(palPalEntry + COLOR_PaletteLookupPixel(palPalEntry,size,NULL,color,FALSE));
-
- else if( spec_type == 1 ) /* PALETTEINDEX */
- {
- if( (i = color & 0x0000ffff) >= size )
- {
- DbgPrint("RGB(%lx) : idx %d is out of bounds, assuming NULL\n", color, i);
- color = *(COLORREF*)palPalEntry;
- }
- else color = *(COLORREF*)(palPalEntry + i);
- }
-
- color &= 0x00ffffff;
- return (0x00ffffff & *(COLORREF*)(COLOR_sysPal + COLOR_PaletteLookupPixel(COLOR_sysPal, 256, NULL, color, FALSE)));
-#endif
}
int STDCALL COLOR_PaletteLookupExactIndex( PALETTEENTRY* palPalEntry, int size,
reactos/subsys/win32k/objects
diff -u -r1.139 -r1.139.2.1
--- dc.c 20 Jun 2004 00:45:37 -0000 1.139
+++ dc.c 30 Jun 2004 21:16:12 -0000 1.139.2.1
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: dc.c,v 1.139 2004/06/20 00:45:37 navaraf Exp $
+/* $Id: dc.c,v 1.139.2.1 2004/06/30 21:16:12 hyperion Exp $
*
* DC.C - Device context functions
*
@@ -1749,9 +1749,8 @@
XLATEOBJ *XlateObj;
PPALGDI PalGDI;
DWORD objectType;
- COLORREF *ColorMap;
COLORREF MonoColorMap[2];
- ULONG NumColors, Index;
+ ULONG NumColors;
HRGN hVisRgn;
USHORT Mode;
@@ -1903,25 +1902,14 @@
if(pb->dib->dsBmih.biBitCount == 1) { NumColors = 2; } else
if(pb->dib->dsBmih.biBitCount == 4) { NumColors = 16; } else
if(pb->dib->dsBmih.biBitCount == 8) { NumColors = 256; }
-
- ColorMap = ExAllocatePoolWithTag(PagedPool, sizeof(COLORREF) * NumColors, TAG_DC);
- ASSERT(ColorMap);
- for (Index = 0; Index < NumColors; Index++)
- {
- ColorMap[Index] = RGB(pb->ColorMap[Index].rgbRed,
- pb->ColorMap[Index].rgbGreen,
- pb->ColorMap[Index].rgbBlue);
- }
- dc->w.hPalette = PALETTE_AllocPalette(PAL_INDEXED, NumColors, (ULONG *) ColorMap, 0, 0, 0);
- ExFreePool(ColorMap);
+ dc->w.hPalette = PALETTE_AllocPaletteIndexedRGB(NumColors, pb->ColorMap);
}
- else if ( 16 == pb->dib->dsBmih.biBitCount )
- {
- dc->w.hPalette = PALETTE_AllocPalette(PAL_BITFIELDS, pb->dib->dsBmih.biClrUsed, NULL, 0x7c00, 0x03e0, 0x001f);
- }
- else if(pb->dib->dsBmih.biBitCount >= 24)
+ else
{
- dc->w.hPalette = PALETTE_AllocPalette(PAL_RGB, pb->dib->dsBmih.biClrUsed, NULL, 0, 0, 0);
+ dc->w.hPalette = PALETTE_AllocPalette(PAL_BITFIELDS, 0, NULL,
+ pb->dib->dsBitfields[0],
+ pb->dib->dsBitfields[1],
+ pb->dib->dsBitfields[2]);
}
}
else
@@ -1931,7 +1919,7 @@
{
MonoColorMap[0] = RGB(0, 0, 0);
MonoColorMap[1] = RGB(255, 255, 255);
- dc->w.hPalette = PALETTE_AllocPalette(PAL_INDEXED, 2, MonoColorMap, 0, 0, 0);
+ dc->w.hPalette = PALETTE_AllocPaletteIndexedRGB(2, (RGBQUAD*)MonoColorMap);
}
else
{
reactos/subsys/win32k/objects
diff -u -r1.51.2.1 -r1.51.2.2
--- dib.c 27 Jun 2004 01:13:17 -0000 1.51.2.1
+++ dib.c 30 Jun 2004 21:16:12 -0000 1.51.2.2
@@ -1,5 +1,5 @@
/*
- * $Id: dib.c,v 1.51.2.1 2004/06/27 01:13:17 hyperion Exp $
+ * $Id: dib.c,v 1.51.2.2 2004/06/30 21:16:12 hyperion Exp $
*
* ReactOS W32 Subsystem
* Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 ReactOS Team
@@ -1115,15 +1115,15 @@
dib->dsBitfields[2] = (bi->biCompression == BI_BITFIELDS) ? *((DWORD *)bmi->bmiColors + 2) : 0x001f; break;
case 24:
- dib->dsBitfields[0] = 0xff;
- dib->dsBitfields[1] = 0xff00;
- dib->dsBitfields[2] = 0xff0000;
+ dib->dsBitfields[0] = 0xff0000;
+ dib->dsBitfields[1] = 0x00ff00;
+ dib->dsBitfields[2] = 0x0000ff;
break;
case 32:
- dib->dsBitfields[0] = (bi->biCompression == BI_BITFIELDS) ? *(DWORD *)bmi->bmiColors : 0xff;
- dib->dsBitfields[1] = (bi->biCompression == BI_BITFIELDS) ? *((DWORD *)bmi->bmiColors + 1) : 0xff00;
- dib->dsBitfields[2] = (bi->biCompression == BI_BITFIELDS) ? *((DWORD *)bmi->bmiColors + 2) : 0xff0000;
+ dib->dsBitfields[0] = (bi->biCompression == BI_BITFIELDS) ? *(DWORD *)bmi->bmiColors : 0xff0000;
+ dib->dsBitfields[1] = (bi->biCompression == BI_BITFIELDS) ? *((DWORD *)bmi->bmiColors + 1) : 0x00ff00;
+ dib->dsBitfields[2] = (bi->biCompression == BI_BITFIELDS) ? *((DWORD *)bmi->bmiColors + 2) : 0x0000ff;
break;
}
dib->dshSection = section;
@@ -1350,27 +1350,6 @@
return lpRGB;
}
-PPALETTEENTRY STDCALL
-DIBColorTableToPaletteEntries (
- PPALETTEENTRY palEntries,
- const RGBQUAD *DIBColorTable,
- ULONG ColorCount
- )
-{
- ULONG i;
-
- for (i = 0; i < ColorCount; i++)
- {
- palEntries->peRed = DIBColorTable->rgbRed;
- palEntries->peGreen = DIBColorTable->rgbGreen;
- palEntries->peBlue = DIBColorTable->rgbBlue;
- palEntries++;
- DIBColorTable++;
- }
-
- return palEntries;
-}
-
HPALETTE FASTCALL
BuildDIBPalette (PBITMAPINFO bmi, PINT paletteType)
{
@@ -1407,13 +1386,11 @@
if (PAL_INDEXED == *paletteType)
{
- palEntries = ExAllocatePoolWithTag(PagedPool, sizeof(PALETTEENTRY)*ColorCount, TAG_COLORMAP);
- DIBColorTableToPaletteEntries(palEntries, bmi->bmiColors, ColorCount);
+ hPal = PALETTE_AllocPaletteIndexedRGB(ColorCount, (RGBQUAD*)bmi->bmiColors);
}
- hPal = PALETTE_AllocPalette( *paletteType, ColorCount, (ULONG*)palEntries, 0, 0, 0 );
- if (NULL != palEntries)
+ else
{
- ExFreePool(palEntries);
+ hPal = PALETTE_AllocPalette( *paletteType, ColorCount, (ULONG*)palEntries, 0, 0, 0 );
}
return hPal;
reactos/subsys/win32k/objects
diff -u -r1.18.6.1 -r1.18.6.2
--- objconv.c 27 Jun 2004 01:13:17 -0000 1.18.6.1
+++ objconv.c 30 Jun 2004 21:16:12 -0000 1.18.6.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: objconv.c,v 1.18.6.1 2004/06/27 01:13:17 hyperion Exp $ */
+/* $Id: objconv.c,v 1.18.6.2 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice)
reactos/subsys/win32k/objects
diff -u -r1.19.2.1 -r1.19.2.2
--- palette.c 27 Jun 2004 01:13:17 -0000 1.19.2.1
+++ palette.c 30 Jun 2004 21:16:12 -0000 1.19.2.2
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: palette.c,v 1.19.2.1 2004/06/27 01:13:17 hyperion Exp $ */
+/* $Id: palette.c,v 1.19.2.2 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
#ifndef NO_MAPPING
reactos/subsys/win32k/objects
diff -u -r1.57 -r1.57.6.1
--- region.c 18 May 2004 22:32:48 -0000 1.57
+++ region.c 30 Jun 2004 21:16:12 -0000 1.57.6.1
@@ -113,7 +113,7 @@
* the y-x-banding that's so nice to have...
*/
-/* $Id: region.c,v 1.57 2004/05/18 22:32:48 weiden Exp $ */
+/* $Id: region.c,v 1.57.6.1 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
#include <win32k/float.h>
@@ -400,7 +400,7 @@
return 0;
RtlCopyMemory( temp, *firstrect, reg->rdh.nRgnSize );
reg->rdh.nRgnSize *= 2;
- if (*firstrect != ®->BuiltInRect)
+ if (*firstrect != ®->rdh.rcBound)
ExFreePool( *firstrect );
*firstrect = temp;
*rect = (*firstrect)+reg->rdh.nCount;
@@ -466,7 +466,7 @@
if( !temp )
return FALSE;
- if( dst->Buffer && dst->Buffer != &dst->BuiltInRect )
+ if( dst->Buffer && dst->Buffer != &dst->rdh.rcBound )
ExFreePool( dst->Buffer ); //free the old buffer
dst->Buffer = temp;
dst->rdh.nRgnSize = src->rdh.nCount * sizeof(RECT); //size of region buffer
@@ -541,7 +541,7 @@
}
else{
xrect = ExAllocatePoolWithTag(PagedPool, rgnSrc->rdh.nCount * sizeof(RECT), TAG_REGION);
- if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->BuiltInRect )
+ if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->rdh.rcBound )
ExFreePool( rgnDst->Buffer ); //free the old buffer. will be assigned to xrect below.
}
@@ -604,7 +604,7 @@
if(!temp)
return FALSE;
- if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->BuiltInRect )
+ if( rgnDst->Buffer && rgnDst->Buffer != &rgnDst->rdh.rcBound )
ExFreePool( rgnDst->Buffer ); //free the old buffer
rgnDst->Buffer = temp;
rgnDst->rdh.nCount = i;
@@ -1142,7 +1142,7 @@
else{
newReg->rdh.nRgnSize = newReg->rdh.nCount*sizeof(RECT);
RtlCopyMemory( newReg->Buffer, prev_rects, newReg->rdh.nRgnSize );
- if (prev_rects != &newReg->BuiltInRect)
+ if (prev_rects != &newReg->rdh.rcBound)
ExFreePool( prev_rects );
}
}
@@ -1153,7 +1153,7 @@
* the region is empty
*/
newReg->rdh.nRgnSize = sizeof(RECT);
- if (newReg->Buffer != &newReg->BuiltInRect)
+ if (newReg->Buffer != &newReg->rdh.rcBound)
ExFreePool( newReg->Buffer );
newReg->Buffer = ExAllocatePoolWithTag( PagedPool, sizeof(RECT), TAG_REGION );
ASSERT( newReg->Buffer );
@@ -1165,7 +1165,7 @@
else
newReg->rdh.iType = (newReg->rdh.nCount > 1)? COMPLEXREGION : SIMPLEREGION;
- if (oldRects != &newReg->BuiltInRect)
+ if (oldRects != &newReg->rdh.rcBound)
ExFreePool( oldRects );
return;
}
@@ -1736,96 +1736,90 @@
REGION_UnionRegion(rgn, rgn, ®ion);
}
-
BOOL FASTCALL REGION_CreateFrameRgn(HRGN hDest, HRGN hSrc, INT x, INT y)
{
- PROSRGNDATA srcObj, destObj;
- PRECT rc;
- INT dx, dy;
- ULONG i;
+ PROSRGNDATA srcObj, destObj;
+ PRECT rc;
+ ULONG i;
- if(!(srcObj = (PROSRGNDATA)RGNDATA_LockRgn(hSrc)))
- {
- return FALSE;
- }
- if(!REGION_NOT_EMPTY(srcObj))
- {
- RGNDATA_UnlockRgn(hSrc);
- return FALSE;
- }
- if(!(destObj = (PROSRGNDATA)RGNDATA_LockRgn(hDest)))
- {
- RGNDATA_UnlockRgn(hSrc);
- return FALSE;
- }
-
- EMPTY_REGION(destObj);
- if(!REGION_CopyRegion(destObj, srcObj))
- {
- RGNDATA_UnlockRgn(hDest);
- RGNDATA_UnlockRgn(hSrc);
- return FALSE;
- }
+ if (!(srcObj = (PROSRGNDATA)RGNDATA_LockRgn(hSrc)))
+ {
+ return FALSE;
+ }
+ if (!REGION_NOT_EMPTY(srcObj))
+ {
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
+ if (!(destObj = (PROSRGNDATA)RGNDATA_LockRgn(hDest)))
+ {
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
- /* left-top */
- dx = x * 2;
- dy = y * 2;
- rc = (PRECT)srcObj->Buffer;
- for(i = 0; i < srcObj->rdh.nCount; i++)
- {
- rc->left += x;
- rc->top += y;
- rc->right += x;
- rc->bottom += y;
- rc++;
- }
- REGION_IntersectRegion(destObj, destObj, srcObj);
+ EMPTY_REGION(destObj);
+ if (!REGION_CopyRegion(destObj, srcObj))
+ {
+ RGNDATA_UnlockRgn(hDest);
+ RGNDATA_UnlockRgn(hSrc);
+ return FALSE;
+ }
- /* right-top */
- rc = (PRECT)srcObj->Buffer;
- for(i = 0; i < srcObj->rdh.nCount; i++)
- {
- rc->left -= dx;
- rc->right -= dx;
- rc++;
- }
- REGION_IntersectRegion(destObj, destObj, srcObj);
+ /* Original region moved to right */
+ rc = (PRECT)srcObj->Buffer;
+ for (i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left += x;
+ rc->right += x;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
- /* right-bottom */
- rc = (PRECT)srcObj->Buffer;
- for(i = 0; i < srcObj->rdh.nCount; i++)
- {
- rc->top -= dy;
- rc->bottom -= dy;
- rc++;
- }
- REGION_IntersectRegion(destObj, destObj, srcObj);
+ /* Original region moved to left */
+ rc = (PRECT)srcObj->Buffer;
+ for (i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left -= 2 * x;
+ rc->right -= 2 * x;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
- /* left-bottom */
- rc = (PRECT)srcObj->Buffer;
- for(i = 0; i < srcObj->rdh.nCount; i++)
- {
- rc->left += dx;
- rc->right += dx;
- rc++;
- }
- REGION_IntersectRegion(destObj, destObj, srcObj);
+ /* Original region moved down */
+ rc = (PRECT)srcObj->Buffer;
+ for (i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->left += x;
+ rc->right += x;
+ rc->top += y;
+ rc->bottom += y;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
+ /* Original region moved up */
+ rc = (PRECT)srcObj->Buffer;
+ for (i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->top -= 2 * y;
+ rc->bottom -= 2 * y;
+ rc++;
+ }
+ REGION_IntersectRegion(destObj, destObj, srcObj);
- rc = (PRECT)srcObj->Buffer;
- for(i = 0; i < srcObj->rdh.nCount; i++)
- {
- rc->left -= x;
- rc->top += y;
- rc->right -= x;
- rc->bottom += y;
- rc++;
- }
- REGION_SubtractRegion(destObj, srcObj, destObj);
+ /* Restore the original region */
+ rc = (PRECT)srcObj->Buffer;
+ for (i = 0; i < srcObj->rdh.nCount; i++)
+ {
+ rc->top += y;
+ rc->bottom += y;
+ rc++;
+ }
+ REGION_SubtractRegion(destObj, srcObj, destObj);
- RGNDATA_UnlockRgn(hDest);
- RGNDATA_UnlockRgn(hSrc);
- return TRUE;
+ RGNDATA_UnlockRgn(hDest);
+ RGNDATA_UnlockRgn(hSrc);
+ return TRUE;
}
@@ -1900,7 +1894,10 @@
{
if (1 == n)
{
- pReg->Buffer = &pReg->BuiltInRect;
+ /* Testing shows that > 95% of all regions have only 1 rect.
+ Including that here saves us from having to do another
+ allocation */
+ pReg->Buffer = &pReg->rdh.rcBound;
}
else
{
@@ -1931,7 +1928,7 @@
BOOL FASTCALL RGNDATA_InternalDelete( PROSRGNDATA pRgn )
{
ASSERT(pRgn);
- if(pRgn->Buffer && pRgn->Buffer != &pRgn->BuiltInRect)
+ if(pRgn->Buffer && pRgn->Buffer != &pRgn->rdh.rcBound)
ExFreePool(pRgn->Buffer);
return TRUE;
}
@@ -2383,10 +2380,13 @@
pbox->bottom += YOffset;
pbox++;
}
- rgn->rdh.rcBound.left += XOffset;
- rgn->rdh.rcBound.right += XOffset;
- rgn->rdh.rcBound.top += YOffset;
- rgn->rdh.rcBound.bottom += YOffset;
+ if (rgn->Buffer != &rgn->rdh.rcBound)
+ {
+ rgn->rdh.rcBound.left += XOffset;
+ rgn->rdh.rcBound.right += XOffset;
+ rgn->rdh.rcBound.top += YOffset;
+ rgn->rdh.rcBound.bottom += YOffset;
+ }
}
}
ret = rgn->rdh.iType;
@@ -2877,7 +2877,7 @@
if(reg->Buffer != NULL)
{
RtlCopyMemory(temp, reg->Buffer, reg->rdh.nCount * sizeof(RECT));
- if(reg->Buffer != ®->BuiltInRect)
+ if(reg->Buffer != ®->rdh.rcBound)
ExFreePool(reg->Buffer);
}
reg->Buffer = temp;
reactos/subsys/win32k/objects
diff -u -r1.97.2.1 -r1.97.2.2
--- text.c 27 Jun 2004 01:13:17 -0000 1.97.2.1
+++ text.c 30 Jun 2004 21:16:12 -0000 1.97.2.2
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: text.c,v 1.97.2.1 2004/06/27 01:13:17 hyperion Exp $ */
+/* $Id: text.c,v 1.97.2.2 2004/06/30 21:16:12 hyperion Exp $ */
#include <w32k.h>
#include <ft2build.h>
@@ -1579,59 +1579,6 @@
XStart = Start.x + dc->w.DCOrgX;
YStart = Start.y + dc->w.DCOrgY;
- TextObj = TEXTOBJ_LockText(dc->w.hFont);
-
- if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, &FontObj, &FontGDI)))
- {
- goto fail;
- }
-
- face = FontGDI->face;
- if (face->charmap == NULL)
- {
- DPRINT("WARNING: No charmap selected!\n");
- DPRINT("This font face has %d charmaps\n", face->num_charmaps);
-
- for (n = 0; n < face->num_charmaps; n++)
- {
- charmap = face->charmaps[n];
- DPRINT("found charmap encoding: %u\n", charmap->encoding);
- if (charmap->encoding != 0)
- {
- found = charmap;
- break;
- }
- }
- if (!found)
- DPRINT1("WARNING: Could not find desired charmap!\n");
- IntLockFreeType;
- error = FT_Set_Charmap(face, found);
- IntUnLockFreeType;
- if (error)
- DPRINT1("WARNING: Could not set the charmap!\n");
- }
-
- Render = IntIsFontRenderingEnabled();
- if (Render)
- RenderMode = IntGetFontRenderMode(&TextObj->logfont);
- else
- RenderMode = FT_RENDER_MODE_MONO;
-
- IntLockFreeType;
- error = FT_Set_Pixel_Sizes(
- face,
- /* FIXME should set character height if neg */
- (TextObj->logfont.lfHeight < 0 ?
- - TextObj->logfont.lfHeight :
- TextObj->logfont.lfHeight),
- TextObj->logfont.lfWidth);
- IntUnLockFreeType;
- if (error)
- {
- DPRINT1("Error in setting pixel sizes: %u\n", error);
- goto fail;
- }
-
/* Create the brushes */
PalDestGDI = PALETTE_LockPalette(dc->w.hPalette);
if ( !PalDestGDI )
@@ -1695,6 +1642,59 @@
}
}
+ TextObj = TEXTOBJ_LockText(dc->w.hFont);
+
+ if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, &FontObj, &FontGDI)))
+ {
+ goto fail;
+ }
+
+ face = FontGDI->face;
+ if (face->charmap == NULL)
+ {
+ DPRINT("WARNING: No charmap selected!\n");
+ DPRINT("This font face has %d charmaps\n", face->num_charmaps);
+
+ for (n = 0; n < face->num_charmaps; n++)
+ {
+ charmap = face->charmaps[n];
+ DPRINT("found charmap encoding: %u\n", charmap->encoding);
+ if (charmap->encoding != 0)
+ {
+ found = charmap;
+ break;
+ }
+ }
+ if (!found)
+ DPRINT1("WARNING: Could not find desired charmap!\n");
+ IntLockFreeType;
+ error = FT_Set_Charmap(face, found);
+ IntUnLockFreeType;
+ if (error)
+ DPRINT1("WARNING: Could not set the charmap!\n");
+ }
+
+ Render = IntIsFontRenderingEnabled();
+ if (Render)
+ RenderMode = IntGetFontRenderMode(&TextObj->logfont);
+ else
+ RenderMode = FT_RENDER_MODE_MONO;
+
+ IntLockFreeType;
+ error = FT_Set_Pixel_Sizes(
+ face,
+ /* FIXME should set character height if neg */
+ (TextObj->logfont.lfHeight < 0 ?
+ - TextObj->logfont.lfHeight :
+ TextObj->logfont.lfHeight),
+ TextObj->logfont.lfWidth);
+ IntUnLockFreeType;
+ if (error)
+ {
+ DPRINT1("Error in setting pixel sizes: %u\n", error);
+ goto fail;
+ }
+
/*
* Process the vertical alignment and determine the yoff.
*/
@@ -1994,6 +1994,7 @@
FT_Face face;
FT_CharMap charmap, found = NULL;
UINT i, glyph_index, BufferSize;
+ HFONT hFont;
if (LastChar < FirstChar)
{
@@ -2016,10 +2017,17 @@
SetLastWin32Error(ERROR_INVALID_HANDLE);
return FALSE;
}
- TextObj = TEXTOBJ_LockText(dc->w.hFont);
+ TextObj = TEXTOBJ_LockText(hFont);
+ hFont = dc->w.hFont;
DC_UnlockDc(hDC);
- GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI);
+ if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI)))
+ {
+ ExFreePool(SafeBuffer);
+ SetLastWin32Error(ERROR_INVALID_HANDLE);
+ TEXTOBJ_UnlockText(hFont);
+ return FALSE;
+ }
face = FontGDI->face;
if (face->charmap == NULL)
@@ -2062,7 +2070,7 @@
SafeBuffer[i - FirstChar] = face->glyph->advance.x >> 6;
}
IntUnLockFreeType;
- TEXTOBJ_UnlockText(dc->w.hFont);
+ TEXTOBJ_UnlockText(hFont);
MmCopyToCaller(Buffer, SafeBuffer, BufferSize);
ExFreePool(SafeBuffer);
return TRUE;
@@ -2161,7 +2169,11 @@
FT_CharMap charmap, found = NULL;
BOOL use_kerning;
- GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI);
+ if (!NT_SUCCESS(GetFontObjectsFromTextObj(TextObj, NULL, NULL, &FontGDI)))
+ {
+ return FALSE;
+ }
+
face = FontGDI->face;
if (NULL != Fit)
{
reactos/w32api/include
diff -u -r1.1 -r1.1.8.1
--- prsht.h 21 Feb 2004 09:20:34 -0000 1.1
+++ prsht.h 30 Jun 2004 21:16:13 -0000 1.1.8.1
@@ -60,6 +60,9 @@
#endif
#define PSCB_INITIALIZED 1
#define PSCB_PRECREATE 2
+#if (_WIN32_IE >= 0x560)
+#define PSCB_BUTTONPRESSED 3
+#endif /* _WIN32_IE >= 0x560 */
#define PSM_GETTABCONTROL 1140
#define PSM_GETCURRENTPAGEHWND 1142
#define PSM_ISDIALOGMESSAGE 1141
@@ -82,7 +85,7 @@
#define PSNRET_INVALID 1
#define PSNRET_INVALID_NOCHANGEPAGE 2
#define ID_PSRESTARTWINDOWS 2
-#define ID_PSREBOOTSYSTEM 3
+#define ID_PSREBOOTSYSTEM 3
#define WIZ_CXDLG 276
#define WIZ_CYDLG 140
#define WIZ_CXBMP 80
reactos/w32api/include
diff -u -r1.1 -r1.1.8.1
--- shlguid.h 21 Feb 2004 09:20:34 -0000 1.1
+++ shlguid.h 30 Jun 2004 21:16:13 -0000 1.1.8.1
@@ -9,8 +9,14 @@
#endif
#define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
#define SID_SShellBrowser IID_IShellBrowser
+extern const GUID CLSID_MyComputer;
extern const GUID CLSID_ShellDesktop;
extern const GUID CLSID_ShellLink;
+extern const GUID CLSID_ControlPanel;
+extern const GUID CLSID_Internet;
+extern const GUID CLSID_NetworkPlaces;
+extern const GUID CLSID_RecycleBin;
+extern const GUID CLSID_ShellFSFolder;
extern const GUID FMTID_Intshcut;
extern const GUID FMTID_InternetSite;
extern const GUID CGID_Explorer;
reactos/w32api/include
diff -u -r1.2 -r1.2.8.1
--- shlobj.h 28 Feb 2004 20:14:33 -0000 1.2
+++ shlobj.h 30 Jun 2004 21:16:13 -0000 1.2.8.1
@@ -332,6 +332,50 @@
#define SVGIO_ALLVIEW 2
#define SV2GV_CURRENTVIEW ((UINT)-1)
#define SV2GV_DEFAULTVIEW ((UINT)-2)
+#define SHCNE_RENAMEITEM 0x00000001
+#define SHCNE_CREATE 0x00000002
+#define SHCNE_DELETE 0x00000004
+#define SHCNE_MKDIR 0x00000008
+#define SHCNE_RMDIR 0x00000010
+#define SHCNE_MEDIAINSERTED 0x00000020
+#define SHCNE_MEDIAREMOVED 0x00000040
+#define SHCNE_DRIVEREMOVED 0x00000080
+#define SHCNE_DRIVEADD 0x00000100
+#define SHCNE_NETSHARE 0x00000200
+#define SHCNE_NETUNSHARE 0x00000400
+#define SHCNE_ATTRIBUTES 0x00000800
+#define SHCNE_UPDATEDIR 0x00001000
+#define SHCNE_UPDATEITEM 0x00002000
+#define SHCNE_SERVERDISCONNECT 0x00004000
+#define SHCNE_UPDATEIMAGE 0x00008000
+#define SHCNE_DRIVEADDGUI 0x00010000
+#define SHCNE_RENAMEFOLDER 0x00020000
+#define SHCNE_FREESPACE 0x00040000
+#define SHCNE_EXTENDED_EVENT 0x04000000
+#define SHCNE_ASSOCCHANGED 0x08000000
+#define SHCNE_DISKEVENTS 0x0002381F
+#define SHCNE_GLOBALEVENTS 0x0C0581E0
+#define SHCNE_ALLEVENTS 0x7FFFFFFF
+#define SHCNE_INTERRUPT 0x80000000
+#define SHCNEE_ORDERCHANGED 0x0002L
+#define SHCNEE_MSI_CHANGE 0x0004L
+#define SHCNEE_MSI_UNINSTALL 0x0005L
+#define SHCNF_IDLIST 0x0000
+#define SHCNF_PATHA 0x0001
+#define SHCNF_PRINTERA 0x0002
+#define SHCNF_DWORD 0x0003
+#define SHCNF_PATHW 0x0005
+#define SHCNF_PRINTERW 0x0006
+#define SHCNF_TYPE 0x00FF
+#define SHCNF_FLUSH 0x1000
+#define SHCNF_FLUSHNOWAIT 0x2000
+#ifdef UNICODE
+#define SHCNF_PATH SHCNF_PATHW
+#define SHCNF_PRINTER SHCNF_PRINTERW
+#else
+#define SHCNF_PATH SHCNF_PATHA
+#define SHCNF_PRINTER SHCNF_PRINTERA
+#endif
typedef ULONG SFGAOF;
typedef DWORD SHGDNF;
@@ -516,6 +560,205 @@
int csidl;
} PERSIST_FOLDER_TARGET_INFO;
#endif
+typedef struct _SHChangeNotifyEntry
+{
+ LPCITEMIDLIST pidl;
+ BOOL fRecursive;
+} SHChangeNotifyEntry;
+#define NUM_POINTS 3
+typedef struct
+{
+ int iNextSample;
+ DWORD dwLastScroll;
+ BOOL bFull;
+ POINT pts[NUM_POINTS];
+ DWORD dwTimes[NUM_POINTS];
+} AUTO_SCROLL_DATA;
+typedef struct
+{
+ WORD cLength;
+ WORD nVersion;
+ BOOL fFullPathTitle:1;
+ BOOL fSaveLocalView:1;
+ BOOL fNotShell:1;
+ BOOL fSimpleDefault:1;
+ BOOL fDontShowDescBar:1;
+ BOOL fNewWindowMode:1;
+ BOOL fShowCompColor:1;
+ BOOL fDontPrettyNames:1;
+ BOOL fAdminsCreateCommonGroups:1;
+ UINT fUnusedFlags:7;
+ UINT fMenuEnumFilter;
+} CABINETSTATE, *LPCABINETSTATE;
+typedef enum RESTRICTIONS
+{
+ REST_NONE = 0x00000000,
+ REST_NORUN = 0x00000001,
+ REST_NOCLOSE = 0x00000002,
+ REST_NOSAVESET = 0x00000004,
+ REST_NOFILEMENU = 0x00000008,
+ REST_NOSETFOLDERS = 0x00000010,
+ REST_NOSETTASKBAR = 0x00000020,
+ REST_NODESKTOP = 0x00000040,
+ REST_NOFIND = 0x00000080,
+ REST_NODRIVES = 0x00000100,
+ REST_NODRIVEAUTORUN = 0x00000200,
+ REST_NODRIVETYPEAUTORUN = 0x00000400,
+ REST_NONETHOOD = 0x00000800,
+ REST_STARTBANNER = 0x00001000,
+ REST_RESTRICTRUN = 0x00002000,
+ REST_NOPRINTERTABS = 0x00004000,
+ REST_NOPRINTERDELETE = 0x00008000,
+ REST_NOPRINTERADD = 0x00010000,
+ REST_NOSTARTMENUSUBFOLDERS = 0x00020000,
+ REST_MYDOCSONNET = 0x00040000,
+ REST_NOEXITTODOS = 0x00080000,
+ REST_ENFORCESHELLEXTSECURITY = 0x00100000,
+ REST_LINKRESOLVEIGNORELINKINFO = 0x00200000,
+ REST_NOCOMMONGROUPS = 0x00400000,
+ REST_SEPARATEDESKTOPPROCESS = 0x00800000,
+ REST_NOWEB = 0x01000000,
+ REST_NOTRAYCONTEXTMENU = 0x02000000,
+ REST_NOVIEWCONTEXTMENU = 0x04000000,
+ REST_NONETCONNECTDISCONNECT = 0x08000000,
+ REST_STARTMENULOGOFF = 0x10000000,
+ REST_NOSETTINGSASSIST = 0x20000000,
+ REST_NOINTERNETICON = 0x40000001,
+ REST_NORECENTDOCSHISTORY,
+ REST_NORECENTDOCSMENU,
+ REST_NOACTIVEDESKTOP,
+ REST_NOACTIVEDESKTOPCHANGES,
+ REST_NOFAVORITESMENU,
+ REST_CLEARRECENTDOCSONEXIT,
+ REST_CLASSICSHELL,
+ REST_NOCUSTOMIZEWEBVIEW,
+
+ REST_NOHTMLWALLPAPER = 0x40000010,
+ REST_NOCHANGINGWALLPAPER,
+ REST_NODESKCOMP,
+ REST_NOADDDESKCOMP,
+ REST_NODELDESKCOMP,
+ REST_NOCLOSEDESKCOMP,
+ REST_NOCLOSE_DRAGDROPBAND,
+ REST_NOMOVINGBAND,
+ REST_NOEDITDESKCOMP,
+ REST_NORESOLVESEARCH,
+ REST_NORESOLVETRACK,
+ REST_FORCECOPYACLWITHFILE,
+ REST_NOLOGO3CHANNELNOTIFY,
+ REST_NOFORGETSOFTWAREUPDATE,
+ REST_NOSETACTIVEDESKTOP,
+ REST_NOUPDATEWINDOWS,
+ REST_NOCHANGESTARMENU, /* 0x40000020 */
+ REST_NOFOLDEROPTIONS,
+ REST_HASFINDCOMPUTERS,
+ REST_INTELLIMENUS,
+ REST_RUNDLGMEMCHECKBOX,
+ REST_ARP_ShowPostSetup,
+ REST_NOCSC,
+ REST_NOCONTROLPANEL,
+ REST_ENUMWORKGROUP,
+ REST_ARP_NOARP,
+ REST_ARP_NOREMOVEPAGE,
+ REST_ARP_NOADDPAGE,
+ REST_ARP_NOWINSETUPPAGE,
+ REST_GREYMSIADS,
+ REST_NOCHANGEMAPPEDDRIVELABEL,
+ REST_NOCHANGEMAPPEDDRIVECOMMENT,
+ REST_MaxRecentDocs, /* 0x40000030 */
+ REST_NONETWORKCONNECTIONS,
+ REST_FORCESTARTMENULOGOFF,
+ REST_NOWEBVIEW,
+ REST_NOCUSTOMIZETHISFOLDER,
+ REST_NOENCRYPTION,
+
+ REST_ALLOWFRENCHENCRYPTION, /* not documented */
+
+ REST_DONTSHOWSUPERHIDDEN,
+ REST_NOSHELLSEARCHBUTTON,
+ REST_NOHARDWARETAB,
+ REST_NORUNASINSTALLPROMPT,
+ REST_PROMPTRUNASINSTALLNETPATH,
+ REST_NOMANAGEMYCOMPUTERVERB,
+ REST_NORECENTDOCSNETHOOD,
+ REST_DISALLOWRUN,
+ REST_NOWELCOMESCREEN,
+ REST_RESTRICTCPL, /* 0x40000040 */
+ REST_DISALLOWCPL,
+ REST_NOSMBALLOONTIP,
+ REST_NOSMHELP,
+ REST_NOWINKEYS,
+ REST_NOENCRYPTONMOVE,
+ REST_NOLOCALMACHINERUN,
+ REST_NOCURRENTUSERRUN,
+ REST_NOLOCALMACHINERUNONCE,
+ REST_NOCURRENTUSERRUNONCE,
+ REST_FORCEACTIVEDESKTOPON,
+ REST_NOCOMPUTERSNEARME,
+ REST_NOVIEWONDRIVE,
+ REST_NONETCRAWL,
+ REST_NOSHAREDDOCUMENTS,
+ REST_NOSMMYDOCS,
+ REST_NOSMMYPICS, /* 0x40000050 */
+ REST_ALLOWBITBUCKDRIVES,
+ REST_NONLEGACYSHELLMODE,
+ REST_NOCONTROLPANELBARRICADE,
+ REST_NOSTARTPAGE,
+ REST_NOAUTOTRAYNOTIFY,
+ REST_NOTASKGROUPING,
+ REST_NOCDBURNING,
+ REST_MYCOMPNOPROP,
+ REST_MYDOCSNOPROP,
+ REST_NOSTARTPANEL,
+ REST_NODISPLAYAPPEARANCEPAGE,
+ REST_NOTHEMESTAB,
+ REST_NOVISUALSTYLECHOICE,
+ REST_NOSIZECHOICE,
+ REST_NOCOLORCHOICE,
+ REST_SETVISUALSTYLE, /* 0x40000060 */
+ REST_STARTRUNNOHOMEPATH,
+ REST_NOUSERNAMEINSTARTPANEL,
+ REST_NOMYCOMPUTERICON,
+ REST_NOSMNETWORKPLACES,
+ REST_NOSMPINNEDLIST,
+ REST_NOSMMYMUSIC,
+ REST_NOSMEJECTPC,
+ REST_NOSMMOREPROGRAMS,
+ REST_NOSMMFUPROGRAMS,
+ REST_NOTRAYITEMSDISPLAY,
+ REST_NOTOOLBARSONTASKBAR,
+ /* 0x4000006C
+ 0x4000006D
+ 0x4000006E */
+ REST_NOSMCONFIGUREPROGRAMS = 0x4000006F,
+ REST_HIDECLOCK, /* 0x40000070 */
+ REST_NOLOWDISKSPACECHECKS,
+ REST_NOENTIRENETWORK,
+ REST_NODESKTOPCLEANUP,
+ REST_BITBUCKNUKEONDELETE,
+ REST_BITBUCKCONFIRMDELETE,
+ REST_BITBUCKNOPROP,
+ REST_NODISPBACKGROUND,
+ REST_NODISPSCREENSAVEPG,
+ REST_NODISPSETTINGSPG,
+ REST_NODISPSCREENSAVEPREVIEW,
+ REST_NODISPLAYCPL,
+ REST_HIDERUNASVERB,
+ REST_NOTHUMBNAILCACHE,
+ REST_NOSTRCMPLOGICAL,
+ REST_NOPUBLISHWIZARD,
+ REST_NOONLINEPRINTSWIZARD, /* 0x40000080 */
+ REST_NOWEBSERVICES,
+ REST_ALLOWUNHASHEDWEBVIEW,
+ REST_ALLOWLEGACYWEBVIEW,
+ REST_REVERTWEBVIEWSECURITY,
+
+ REST_INHERITCONSOLEHANDLES = 0x40000086,
+
+ REST_NODISCONNECT = 0x41000001,
+ REST_NOSECURITY,
+ REST_NOFILEASSOCIATE, /* 0x41000003 */
+} RESTRICTIONS;
DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
typedef IEnumIDList *LPENUMIDLIST;
@@ -848,7 +1091,7 @@
#define IShellFolder_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
#define IShellFolder_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
#define IShellFolder_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
-#define IShellFolder_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
+#define IShellFolder_CreateViewObject(T,a,b,c) (T)->lpVtbl->CreateViewObject(T,a,b,c)
#define IShellFolder_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
#define IShellFolder_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
#define IShellFolder_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
@@ -1394,6 +1637,12 @@
HRESULT WINAPI SHCoCreateInstance(LPCWSTR,REFCLSID,IUnknown*,REFIID,void**);
#endif
+int WINAPI RestartDialog(HWND,LPCWSTR,UINT);
+int WINAPI RestartDialogEx(HWND,LPCWSTR,UINT,UINT);
+
+ULONG WINAPI SHChangeNotifyRegister(HWND,int,LONG,UINT,int,SHChangeNotifyEntry *);
+BOOL WINAPI SHChangeNotifyDeregister(ULONG);
+
#ifdef UNICODE
typedef IShellExecuteHookW IShellExecuteHook;
typedef IShellLinkW IShellLink;
reactos/w32api/include
diff -u -r1.1 -r1.1.8.1
--- winnetwk.h 21 Feb 2004 09:20:34 -0000 1.1
+++ winnetwk.h 30 Jun 2004 21:16:13 -0000 1.1.8.1
@@ -277,7 +277,7 @@
DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
-DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEA,LPVOID,LPDWORD,LPWSTR*);
+DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
CVSspam 0.2.8