ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
May 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
19 participants
377 discussions
Start a n
N
ew thread
[jimtabor] 22096: Implement NtGdiGetOutlineTextMetrics and GetOutlineTextMetricsA/W. GetOutlineTextMetricsA is from Wine. Tested with Mozilla 1.7.12.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Mon May 29 02:49:52 2006 New Revision: 22096 URL:
http://svn.reactos.ru/svn/reactos?rev=22096&view=rev
Log: Implement NtGdiGetOutlineTextMetrics and GetOutlineTextMetricsA/W. GetOutlineTextMetricsA is from Wine. Tested with Mozilla 1.7.12. Modified: trunk/reactos/dll/win32/gdi32/objects/font.c trunk/reactos/subsystems/win32/win32k/objects/text.c Modified: trunk/reactos/dll/win32/gdi32/objects/font.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/fon…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/font.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/font.c Mon May 29 02:49:52 2006 @@ -14,6 +14,33 @@ #include <debug.h> #define INITIAL_FAMILY_COUNT 64 + +/*********************************************************************** + * TEXTMETRIC conversion functions. + */ +static void FONT_TextMetricWToA(const TEXTMETRICW *ptmW, LPTEXTMETRICA ptmA ) +{ + ptmA->tmHeight = ptmW->tmHeight; + ptmA->tmAscent = ptmW->tmAscent; + ptmA->tmDescent = ptmW->tmDescent; + ptmA->tmInternalLeading = ptmW->tmInternalLeading; + ptmA->tmExternalLeading = ptmW->tmExternalLeading; + ptmA->tmAveCharWidth = ptmW->tmAveCharWidth; + ptmA->tmMaxCharWidth = ptmW->tmMaxCharWidth; + ptmA->tmWeight = ptmW->tmWeight; + ptmA->tmOverhang = ptmW->tmOverhang; + ptmA->tmDigitizedAspectX = ptmW->tmDigitizedAspectX; + ptmA->tmDigitizedAspectY = ptmW->tmDigitizedAspectY; + ptmA->tmFirstChar = ptmW->tmFirstChar > 255 ? 255 : ptmW->tmFirstChar; + ptmA->tmLastChar = ptmW->tmLastChar > 255 ? 255 : ptmW->tmLastChar; + ptmA->tmDefaultChar = ptmW->tmDefaultChar > 255 ? 255 : ptmW->tmDefaultChar; + ptmA->tmBreakChar = ptmW->tmBreakChar > 255 ? 255 : ptmW->tmBreakChar; + ptmA->tmItalic = ptmW->tmItalic; + ptmA->tmUnderlined = ptmW->tmUnderlined; + ptmA->tmStruckOut = ptmW->tmStruckOut; + ptmA->tmPitchAndFamily = ptmW->tmPitchAndFamily; + ptmA->tmCharSet = ptmW->tmCharSet; +} static BOOL FASTCALL MetricsCharConvert(WCHAR w, UCHAR *b) @@ -538,6 +565,160 @@ return NtGdiGetGlyphOutline ( hdc, uChar, uFormat, lpgm, cbBuffer, lpvBuffer, (CONST LPMAT2)lpmat2, TRUE); } + +/* + * @implemented + */ +UINT +APIENTRY +GetOutlineTextMetricsA( + HDC hdc, + UINT cbData, + LPOUTLINETEXTMETRICA lpOTM + ) +{ + char buf[512], *ptr; + UINT ret, needed; + OUTLINETEXTMETRICW *lpOTMW = (OUTLINETEXTMETRICW *)buf; + OUTLINETEXTMETRICA *output = lpOTM; + INT left, len; + + if((ret = GetOutlineTextMetricsW(hdc, 0, NULL)) == 0) + return 0; + if(ret > sizeof(buf)) + lpOTMW = HeapAlloc(GetProcessHeap(), 0, ret); + GetOutlineTextMetricsW(hdc, ret, lpOTMW); + + needed = sizeof(OUTLINETEXTMETRICA); + if(lpOTMW->otmpFamilyName) + needed += WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1, + NULL, 0, NULL, NULL); + if(lpOTMW->otmpFaceName) + needed += WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1, + NULL, 0, NULL, NULL); + if(lpOTMW->otmpStyleName) + needed += WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1, + NULL, 0, NULL, NULL); + if(lpOTMW->otmpFullName) + needed += WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1, + NULL, 0, NULL, NULL); + + if(!lpOTM) { + ret = needed; + goto end; + } + + DPRINT("needed = %d\n", needed); + if(needed > cbData) + /* Since the supplied buffer isn't big enough, we'll alloc one + that is and memcpy the first cbData bytes into the lpOTM at + the end. */ + output = HeapAlloc(GetProcessHeap(), 0, needed); + + ret = output->otmSize = min(needed, cbData); + FONT_TextMetricWToA( &lpOTMW->otmTextMetrics, &output->otmTextMetrics ); + output->otmFiller = 0; + output->otmPanoseNumber = lpOTMW->otmPanoseNumber; + output->otmfsSelection = lpOTMW->otmfsSelection; + output->otmfsType = lpOTMW->otmfsType; + output->otmsCharSlopeRise = lpOTMW->otmsCharSlopeRise; + output->otmsCharSlopeRun = lpOTMW->otmsCharSlopeRun; + output->otmItalicAngle = lpOTMW->otmItalicAngle; + output->otmEMSquare = lpOTMW->otmEMSquare; + output->otmAscent = lpOTMW->otmAscent; + output->otmDescent = lpOTMW->otmDescent; + output->otmLineGap = lpOTMW->otmLineGap; + output->otmsCapEmHeight = lpOTMW->otmsCapEmHeight; + output->otmsXHeight = lpOTMW->otmsXHeight; + output->otmrcFontBox = lpOTMW->otmrcFontBox; + output->otmMacAscent = lpOTMW->otmMacAscent; + output->otmMacDescent = lpOTMW->otmMacDescent; + output->otmMacLineGap = lpOTMW->otmMacLineGap; + output->otmusMinimumPPEM = lpOTMW->otmusMinimumPPEM; + output->otmptSubscriptSize = lpOTMW->otmptSubscriptSize; + output->otmptSubscriptOffset = lpOTMW->otmptSubscriptOffset; + output->otmptSuperscriptSize = lpOTMW->otmptSuperscriptSize; + output->otmptSuperscriptOffset = lpOTMW->otmptSuperscriptOffset; + output->otmsStrikeoutSize = lpOTMW->otmsStrikeoutSize; + output->otmsStrikeoutPosition = lpOTMW->otmsStrikeoutPosition; + output->otmsUnderscoreSize = lpOTMW->otmsUnderscoreSize; + output->otmsUnderscorePosition = lpOTMW->otmsUnderscorePosition; + + + ptr = (char*)(output + 1); + left = needed - sizeof(*output); + + if(lpOTMW->otmpFamilyName) { + output->otmpFamilyName = (LPSTR)(ptr - (char*)output); + len = WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFamilyName), -1, + ptr, left, NULL, NULL); + left -= len; + ptr += len; + } else + output->otmpFamilyName = 0; + + if(lpOTMW->otmpFaceName) { + output->otmpFaceName = (LPSTR)(ptr - (char*)output); + len = WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFaceName), -1, + ptr, left, NULL, NULL); + left -= len; + ptr += len; + } else + output->otmpFaceName = 0; + + if(lpOTMW->otmpStyleName) { + output->otmpStyleName = (LPSTR)(ptr - (char*)output); + len = WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpStyleName), -1, + ptr, left, NULL, NULL); + left -= len; + ptr += len; + } else + output->otmpStyleName = 0; + + if(lpOTMW->otmpFullName) { + output->otmpFullName = (LPSTR)(ptr - (char*)output); + len = WideCharToMultiByte(CP_ACP, 0, + (WCHAR*)((char*)lpOTMW + (int)lpOTMW->otmpFullName), -1, + ptr, left, NULL, NULL); + left -= len; + } else + output->otmpFullName = 0; + + assert(left == 0); + + if(output != lpOTM) { + memcpy(lpOTM, output, cbData); + HeapFree(GetProcessHeap(), 0, output); + } + +end: + if(lpOTMW != (OUTLINETEXTMETRICW *)buf) + HeapFree(GetProcessHeap(), 0, lpOTMW); + + return ret; +} + + +/* + * @implemented + */ +UINT +APIENTRY +GetOutlineTextMetricsW( + HDC hdc, + UINT cbData, + LPOUTLINETEXTMETRICW lpOTM + ) +{ + return NtGdiGetOutlineTextMetrics(hdc, cbData, lpOTM); +} /* Modified: trunk/reactos/subsystems/win32/win32k/objects/text.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/text.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/text.c Mon May 29 02:49:52 2006 @@ -2143,15 +2143,68 @@ return 0; } +/* + From "Undocumented Windows 2000 Secrets" Appendix B, Table B-2, page + 472, this is NtGdiGetOutlineTextMetricsInternalW. + */ UINT STDCALL NtGdiGetOutlineTextMetrics(HDC hDC, UINT Data, LPOUTLINETEXTMETRICW otm) { - UNIMPLEMENTED; - return 0; -} + PDC dc; + PTEXTOBJ TextObj; + PFONTGDI FontGDI; + HFONT hFont = 0; + ULONG Size; + OUTLINETEXTMETRICW *potm; + NTSTATUS Status; + + dc = DC_LockDc(hDC); + if (dc == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return 0; + } + hFont = dc->w.hFont; + TextObj = TEXTOBJ_LockText(hFont); + DC_UnlockDc(dc); + if (TextObj == NULL) + { + SetLastWin32Error(ERROR_INVALID_HANDLE); + return 0; + } + FontGDI = ObjToGDI(TextObj->Font, FONT); + TEXTOBJ_UnlockText(TextObj); + Size = IntGetOutlineTextMetrics(FontGDI, 0, NULL); + if (!otm) return Size; + if (Size > Data) + { + SetLastWin32Error(ERROR_INSUFFICIENT_BUFFER); + return 0; + } + potm = ExAllocatePoolWithTag(PagedPool, Size, TAG_GDITEXT); + if (NULL == potm) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + IntGetOutlineTextMetrics(FontGDI, Size, potm); + if (otm) + { + Status = MmCopyToCaller(otm, potm, Size); + if (! NT_SUCCESS(Status)) + { + SetLastWin32Error(ERROR_INVALID_PARAMETER); + ExFreePool(potm); + return 0; + } + } + ExFreePool(potm); + return Size; +} + BOOL APIENTRY
18 years, 7 months
1
0
0
0
[hpoussin] 22095: Better handling of errors/special cases
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon May 29 01:43:45 2006 New Revision: 22095 URL:
http://svn.reactos.ru/svn/reactos?rev=22095&view=rev
Log: Better handling of errors/special cases Modified: trunk/reactos/drivers/base/green/dispatch.c trunk/reactos/drivers/base/green/green.h trunk/reactos/drivers/base/green/green.inf trunk/reactos/drivers/base/green/pnp.c Modified: trunk/reactos/drivers/base/green/dispatch.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/base/green/dispatch…
============================================================================== --- trunk/reactos/drivers/base/green/dispatch.c (original) +++ trunk/reactos/drivers/base/green/dispatch.c Mon May 29 01:43:45 2006 @@ -76,7 +76,26 @@ { DPRINT1("Unknown combination: MajorFunction 0x%lx, DeviceType %d\n", MajorFunction, DeviceType); - ASSERT(FALSE); + switch (DeviceType) + { + case KeyboardFDO: + case ScreenFDO: + { + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(((PCOMMON_FDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice, Irp); + } + case GreenFDO: + { + PDRIVER_OBJECT DriverObject; + PGREEN_DRIVER_EXTENSION DriverExtension; + DriverObject = DeviceObject->DriverObject; + DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(DriverExtension->LowerDevice, Irp); + } + default: + ASSERT(FALSE); + } } Irp->IoStatus.Information = Information; Modified: trunk/reactos/drivers/base/green/green.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/base/green/green.h?…
============================================================================== --- trunk/reactos/drivers/base/green/green.h (original) +++ trunk/reactos/drivers/base/green/green.h Mon May 29 01:43:45 2006 @@ -105,6 +105,7 @@ ULONG SampleRate; PDEVICE_OBJECT GreenMainDO; + PDEVICE_OBJECT LowerDevice; } GREEN_DRIVER_EXTENSION, *PGREEN_DRIVER_EXTENSION; /************************************ createclose.c */ Modified: trunk/reactos/drivers/base/green/green.inf URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/base/green/green.in…
============================================================================== --- trunk/reactos/drivers/base/green/green.inf (original) +++ trunk/reactos/drivers/base/green/green.inf Mon May 29 01:43:45 2006 @@ -38,9 +38,9 @@ StartType = 1 ErrorControl = 0 ServiceBinary = %12%\green.sys -LoadOrderGroup = Video Init +LoadOrderGroup = Extended base Description = %GREEN.DriverDesc% -Dependencies = blue +Dependencies = blue, serial [Green_AddReg.NT] HKLM,"SYSTEM\CurrentControlSet\Services\green\Parameters","AttachedDevice",0x00000000,"\Device\Serial1" Modified: trunk/reactos/drivers/base/green/pnp.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/drivers/base/green/pnp.c?re…
============================================================================== --- trunk/reactos/drivers/base/green/pnp.c (original) +++ trunk/reactos/drivers/base/green/pnp.c Mon May 29 01:43:45 2006 @@ -26,7 +26,8 @@ DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); - Status = IoCreateDevice(DriverObject, + Status = IoCreateDevice( + DriverObject, sizeof(GREEN_DEVICE_EXTENSION), NULL, FILE_DEVICE_TERMSRV, @@ -43,7 +44,7 @@ RtlZeroMemory(DeviceExtension, sizeof(GREEN_DEVICE_EXTENSION)); DeviceExtension->Common.Type = GreenFDO; DriverExtension->GreenMainDO->Flags |= DO_POWER_PAGABLE; - IoAttachDeviceToDeviceStack(DriverExtension->GreenMainDO, GreenPdo); + DriverExtension->LowerDevice = IoAttachDeviceToDeviceStack(DriverExtension->GreenMainDO, GreenPdo); /* Initialize serial port */ InitializeObjectAttributes(&ObjectAttributes, &DriverExtension->AttachedDeviceName, OBJ_KERNEL_HANDLE, NULL, NULL); @@ -119,10 +120,18 @@ { if (DeviceExtension && DeviceExtension->Serial) ObDereferenceObject(DeviceExtension->Serial); - if (DriverExtension && DriverExtension->GreenMainDO) - { - IoDeleteDevice(DriverExtension->GreenMainDO); - DriverExtension->GreenMainDO = NULL; + if (DriverExtension) + { + if (DriverExtension->LowerDevice) + { + IoDetachDevice(DriverExtension->LowerDevice); + DriverExtension->LowerDevice = NULL; + } + if (DriverExtension->GreenMainDO) + { + IoDeleteDevice(DriverExtension->GreenMainDO); + DriverExtension->GreenMainDO = NULL; + } } } return Status; @@ -219,39 +228,45 @@ DeviceExtension = (PGREEN_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Create PDOs for keyboard and screen */ - Status = IoCreateDevice( - DeviceObject->DriverObject, - sizeof(COMMON_DEVICE_EXTENSION), - NULL, - FILE_DEVICE_KEYBOARD, - FILE_AUTOGENERATED_DEVICE_NAME | FILE_DEVICE_SECURE_OPEN, - FALSE, - &DeviceExtension->KeyboardPdo); - if (!NT_SUCCESS(Status)) - { - DPRINT("IoCreateDevice() failed with status 0x%lx\n", Status); - goto cleanup; - } - ((PCOMMON_DEVICE_EXTENSION)DeviceExtension->KeyboardPdo->DeviceExtension)->Type = KeyboardPDO; - DeviceExtension->KeyboardPdo->Flags |= DO_POWER_PAGABLE | DO_BUS_ENUMERATED_DEVICE; - DeviceExtension->KeyboardPdo->Flags &= ~DO_DEVICE_INITIALIZING; - - Status = IoCreateDevice( - DeviceObject->DriverObject, - sizeof(COMMON_DEVICE_EXTENSION), - NULL, - FILE_DEVICE_SCREEN, - FILE_AUTOGENERATED_DEVICE_NAME | FILE_DEVICE_SECURE_OPEN, - FALSE, - &DeviceExtension->ScreenPdo); - if (!NT_SUCCESS(Status)) - { - DPRINT("IoCreateDevice() failed with status 0x%lx\n", Status); - goto cleanup; - } - ((PCOMMON_DEVICE_EXTENSION)DeviceExtension->ScreenPdo->DeviceExtension)->Type = ScreenPDO; - DeviceExtension->ScreenPdo->Flags |= DO_POWER_PAGABLE | DO_BUS_ENUMERATED_DEVICE; - DeviceExtension->ScreenPdo->Flags &= ~DO_DEVICE_INITIALIZING; + if (DeviceExtension->KeyboardPdo == NULL) + { + Status = IoCreateDevice( + DeviceObject->DriverObject, + sizeof(COMMON_DEVICE_EXTENSION), + NULL, + FILE_DEVICE_KEYBOARD, + FILE_AUTOGENERATED_DEVICE_NAME | FILE_DEVICE_SECURE_OPEN, + FALSE, + &DeviceExtension->KeyboardPdo); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoCreateDevice() failed with status 0x%lx\n", Status); + goto cleanup; + } + ((PCOMMON_DEVICE_EXTENSION)DeviceExtension->KeyboardPdo->DeviceExtension)->Type = KeyboardPDO; + DeviceExtension->KeyboardPdo->Flags |= DO_POWER_PAGABLE | DO_BUS_ENUMERATED_DEVICE; + DeviceExtension->KeyboardPdo->Flags &= ~DO_DEVICE_INITIALIZING; + } + + if (DeviceExtension->ScreenPdo == NULL) + { + Status = IoCreateDevice( + DeviceObject->DriverObject, + sizeof(COMMON_DEVICE_EXTENSION), + NULL, + FILE_DEVICE_SCREEN, + FILE_AUTOGENERATED_DEVICE_NAME | FILE_DEVICE_SECURE_OPEN, + FALSE, + &DeviceExtension->ScreenPdo); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoCreateDevice() failed with status 0x%lx\n", Status); + goto cleanup; + } + ((PCOMMON_DEVICE_EXTENSION)DeviceExtension->ScreenPdo->DeviceExtension)->Type = ScreenPDO; + DeviceExtension->ScreenPdo->Flags |= DO_POWER_PAGABLE | DO_BUS_ENUMERATED_DEVICE; + DeviceExtension->ScreenPdo->Flags &= ~DO_DEVICE_INITIALIZING; + } /* Allocate return structure */ DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool(
18 years, 7 months
1
0
0
0
[hpoussin] 22094: Add newdev.h of the w32api package
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon May 29 01:24:28 2006 New Revision: 22094 URL:
http://svn.reactos.ru/svn/reactos?rev=22094&view=rev
Log: Add newdev.h of the w32api package Added: trunk/reactos/dll/win32/newdev/newdev_private.h - copied, changed from r22092, trunk/reactos/dll/win32/newdev/newdev.h trunk/reactos/include/newdev.h (with props) Removed: trunk/reactos/dll/win32/newdev/newdev.h Modified: trunk/reactos/dll/win32/newdev/newdev.c trunk/reactos/dll/win32/newdev/stubs.c trunk/reactos/dll/win32/newdev/wizard.c Modified: trunk/reactos/dll/win32/newdev/newdev.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev.c?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev.c (original) +++ trunk/reactos/dll/win32/newdev/newdev.c Mon May 29 01:24:28 2006 @@ -20,7 +20,7 @@ */ #define YDEBUG -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); Removed: trunk/reactos/dll/win32/newdev/newdev.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev.h?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev.h (original) +++ trunk/reactos/dll/win32/newdev/newdev.h (removed) @@ -1,54 +1,0 @@ -#include <windows.h> -#include <windowsx.h> -#include <commctrl.h> -#include <regstr.h> -#include <setupapi.h> -#include <cfgmgr32.h> -#include <tchar.h> -#include <wine/debug.h> - -#include <stdio.h> - -#include "resource.h" - -extern HINSTANCE hDllInstance; - -typedef struct _DEVINSTDATA -{ - HFONT hTitleFont; - PBYTE buffer; - DWORD requiredSize; - DWORD regDataType; - HWND hDialog; - HDEVINFO hDevInfo; - SP_DEVINFO_DATA devInfoData; - SP_DRVINFO_DATA drvInfoData; - - LPTSTR CustomSearchPath; /* MULTI_SZ string */ -} DEVINSTDATA, *PDEVINSTDATA; - -#define WM_SEARCH_FINISHED (WM_USER + 10) -#define WM_INSTALL_FINISHED (WM_USER + 11) - -/* newdev.c */ -BOOL -SearchDriver( - IN PDEVINSTDATA DevInstData, - IN LPCTSTR Directory OPTIONAL, - IN LPCTSTR InfFile OPTIONAL); - -BOOL -SearchDriverRecursive( - IN PDEVINSTDATA DevInstData, - IN LPCTSTR Path); - -BOOL -InstallCurrentDriver( - IN PDEVINSTDATA DevInstData); - -/* wizard.c */ -BOOL -DisplayWizard( - IN PDEVINSTDATA DevInstData, - IN HWND hwndParent, - IN UINT startPage); Copied: trunk/reactos/dll/win32/newdev/newdev_private.h (from r22092, trunk/reactos/dll/win32/newdev/newdev.h) URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev_pri…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev.h (original) +++ trunk/reactos/dll/win32/newdev/newdev_private.h Mon May 29 01:24:28 2006 @@ -1,6 +1,10 @@ +#ifndef __NEWDEV_PRIVATE_H +#define __NEWDEV_PRIVATE_H + #include <windows.h> #include <windowsx.h> #include <commctrl.h> +#include <newdev.h> #include <regstr.h> #include <setupapi.h> #include <cfgmgr32.h> @@ -52,3 +56,5 @@ IN PDEVINSTDATA DevInstData, IN HWND hwndParent, IN UINT startPage); + +#endif /* __NEWDEV_PRIVATE_H */ Modified: trunk/reactos/dll/win32/newdev/stubs.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/stubs.c?re…
============================================================================== --- trunk/reactos/dll/win32/newdev/stubs.c (original) +++ trunk/reactos/dll/win32/newdev/stubs.c Mon May 29 01:24:28 2006 @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); Modified: trunk/reactos/dll/win32/newdev/wizard.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/wizard.c (original) +++ trunk/reactos/dll/win32/newdev/wizard.c Mon May 29 01:24:28 2006 @@ -19,7 +19,7 @@ */ #define YDEBUG -#include "newdev.h" +#include "newdev_private.h" WINE_DEFAULT_DEBUG_CHANNEL(newdev); Added: trunk/reactos/include/newdev.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/newdev.h?rev=22094&…
============================================================================== --- trunk/reactos/include/newdev.h (added) +++ trunk/reactos/include/newdev.h Mon May 29 01:24:28 2006 @@ -1,0 +1,70 @@ +/* + * newdev.h + * + * Driver installation DLL interface + * + * This file is part of the w32api package. + * + * Contributors: + * Created by Casper S. Hornstrup <chorns(a)users.sourceforge.net> + * + * THIS SOFTWARE IS NOT COPYRIGHTED + * + * This source code is offered for use in the public domain. You may + * use, modify or distribute it freely. + * + * This code is distributed in the hope that it will be useful but + * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY + * DISCLAIMED. This includes but is not limited to warranties of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + */ + +#ifndef __NEWDEV_H +#define __NEWDEV_H + +#if __GNUC__ >=3 +#pragma GCC system_header +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#pragma pack(push,4) + +/* UpdateDriverForPlugAndPlayDevices.InstallFlags constants */ +#define INSTALLFLAG_FORCE 0x00000001 +#define INSTALLFLAG_READONLY 0x00000002 +#define INSTALLFLAG_NONINTERACTIVE 0x00000004 +#define INSTALLFLAG_BITS 0x00000007 + +BOOL WINAPI +UpdateDriverForPlugAndPlayDevicesA( + HWND hwndParent, + LPCSTR HardwareId, + LPCSTR FullInfPath, + DWORD InstallFlags, + PBOOL bRebootRequired OPTIONAL); + +BOOL WINAPI +UpdateDriverForPlugAndPlayDevicesW( + HWND hwndParent, + LPCWSTR HardwareId, + LPCWSTR FullInfPath, + DWORD InstallFlags, + PBOOL bRebootRequired OPTIONAL); + +#ifdef UNICODE +#define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesW +#else +#define UpdateDriverForPlugAndPlayDevices UpdateDriverForPlugAndPlayDevicesA +#endif /* UNICODE */ + +#pragma pack(pop) + +#ifdef __cplusplus +} +#endif + +#endif /* __NEWDEV_H */ Propchange: trunk/reactos/include/newdev.h ------------------------------------------------------------------------------ svn:eol-style = native
18 years, 7 months
1
0
0
0
[hpoussin] 22093: Fix the build
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon May 29 00:33:20 2006 New Revision: 22093 URL:
http://svn.reactos.ru/svn/reactos?rev=22093&view=rev
Log: Fix the build Modified: trunk/reactos/dll/win32/newdev/Ru.rc Modified: trunk/reactos/dll/win32/newdev/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Ru.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/Ru.rc (original) +++ trunk/reactos/dll/win32/newdev/Ru.rc Mon May 29 00:33:20 2006 @@ -17,7 +17,7 @@ "Button",BS_AUTORADIOBUTTON,120,133,164,14 END -IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +IDD_NODRIVER DIALOG DISCARDABLE 0, 0, 317, 193 STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU CAPTION "Óñòàíîâêà îáîðóäîâàíèÿ"
18 years, 7 months
1
0
0
0
[hpoussin] 22092: - Display install page when installing the device, instead of search page - Add "install failed" page
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon May 29 00:21:43 2006 New Revision: 22092 URL:
http://svn.reactos.ru/svn/reactos?rev=22092&view=rev
Log: - Display install page when installing the device, instead of search page - Add "install failed" page Modified: trunk/reactos/dll/win32/newdev/De.rc trunk/reactos/dll/win32/newdev/En.rc trunk/reactos/dll/win32/newdev/Es.rc trunk/reactos/dll/win32/newdev/Hu.rc trunk/reactos/dll/win32/newdev/Ru.rc trunk/reactos/dll/win32/newdev/newdev.h trunk/reactos/dll/win32/newdev/resource.h trunk/reactos/dll/win32/newdev/wizard.c Modified: trunk/reactos/dll/win32/newdev/De.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/De.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/De.rc (original) +++ trunk/reactos/dll/win32/newdev/De.rc Mon May 29 00:21:43 2006 @@ -30,6 +30,18 @@ IDC_STATIC,120,98,181,24 CONTROL "Diesen Dialog nicht mehr anzeigen",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 Modified: trunk/reactos/dll/win32/newdev/En.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/En.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/En.rc (original) +++ trunk/reactos/dll/win32/newdev/En.rc Mon May 29 00:21:43 2006 @@ -30,6 +30,18 @@ IDC_STATIC,120,98,181,24 CONTROL "Do not show this dialog anymore",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 Modified: trunk/reactos/dll/win32/newdev/Es.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Es.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/Es.rc (original) +++ trunk/reactos/dll/win32/newdev/Es.rc Mon May 29 00:21:43 2006 @@ -30,6 +30,18 @@ IDC_STATIC,120,98,181,24 CONTROL "No volver a mostrar esta ventana",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 Modified: trunk/reactos/dll/win32/newdev/Hu.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Hu.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/Hu.rc (original) +++ trunk/reactos/dll/win32/newdev/Hu.rc Mon May 29 00:21:43 2006 @@ -8,11 +8,14 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "welcome??",IDC_WELCOMETITLE,115,8,195,24 - LTEXT "A telepítõ a következõ hardverhez telepít fel eszközmeghatjtót:",IDC_STATIC,115,40,195,16 + LTEXT "A telepítõ a következõ hardverhez telepít fel eszközmeghatjtót:", + IDC_STATIC,120,40,195,16 LTEXT "Kattints a Tovább gombra a folytatáshoz.",IDC_STATIC,115,169,195,17 LTEXT "Ismeretlen eszköz!",IDC_DEVICE,129,55,164,11 - CONTROL "Automatikus telepítés",IDC_RADIO_AUTO,"Button",BS_AUTORADIOBUTTON,115,112,178,13 - CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_MANUAL,"Button",BS_AUTORADIOBUTTON,115,133,164,14 + CONTROL "Automatikus telepítés",IDC_RADIO_AUTO,"Button", + BS_AUTORADIOBUTTON,120,112,178,13 + CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_MANUAL, + "Button",BS_AUTORADIOBUTTON,120,133,164,14 END IDD_NODRIVER DIALOG DISCARDABLE 0, 0, 317, 193 @@ -22,9 +25,24 @@ FONT 8, "MS Shell Dlg" BEGIN LTEXT "A telepítés sikertelen.",IDC_FINISHTITLE,115,8,195,24 - LTEXT "Az eszközmeghajtó nem található.",IDC_STATIC,115,40,195,19 - LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása gombra, ha tudod, hol van az eszközmeghajtó.",IDC_STATIC,113,98,181,24 - CONTROL "Ne mutasd ezt többször",IDC_DONOTSHOWDLG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,170,180,11 + LTEXT "Az eszközmeghajtó nem található.", + IDC_STATIC,120,40,195,19 + LTEXT "Kattints a Vissza gombra, és az Eszközmeghajtó kiválasztása gombra, ha tudod, hol van az eszközmeghajtó.", + IDC_STATIC,120,98,181,24 + CONTROL "Ne mutasd ezt többször",IDC_DONOTSHOWDLG,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 @@ -32,12 +50,17 @@ CAPTION "Hardver telepítõ" FONT 8, "MS Shell Dlg" BEGIN - CONTROL "Keresés ezeken a helyeken",IDC_RADIO_SEARCHHERE,"Button",BS_AUTORADIOBUTTON,27,11,239,13 - CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_CHOOSE,"Button",BS_AUTORADIOBUTTON,27,98,171,12 - CONTROL "Keresés cserélhetõ lemezeken",IDC_CHECK_MEDIA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 - CONTROL "A következõ útvonalon keressen",IDC_CHECK_PATH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,47,54,162,10 + CONTROL "Keresés ezeken a helyeken",IDC_RADIO_SEARCHHERE,"Button", + BS_AUTORADIOBUTTON,27,11,239,13 + CONTROL "Eszközmeghajtó kiválasztása",IDC_RADIO_CHOOSE,"Button", + BS_AUTORADIOBUTTON,27,98,171,12 + CONTROL "Keresés cserélhetõ lemezeken",IDC_CHECK_MEDIA,"Button", + BS_AUTOCHECKBOX | WS_TABSTOP,47,33,163,9 + CONTROL "A következõ útvonalon keressen",IDC_CHECK_PATH,"Button", + WS_TABSTOP,47,54,162,10 PUSHBUTTON "Böngészés",IDC_BROWSE,248,69,45,14 - COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL + COMBOBOX IDC_COMBO_PATH,61,71,176,12,CBS_DROPDOWN | CBS_SORT | + WS_VSCROLL | WS_TABSTOP | CBS_AUTOHSCROLL END IDD_SEARCHDRV DIALOG DISCARDABLE 0, 0, 317, 143 @@ -62,9 +85,11 @@ CAPTION "Hardver telepítõ" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "A telepítés sikeresen befejezõdött",IDC_FINISHTITLE,115,8,195,11 - LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ eszközhöz:",IDC_STATIC,115,32,195,19 - LTEXT "A kilépéshez kattints a Befejezés gombra.",IDC_STATIC,115,174,179,11 + LTEXT "A telepítés sikeresen befejezõdött",IDC_FINISHTITLE,120,8,195,11 + LTEXT "A telepítõ feltelepítette az eszközmeghajtókat a következõ eszközhöz:", + IDC_STATIC,120,32,195,19 + LTEXT "A kilépéshez kattints a Befejezés gombra.",IDC_STATIC,120,174, + 179,11 LTEXT "Ismeretlen eszköz!",IDC_DEVICE,148,53,147,12 END Modified: trunk/reactos/dll/win32/newdev/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/Ru.rc?rev=…
============================================================================== --- trunk/reactos/dll/win32/newdev/Ru.rc (original) +++ trunk/reactos/dll/win32/newdev/Ru.rc Mon May 29 00:21:43 2006 @@ -30,6 +30,18 @@ IDC_STATIC,120,98,181,24 CONTROL "Íå ïîêàçûâàòü ýòîò äèàëîã â áóäóùåì",IDC_DONOTSHOWDLG,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,120,170,180,11 +END + +IDD_INSTALLFAILED DIALOG DISCARDABLE 0, 0, 317, 193 +STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | + WS_SYSMENU +CAPTION "Device installation" +FONT 8, "MS Shell Dlg" +BEGIN + LTEXT "Installation failed",IDC_FINISHTITLE,120,8,195,24 + LTEXT "The device could not be installed because an unexpected error happened.", + IDC_STATIC,120,40,195,19 + LTEXT "UNKNOWN DEVICE",IDC_DEVICE,134,55,164,11 END IDD_CHSOURCE DIALOG DISCARDABLE 0, 0, 317, 143 Modified: trunk/reactos/dll/win32/newdev/newdev.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev.h?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev.h (original) +++ trunk/reactos/dll/win32/newdev/newdev.h Mon May 29 00:21:43 2006 @@ -27,7 +27,8 @@ LPTSTR CustomSearchPath; /* MULTI_SZ string */ } DEVINSTDATA, *PDEVINSTDATA; -#define WM_SEARCH_FINISHED (WM_USER + 10) +#define WM_SEARCH_FINISHED (WM_USER + 10) +#define WM_INSTALL_FINISHED (WM_USER + 11) /* newdev.c */ BOOL Modified: trunk/reactos/dll/win32/newdev/resource.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/resource.h…
============================================================================== --- trunk/reactos/dll/win32/newdev/resource.h (original) +++ trunk/reactos/dll/win32/newdev/resource.h Mon May 29 00:21:43 2006 @@ -24,6 +24,7 @@ #define IDD_SEARCHDRV 2 #define IDD_INSTALLDRV 3 #define IDD_NODRIVER 4 -#define IDD_FINISHPAGE 5 +#define IDD_INSTALLFAILED 5 +#define IDD_FINISHPAGE 6 #endif /* RESOURCE_H */ Modified: trunk/reactos/dll/win32/newdev/wizard.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/wizard.c?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/wizard.c (original) +++ trunk/reactos/dll/win32/newdev/wizard.c Mon May 29 00:21:43 2006 @@ -335,6 +335,19 @@ return 0; } +static DWORD WINAPI +InstallDriverProc( + IN LPVOID lpParam) +{ + PDEVINSTDATA DevInstData; + BOOL res; + + DevInstData = (PDEVINSTDATA)lpParam; + res = InstallCurrentDriver(DevInstData); + PostMessage(DevInstData->hDialog, WM_INSTALL_FINISHED, res ? 0 : 1, 0); + return 0; +} + static VOID PopulateCustomPathCombo( IN HWND hwndCombo) @@ -408,7 +421,7 @@ SaveCustomPath( IN HWND hwndCombo) { - FIXME("Stub."); + FIXME("Stub\n"); } static INT_PTR CALLBACK @@ -606,7 +619,7 @@ if (PrepareFoldersToScan(DevInstData, hwndDlg)) PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV); else - /* FIXME: unknown error */; + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); } else /* FIXME */; @@ -675,11 +688,7 @@ if (wParam == 0) PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_NODRIVER); else - { - /* FIXME: Shouldn't belong here... */ - InstallCurrentDriver(DevInstData); - PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE); - } + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLDRV); break; } @@ -726,6 +735,86 @@ IN WPARAM wParam, IN LPARAM lParam) { + PDEVINSTDATA DevInstData; + DWORD dwThreadId; + + /* Retrieve pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + HWND hwndControl; + DWORD dwStyle; + + /* Get pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); + + DevInstData->hDialog = hwndDlg; + hwndControl = GetParent(hwndDlg); + + /* Center the wizard window */ + CenterWindow(hwndControl); + + SendDlgItemMessage( + hwndDlg, + IDC_DEVICE, + WM_SETTEXT, + 0, + (LPARAM)DevInstData->drvInfoData.Description); + + /* Hide the system menu */ + dwStyle = GetWindowLong(hwndControl, GWL_STYLE); + SetWindowLong(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU); + break; + } + + case WM_INSTALL_FINISHED: + { + CloseHandle(hThread); + hThread = 0; + if (wParam == 0) + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_FINISHPAGE); + else + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + PropSheet_SetWizButtons(GetParent(hwndDlg), !PSWIZB_NEXT | !PSWIZB_BACK); + hThread = CreateThread(NULL, 0, InstallDriverProc, DevInstData, 0, &dwThreadId); + break; + + case PSN_KILLACTIVE: + if (hThread != 0) + { + SetWindowLong(hwndDlg, DWL_MSGRESULT, TRUE); + return TRUE; + } + break; + + case PSN_WIZNEXT: + /* Handle a Next button click, if necessary */ + break; + + default: + break; + } + break; + } + + default: + break; + } + return FALSE; } @@ -739,7 +828,7 @@ PDEVINSTDATA DevInstData; /* Get pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); switch (uMsg) { @@ -752,8 +841,8 @@ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); /* Set title font */ SendDlgItemMessage( @@ -836,6 +925,81 @@ } static INT_PTR CALLBACK +InstallFailedDlgProc( + IN HWND hwndDlg, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam) +{ + PDEVINSTDATA DevInstData; + + /* Retrieve pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); + + switch (uMsg) + { + case WM_INITDIALOG: + { + HWND hwndControl; + + /* Get pointer to the global setup data */ + DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam; + SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); + + hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); + + SendDlgItemMessage( + hwndDlg, + IDC_DEVICE, + WM_SETTEXT, + 0, + (LPARAM)DevInstData->drvInfoData.Description); + + /* Set title font */ + SendDlgItemMessage( + hwndDlg, + IDC_FINISHTITLE, + WM_SETFONT, + (WPARAM)DevInstData->hTitleFont, + (LPARAM)TRUE); + break; + } + + case WM_NOTIFY: + { + LPNMHDR lpnm = (LPNMHDR)lParam; + + switch (lpnm->code) + { + case PSN_SETACTIVE: + /* Enable the correct buttons on for the active page */ + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_FINISH); + break; + + case PSN_WIZBACK: + /* Handle a Back button click, if necessary */ + break; + + case PSN_WIZFINISH: + /* Handle a Finish button click, if necessary */ + break; + + default: + break; + } + break; + } + + default: + break; + } + + return FALSE; +} + +static INT_PTR CALLBACK FinishDlgProc( IN HWND hwndDlg, IN UINT uMsg, @@ -845,7 +1009,7 @@ PDEVINSTDATA DevInstData; /* Retrieve pointer to the global setup data */ - DevInstData = (PDEVINSTDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); + DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWL_USERDATA); switch (uMsg) { @@ -858,8 +1022,8 @@ SetWindowLongPtr(hwndDlg, GWL_USERDATA, (DWORD_PTR)DevInstData); hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL); - ShowWindow (hwndControl, SW_HIDE); - EnableWindow (hwndControl, FALSE); + ShowWindow(hwndControl, SW_HIDE); + EnableWindow(hwndControl, FALSE); SendDlgItemMessage( hwndDlg, @@ -973,11 +1137,17 @@ psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV); ahpsp[IDD_INSTALLDRV] = CreatePropertySheetPage(&psp); - /* Create the Install failed page */ + /* Create the No driver page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; psp.pfnDlgProc = NoDriverDlgProc; psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER); ahpsp[IDD_NODRIVER] = CreatePropertySheetPage(&psp); + + /* Create the Install failed page */ + psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; + psp.pfnDlgProc = InstallFailedDlgProc; + psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED); + ahpsp[IDD_INSTALLFAILED] = CreatePropertySheetPage(&psp); /* Create the Finish page */ psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER; @@ -990,7 +1160,7 @@ psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER; psh.hInstance = hDllInstance; psh.hwndParent = hwndParent; - psh.nPages = 6; + psh.nPages = IDD_FINISHPAGE + 1; psh.nStartPage = startPage; psh.phpage = ahpsp; psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
18 years, 7 months
1
0
0
0
[hpoussin] 22091: Keep minimal amount of differences with Wine code Remove useless files
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun May 28 23:20:19 2006 New Revision: 22091 URL:
http://svn.reactos.ru/svn/reactos?rev=22091&view=rev
Log: Keep minimal amount of differences with Wine code Remove useless files Removed: trunk/reactos/dll/win32/setupapi/Makefile.in trunk/reactos/dll/win32/setupapi/devinst16.c trunk/reactos/dll/win32/setupapi/setupx.spec trunk/reactos/dll/win32/setupapi/setupx16.h trunk/reactos/dll/win32/setupapi/setupx_main.c Modified: trunk/reactos/dll/win32/setupapi/Bg.rc trunk/reactos/dll/win32/setupapi/Cs.rc trunk/reactos/dll/win32/setupapi/Da.rc trunk/reactos/dll/win32/setupapi/De.rc trunk/reactos/dll/win32/setupapi/En.rc trunk/reactos/dll/win32/setupapi/Eo.rc trunk/reactos/dll/win32/setupapi/Es.rc trunk/reactos/dll/win32/setupapi/Fi.rc trunk/reactos/dll/win32/setupapi/Fr.rc trunk/reactos/dll/win32/setupapi/Hu.rc trunk/reactos/dll/win32/setupapi/It.rc trunk/reactos/dll/win32/setupapi/Ja.rc trunk/reactos/dll/win32/setupapi/Ko.rc trunk/reactos/dll/win32/setupapi/Nl.rc trunk/reactos/dll/win32/setupapi/No.rc trunk/reactos/dll/win32/setupapi/Pl.rc trunk/reactos/dll/win32/setupapi/Pt.rc trunk/reactos/dll/win32/setupapi/Ru.rc trunk/reactos/dll/win32/setupapi/Sv.rc trunk/reactos/dll/win32/setupapi/Tr.rc trunk/reactos/dll/win32/setupapi/cfgmgr.c trunk/reactos/dll/win32/setupapi/devinst.c trunk/reactos/dll/win32/setupapi/dirid.c trunk/reactos/dll/win32/setupapi/diskspace.c trunk/reactos/dll/win32/setupapi/infparse.c trunk/reactos/dll/win32/setupapi/install.c trunk/reactos/dll/win32/setupapi/misc.c trunk/reactos/dll/win32/setupapi/parser.c trunk/reactos/dll/win32/setupapi/query.c trunk/reactos/dll/win32/setupapi/queue.c trunk/reactos/dll/win32/setupapi/rpc.c trunk/reactos/dll/win32/setupapi/rpc_private.h trunk/reactos/dll/win32/setupapi/setupapi.rc trunk/reactos/dll/win32/setupapi/setupapi_private.h trunk/reactos/dll/win32/setupapi/setupcab.c trunk/reactos/dll/win32/setupapi/stringtable.c trunk/reactos/dll/win32/setupapi/stubs.c trunk/reactos/dll/win32/setupapi/virtcopy.c Modified: trunk/reactos/dll/win32/setupapi/Bg.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Bg.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Bg.rc (original) +++ trunk/reactos/dll/win32/setupapi/Bg.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_BULGARIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_BULGARIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Cs.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Cs.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Cs.rc (original) +++ trunk/reactos/dll/win32/setupapi/Cs.rc Sun May 28 23:20:19 2006 @@ -1,4 +1,5 @@ -/* +/* Hey, Emacs, open this file with -*- coding: cp1250 -*- + * * Czech resources for SETUPAPI * * Copyright 2001 Andreas Mohr @@ -16,10 +17,12 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_CZECH, SUBLANG_NEUTRAL +LANGUAGE LANG_CZECH, SUBLANG_DEFAULT + +/* Czech strings in CP1250 */ COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Da.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Da.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Da.rc (original) +++ trunk/reactos/dll/win32/setupapi/Da.rc Sun May 28 23:20:19 2006 @@ -1,4 +1,24 @@ -LANGUAGE LANG_DANISH, SUBLANG_NEUTRAL +/* + * Danish resources for SETUPAPI + * + * Copyright 2005 Thomas Larsen + * + * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +LANGUAGE LANG_DANISH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/De.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/De.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/De.rc (original) +++ trunk/reactos/dll/win32/setupapi/De.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL +LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/En.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/En.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/En.rc (original) +++ trunk/reactos/dll/win32/setupapi/En.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US Modified: trunk/reactos/dll/win32/setupapi/Eo.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Eo.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Eo.rc (original) +++ trunk/reactos/dll/win32/setupapi/Eo.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_ESPERANTO, SUBLANG_DEFAULT Modified: trunk/reactos/dll/win32/setupapi/Es.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Es.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Es.rc (original) +++ trunk/reactos/dll/win32/setupapi/Es.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL Modified: trunk/reactos/dll/win32/setupapi/Fi.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Fi.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Fi.rc (original) +++ trunk/reactos/dll/win32/setupapi/Fi.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_FINNISH, SUBLANG_NEUTRAL +LANGUAGE LANG_FINNISH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Fr.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Fr.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Fr.rc (original) +++ trunk/reactos/dll/win32/setupapi/Fr.rc Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL Modified: trunk/reactos/dll/win32/setupapi/Hu.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Hu.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Hu.rc (original) +++ trunk/reactos/dll/win32/setupapi/Hu.rc Sun May 28 23:20:19 2006 @@ -1,5 +1,5 @@ /* - * Hungaruan resources for SETUPAPI + * Hungarian resources for SETUPAPI * * Copyright 2001 Andreas Mohr * Copyright 2005 Robert Horvath (talley at cubeclub.hu) - Hungarian translation @@ -16,10 +16,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_HUNGARIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_HUNGARIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/It.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/It.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/It.rc (original) +++ trunk/reactos/dll/win32/setupapi/It.rc Sun May 28 23:20:19 2006 @@ -16,10 +16,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_ITALIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Ja.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Ja.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Ja.rc (original) +++ trunk/reactos/dll/win32/setupapi/Ja.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT Modified: trunk/reactos/dll/win32/setupapi/Ko.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Ko.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Ko.rc (original) +++ trunk/reactos/dll/win32/setupapi/Ko.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL +LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Removed: trunk/reactos/dll/win32/setupapi/Makefile.in URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Makefile…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Makefile.in (original) +++ trunk/reactos/dll/win32/setupapi/Makefile.in (removed) @@ -1,39 +1,0 @@ -EXTRADEFS = -D_SETUPAPI_ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = setupapi.dll -IMPORTLIB = libsetupapi.$(IMPLIBEXT) -IMPORTS = user32 version advapi32 rpcrt4 kernel32 ntdll -DELAYIMPORTS = shell32 -EXTRALIBS = $(LIBUNICODE) - -C_SRCS = \ - pnp_c.c \ - cfgmgr.c \ - devinst.c \ - dirid.c \ - diskspace.c \ - install.c \ - misc.c \ - parser.c \ - queue.c \ - setupcab.c \ - stringtable.c \ - stubs.c \ - rpc.c - -C_SRCS16 = \ - devinst16.c \ - infparse.c \ - setupx_main.c \ - virtcopy.c - -SPEC_SRCS16 = setupx.spec - -RC_SRCS= setupapi.rc - -@MAKE_DLL_RULES@ - -### Dependencies: Modified: trunk/reactos/dll/win32/setupapi/Nl.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Nl.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Nl.rc (original) +++ trunk/reactos/dll/win32/setupapi/Nl.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL +LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/No.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/No.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/No.rc (original) +++ trunk/reactos/dll/win32/setupapi/No.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL Modified: trunk/reactos/dll/win32/setupapi/Pl.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Pl.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Pl.rc (original) +++ trunk/reactos/dll/win32/setupapi/Pl.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_POLISH, SUBLANG_NEUTRAL +LANGUAGE LANG_POLISH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Pt.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Pt.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Pt.rc (original) +++ trunk/reactos/dll/win32/setupapi/Pt.rc Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN Modified: trunk/reactos/dll/win32/setupapi/Ru.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Ru.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Ru.rc (original) +++ trunk/reactos/dll/win32/setupapi/Ru.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_RUSSIAN, SUBLANG_NEUTRAL +LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Sv.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Sv.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Sv.rc (original) +++ trunk/reactos/dll/win32/setupapi/Sv.rc Sun May 28 23:20:19 2006 @@ -15,10 +15,10 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL +LANGUAGE LANG_SWEDISH, SUBLANG_DEFAULT COPYFILEDLGORD DIALOG LOADONCALL MOVEABLE DISCARDABLE 20, 20, 208, 105 STYLE DS_MODALFRAME | DS_SETFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION Modified: trunk/reactos/dll/win32/setupapi/Tr.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/Tr.rc?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/Tr.rc (original) +++ trunk/reactos/dll/win32/setupapi/Tr.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c…
============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Removed: trunk/reactos/dll/win32/setupapi/devinst16.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst1…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst16.c (original) +++ trunk/reactos/dll/win32/setupapi/devinst16.c (removed) @@ -1,134 +1,0 @@ -/* - * SetupAPI device installer - * - * Copyright 2000 Andreas Mohr for CodeWeavers - * - * 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 - */ - -#include <stdarg.h> - -#include "windef.h" -#include "winbase.h" -#include "setupx16.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(setupapi); - -/*********************************************************************** - * DiGetClassDevs (SETUPX.304) - * Return a list of installed system devices. - * Uses HKLM\\ENUM to list devices. - */ -RETERR16 WINAPI DiGetClassDevs16(LPLPDEVICE_INFO16 lplpdi, - LPCSTR lpszClassName, HWND16 hwndParent, INT16 iFlags) -{ - LPDEVICE_INFO16 lpdi; - - FIXME("(%p, '%s', %04x, %04x), semi-stub.\n", - lplpdi, lpszClassName, hwndParent, iFlags); - lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16)); - lpdi->cbSize = sizeof(DEVICE_INFO16); - *lplpdi = (LPDEVICE_INFO16)MapLS(lpdi); - return OK; -} - -/*********************************************************************** - * DiBuildCompatDrvList (SETUPX.300) - */ -RETERR16 WINAPI DiBuildCompatDrvList16(LPDEVICE_INFO16 lpdi) -{ - FIXME("(%p): stub\n", lpdi); - lpdi->lpCompatDrvList = NULL; - return FALSE; -} - -/*********************************************************************** - * DiBuildClassDrvList (SETUPX.301) - */ -RETERR16 WINAPI DiBuildClassDrvList16(LPDEVICE_INFO16 lpdi) -{ - FIXME("(%p): stub\n", lpdi); - lpdi->lpCompatDrvList = NULL; - return FALSE; -} - -/*********************************************************************** - * DiCallClassInstaller (SETUPX.308) - */ -RETERR16 WINAPI DiCallClassInstaller16(DI_FUNCTION16 diFctn, LPDEVICE_INFO16 lpdi) -{ - FIXME("(%x, %p): stub\n", diFctn, lpdi); - return FALSE; -} - -/*********************************************************************** - * DiCreateDevRegKey (SETUPX.318) - */ -RETERR16 WINAPI DiCreateDevRegKey16(LPDEVICE_INFO16 lpdi, - VOID* p2, WORD w3, - LPCSTR s4, WORD w5) -{ - FIXME("(%p, %p, %x, %s, %x): stub\n", lpdi, p2, w3, debugstr_a(s4), w5); - return FALSE; -} - -/*********************************************************************** - * DiDeleteDevRegKey (SETUPX.344) - */ -RETERR16 WINAPI DiDeleteDevRegKey16(LPDEVICE_INFO16 lpdi, INT16 iFlags) -{ - FIXME("(%p, %x): stub\n", lpdi, iFlags); - return FALSE; -} - -/*********************************************************************** - * DiCreateDeviceInfo (SETUPX.303) - */ -RETERR16 WINAPI DiCreateDeviceInfo16(LPLPDEVICE_INFO16 lplpdi, - LPCSTR lpszDescription, DWORD dnDevnode, - HKEY16 hkey, LPCSTR lpszRegsubkey, - LPCSTR lpszClassName, HWND16 hwndParent) -{ - LPDEVICE_INFO16 lpdi; - FIXME("(%p %s %08lx %x %s %s %x): stub\n", lplpdi, - debugstr_a(lpszDescription), dnDevnode, hkey, - debugstr_a(lpszRegsubkey), debugstr_a(lpszClassName), hwndParent); - lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16)); - lpdi->cbSize = sizeof(DEVICE_INFO16); - strcpy(lpdi->szClassName, lpszClassName); - lpdi->hwndParent = hwndParent; - *lplpdi = (LPDEVICE_INFO16)MapLS(lpdi); - return OK; -} - -/*********************************************************************** - * DiDestroyDeviceInfoList (SETUPX.305) - */ -RETERR16 WINAPI DiDestroyDeviceInfoList16(LPDEVICE_INFO16 lpdi) -{ - FIXME("(%p): stub\n", lpdi); - return FALSE; -} - -/*********************************************************************** - * DiOpenDevRegKey (SETUPX.319) - */ -RETERR16 WINAPI DiOpenDevRegKey16(LPDEVICE_INFO16 lpdi, - LPHKEY16 lphk,INT16 iFlags) -{ - FIXME("(%p %p %d): stub\n", lpdi, lphk, iFlags); - return FALSE; -} Modified: trunk/reactos/dll/win32/setupapi/dirid.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/dirid.c?…
============================================================================== --- trunk/reactos/dll/win32/setupapi/dirid.c (original) +++ trunk/reactos/dll/win32/setupapi/dirid.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/diskspace.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/diskspac…
============================================================================== --- trunk/reactos/dll/win32/setupapi/diskspace.c (original) +++ trunk/reactos/dll/win32/setupapi/diskspace.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/infparse.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/infparse…
============================================================================== --- trunk/reactos/dll/win32/setupapi/infparse.c (original) +++ trunk/reactos/dll/win32/setupapi/infparse.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * FIXME: * - return values ??? Modified: trunk/reactos/dll/win32/setupapi/install.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/install.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/install.c (original) +++ trunk/reactos/dll/win32/setupapi/install.c Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" @@ -453,6 +453,9 @@ HMODULE module; HRESULT res; SP_REGISTER_CONTROL_STATUSW status; +#ifdef __WINESRC__ + IMAGE_NT_HEADERS *nt; +#endif status.cbSize = sizeof(status); status.FileName = path; @@ -481,6 +484,47 @@ status.Win32Error = GetLastError(); goto done; } + +#ifdef __WINESRC__ + if ((nt = RtlImageNtHeader( module )) && !(nt->FileHeader.Characteristics & IMAGE_FILE_DLL)) + { + /* file is an executable, not a dll */ + STARTUPINFOW startup; + PROCESS_INFORMATION info; + WCHAR *cmd_line; + BOOL res; + static const WCHAR format[] = {'"','%','s','"',' ','%','s',0}; + static const WCHAR default_args[] = {'/','R','e','g','S','e','r','v','e','r',0}; + + FreeLibrary( module ); + module = NULL; + if (!args) args = default_args; + cmd_line = HeapAlloc( GetProcessHeap(), 0, (strlenW(path) + strlenW(args) + 4) * sizeof(WCHAR) ); + sprintfW( cmd_line, format, path, args ); + memset( &startup, 0, sizeof(startup) ); + startup.cb = sizeof(startup); + TRACE( "executing %s\n", debugstr_w(cmd_line) ); + res = CreateProcessW( NULL, cmd_line, NULL, NULL, FALSE, 0, NULL, NULL, &startup, &info ); + HeapFree( GetProcessHeap(), 0, cmd_line ); + if (!res) + { + status.FailureCode = SPREG_LOADLIBRARY; + status.Win32Error = GetLastError(); + goto done; + } + CloseHandle( info.hThread ); + + if (WaitForSingleObject( info.hProcess, timeout*1000 ) == WAIT_TIMEOUT) + { + /* timed out, kill the process */ + TerminateProcess( info.hProcess, 1 ); + status.FailureCode = SPREG_TIMEOUT; + status.Win32Error = ERROR_TIMEOUT; + } + CloseHandle( info.hProcess ); + goto done; + } +#endif // __WINESRC__ if (flags & FLG_REGSVR_DLLREGISTER) { @@ -588,6 +632,50 @@ } return ret; } + +#ifdef __WINESRC__ +/*********************************************************************** + * fake_dlls_callback + * + * Called once for each WineFakeDlls entry in a given section. + */ +static BOOL fake_dlls_callback( HINF hinf, PCWSTR field, void *arg ) +{ + INFCONTEXT context; + BOOL ret = TRUE; + BOOL ok = SetupFindFirstLineW( hinf, field, NULL, &context ); + + for (; ok; ok = SetupFindNextLine( &context, &context )) + { + WCHAR *path, *p; + WCHAR buffer[MAX_INF_STRING_LENGTH]; + + /* get directory */ + if (!(path = PARSER_get_dest_dir( &context ))) continue; + + /* get dll name */ + if (!SetupGetStringFieldW( &context, 3, buffer, sizeof(buffer)/sizeof(WCHAR), NULL )) + goto done; + if (!(p = HeapReAlloc( GetProcessHeap(), 0, path, + (strlenW(path) + strlenW(buffer) + 2) * sizeof(WCHAR) ))) goto done; + path = p; + p += strlenW(p); + if (p == path || p[-1] != '\\') *p++ = '\\'; + strcpyW( p, buffer ); + + /* get source dll */ + if (SetupGetStringFieldW( &context, 4, buffer, sizeof(buffer)/sizeof(WCHAR), NULL )) + p = buffer; /* otherwise use target base name as default source */ + + create_fake_dll( path, p ); /* ignore errors */ + + done: + HeapFree( GetProcessHeap(), 0, path ); + if (!ret) break; + } + return ret; +} +#endif // __WINESRC__ /*********************************************************************** * update_ini_callback @@ -920,6 +1008,11 @@ if (!iterate_section_fields( hinf, section, RegisterDlls, register_dlls_callback, &info )) return FALSE; + +#ifdef __WINESRC__ + if (!iterate_section_fields( hinf, section, WineFakeDlls, fake_dlls_callback, NULL )) + return FALSE; +#endif // __WINESRC__ } if (flags & SPINST_UNREGSVR) { Modified: trunk/reactos/dll/win32/setupapi/misc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/misc.c?r…
============================================================================== --- trunk/reactos/dll/win32/setupapi/misc.c (original) +++ trunk/reactos/dll/win32/setupapi/misc.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/parser.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/parser.c…
============================================================================== --- trunk/reactos/dll/win32/setupapi/parser.c (original) +++ trunk/reactos/dll/win32/setupapi/parser.c Sun May 28 23:20:19 2006 @@ -16,7 +16,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/query.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/query.c?…
============================================================================== --- trunk/reactos/dll/win32/setupapi/query.c (original) +++ trunk/reactos/dll/win32/setupapi/query.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/queue.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/queue.c?…
============================================================================== --- trunk/reactos/dll/win32/setupapi/queue.c (original) +++ trunk/reactos/dll/win32/setupapi/queue.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/rpc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/rpc.c?re…
============================================================================== --- trunk/reactos/dll/win32/setupapi/rpc.c (original) +++ trunk/reactos/dll/win32/setupapi/rpc.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/rpc_private.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/rpc_priv…
============================================================================== --- trunk/reactos/dll/win32/setupapi/rpc_private.h (original) +++ trunk/reactos/dll/win32/setupapi/rpc_private.h Sun May 28 23:20:19 2006 @@ -13,7 +13,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __RPC_PRIVATE_H Modified: trunk/reactos/dll/win32/setupapi/setupapi.rc URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.rc (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.rc Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include <windows.h> Modified: trunk/reactos/dll/win32/setupapi/setupapi_private.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi_private.h (original) +++ trunk/reactos/dll/win32/setupapi/setupapi_private.h Sun May 28 23:20:19 2006 @@ -14,7 +14,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef __SETUPAPI_PRIVATE_H Modified: trunk/reactos/dll/win32/setupapi/setupcab.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupcab…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupcab.c (original) +++ trunk/reactos/dll/win32/setupapi/setupcab.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * * Many useful traces are commented in code, uncomment them if you have Removed: trunk/reactos/dll/win32/setupapi/setupx.spec URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupx.s…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupx.spec (original) +++ trunk/reactos/dll/win32/setupapi/setupx.spec (removed) @@ -1,269 +1,0 @@ -#1 stub WEP -2 pascal -ret16 IpOpen(str ptr) IpOpen16 -3 stub IpOpenAppend #(str word) -4 pascal -ret16 IpClose(word) IpClose16 -5 stub IpGetLongField #(word ptr word ptr) -6 stub IpGetStringField #(word ptr word ptr word ptr) -7 stub IpFindFirstLine #(word str str ptr) -8 stub IpGetLineCount #(word str ptr) -9 stub IpGetFieldCount #(word ptr ptr) -10 stub IpGetIntField #(word ptr word ptr) -11 stub IpFindNextLine #(word ptr) -12 stub IpGetFileName #(word ptr word) -13 pascal -ret16 VcpQueueCopy(str str str str word word ptr word long) VcpQueueCopy16 -14 stub NOAUTORUNWNDPROC -15 stub __DEBUGMSG -16 stub __ASSERTMSG -17 pascal -ret16 VcpQueueDelete(str str word long) VcpQueueDelete16 -18 stub TpOpenFile #(str ptr word) -19 stub TpCloseFile #(word) -20 stub TpOpenSection #(word ptr str word) -21 stub TpCloseSection #(word) -22 stub TpCommitSection #(word word str word) -23 stub TpGetLine #(word str str word word ptr) -24 stub TpGetNextLine #(word str str ptr) -25 stub TpInsertLine #(word str str word word word) -26 stub TpReplaceLine #(word str str word word word) -27 stub TpDeleteLine #(word word word word) -28 stub TpMoveLine #(word word word word word word) -29 stub TpGetLineContents #(word ptr word ptr word word word) -30 stub TpGetPrivateProfileString #(str str str ptr word str) -31 stub TpWritePrivateProfileString #(str str str str) -32 stub TpGetProfileString #(str str str ptr word) -33 pascal -ret16 CtlSetLdd(ptr) CtlSetLdd16 -34 pascal -ret16 CtlGetLdd(ptr) CtlGetLdd16 -35 pascal -ret16 CtlFindLdd(ptr) CtlFindLdd16 -36 pascal -ret16 CtlAddLdd(ptr) CtlAddLdd16 -37 pascal -ret16 CtlDelLdd(word) CtlDelLdd16 -38 pascal -ret16 CtlGetLddPath(word ptr) CtlGetLddPath16 -39 stub SURegCloseKey #(word) -40 stub SURegCreateKey #(word) -41 stub SURegDeleteKey #(word str) -42 stub SURegDeleteValue #(word str) -43 stub SURegEnumKey #(word long ptr long) -44 stub SURegEnumValue #(word long str ptr ptr ptr ptr ptr) -45 stub SURegFlush #() -46 stub SURegInit #() -47 pascal SURegOpenKey(word str ptr) SURegOpenKey -48 stub SURegQueryValue -49 stub SURegQueryValue16 #(word str ptr ptr) -50 pascal SURegQueryValueEx(long str ptr ptr ptr ptr) SURegQueryValueEx -51 stub SURegSetValue -52 stub SURegSetValue16 #(word str long ptr long) -53 stub SURegSetValueEx #(word str long long ptr long) -54 stub SURegSaveKey #(word str ptr) -55 stub SURegLoadKey #(word str str) -56 stub SURegUnLoadKey #(word str) -60 stub DiskInfoFromLdid #(word ptr) -61 pascal suErrorToIds(word word) suErrorToIds16 -62 pascal -ret16 TPWriteProfileString(str str str) TPWriteProfileString16 -63 stub SURPLSETUP -# does SUSTORELDIDPATH set the path of an LDID in the registry ? -64 stub SUSTORELDIDPATH -65 stub WILDCARDSTRCMPI -101 pascal -ret16 GenInstall(word str word) GenInstall16 -102 stub GenWinInitRename #(str str word) -103 pascal GenFormStrWithoutPlaceHolders(str str word) GenFormStrWithoutPlaceHolders16 -104 stub SETUPX -105 stub CfgSetupMerge #(word) -106 stub INITDEPENDANTLDIDS -107 stub CFGOBJFINDKEYCMD -108 stub GenSURegSetValueEx -109 stub GENINSTALLWITHQUEUE -110 stub GenInstallEx #(word str word word ptr long) -111 stub GenCopyLogConfig2Reg #(word word str) -112 stub SUGetSetSetupFlags #(ptr word) -114 stub CFGPARSELINE # returns array -115 stub CFGSETAUTOPROCESS -116 stub CFGOBJTOSTR -117 stub CFGLNTOOBJ -118 stub MATCHCMDEXT -119 stub IpFindNextMatchLine #(word str ptr) -120 stub P_SETDEFAULTOPTION -121 stub CFGCLEANBOOT -122 stub CFGMATCHCMDEXT -123 stub CFGWASFILEUPDATED -124 stub AUTOMATCHCMDEXT -125 stub P_VALIDATEOC -126 stub GENMAPROOTREGSTR2KEY -127 stub P_CDROMOC -128 stub P_MEDIAOC -129 stub CFGCLEAN1STBOOT -130 stub suFormatMessage -131 stub suvFormatMessage #(word str str word ptr) -132 stub suFormatMessageBox -#133 stub suHelp # W98SE conflict !! -135 stub suHelp #(word word) -#135 stub P_WEBTVOC # W98SE conflict !! -136 stub P_WBEMOC -137 stub P_THEMESOC -138 stub P_IMAGINGOC -139 stub P_SCHEMESOC -140 stub suVerConflict #(word ptr word ptr) -141 stub suVerConflictInit #(word) -142 stub suVerConflictTerm #(ptr) -# Emergency Boot Disk -143 stub suCreateEBD #(word ptr long) -144 stub suCopyToEBD -145 stub sxIsMSDOS7Running #() -150 stub DS_INIT -151 stub DS_DESTROY -152 stub DS_SSYNCDRIVES -153 stub DS_GETDRIVEDATA -154 stub DS_ADDSECTION -155 stub DS_ENABLESECTION -156 stub DS_DISABLESECTION -157 stub DS_SETSWAPSIZE -158 stub DS_SETREQUIREDPAD -159 stub DS_SETAVAILABLEPAD -160 stub SXUPDATEDS -170 stub SUSETMEM -171 stub WriteDMFBootData #(word ptr word) -200 pascal VcpOpen(segptr ptr) VcpOpen16 -201 pascal VcpClose(word str) VcpClose16 -202 pascal -ret16 vcpDefCallbackProc(ptr word word long long) vcpDefCallbackProc16 -203 stub vcpEnumFiles #(ptr long) -204 pascal -ret16 VcpQueueRename(str str str str word word long) VcpQueueRename16 -205 pascal -ret16 vsmGetStringName(word ptr word) vsmGetStringName16 -206 pascal -ret16 vsmStringDelete(word) vsmStringDelete16 -207 pascal -ret16 vsmStringAdd(str) vsmStringAdd16 -208 pascal vsmGetStringRawName(word) vsmGetStringRawName16 -209 stub IpSaveRestorePosition #(word word) -210 pascal -ret16 IpGetProfileString(word str str ptr word) IpGetProfileString16 -211 stub IpOpenEx #(str ptr word) -212 stub IpOpenAppendEx #(str word word) -213 pascal -ret16 vcpUICallbackProc(ptr word word long long) vcpUICallbackProc16 -214 stub VcpAddMRUPath #(str) -300 pascal -ret16 DiBuildCompatDrvList (ptr) DiBuildCompatDrvList16 -301 pascal -ret16 DiBuildClassDrvList (ptr) DiBuildClassDrvList16 -302 stub DiDestroyDriverNodeList #(ptr) -303 pascal -ret16 DiCreateDeviceInfo (ptr str long long str str word) DiCreateDeviceInfo16 -304 pascal -ret16 DiGetClassDevs(ptr str word word) DiGetClassDevs16 -305 pascal -ret16 DiDestroyDeviceInfoList (ptr) DiDestroyDeviceInfoList16 -306 stub DiRemoveDevice #(ptr) -308 pascal -ret16 DiCallClassInstaller (word ptr) DiCallClassInstaller16 -309 stub DiCreateDriverNode #(ptr word word word str str str str str str long) -310 stub DiDrawMiniIcon -311 stub DiGetClassBitmapIndex #(str ptr) -312 stub DiSelectDevice #(ptr) -313 stub DiInstallDevice #(ptr) -314 stub DiLoadClassIcon #(str ptr ptr) -315 stub DiAskForOEMDisk #(ptr) -316 stub Display_SetMode #(ptr word word word) -317 stub Display_ClassInstaller #(word ptr) -318 pascal -ret16 DiCreateDevRegKey (ptr ptr word str word) DiCreateDevRegKey16 -319 pascal -ret16 DiOpenDevRegKey (ptr ptr word) DiOpenDevRegKey16 -320 stub DiInstallDrvSection #(str str str str long) -321 stub DiInstallClass #(str long) -322 stub DiOpenClassRegKey #(ptr str) -323 stub Display_SetFontSize #(str) -324 stub Display_OpenFontSizeKey #(ptr) -325 stub DiBuildClassDrvListFromOldInf #(ptr str ptr long) -326 stub DiIsThereNeedToCopy #(word long) -333 stub DiChangeState #(ptr long long long) -334 stub WALKSUBTREE -340 stub GetFctn #(word str str ptr ptr) -341 stub DiBuildClassInfoList #(ptr) -342 stub DiDestroyClassInfoList #(ptr) -343 stub DiGetDeviceClassInfo #(ptr ptr) -344 pascal -ret16 DiDeleteDevRegKey (ptr word) DiDeleteDevRegKey16 -350 stub DiSelectOEMDrv #(word ptr) -351 stub DiGetINFClass #(str word str long) -353 stub DIPICKBESTDRIVER -355 stub COPYINFFILE -360 stub GenInfLCToDevNode #(word str word word long) -361 stub GETDOSMESSAGE -362 stub Mouse_ClassInstaller #(word ptr) -363 stub sxCompareDosAppVer #(str str) -364 stub MONITOR_CLASSINSTALLER -365 stub FCEGETRESDESOFFSET -366 stub FCEGETALLOCVALUE -367 stub FCEADDRESDES -368 stub FCEDELETERESDES -369 stub FCEINIT -370 stub FCEGETRESDES -371 stub FCEGETFIRSTVALUE -372 stub FCEGETOTHERVALUE -373 stub FCEGETVALIDATEVALUE -374 stub FCEWRITETHISFORCEDCONFIGNOW -375 stub SUCreatePropertySheetPage #(ptr) -376 stub SUDestroyPropertySheetPage #(word) -377 stub SUPropertySheet #(ptr) -380 stub DiReadRegLogConf #(ptr str ptr ptr) -381 stub DiReadRegConf #(ptr ptr ptr long) -390 stub DiBuildPotentialDuplicatesList #(ptr ptr long ptr ptr) -395 stub InitSubstrData #(ptr str) -396 stub GetFirstSubstr #(ptr) -397 stub GetNextSubstr #(ptr) -398 stub INITSUBSTRDATAEX -400 stub bIsFileInVMM32 #(str) -401 stub DiInstallDriverFiles #(ptr) -405 stub DiBuildClassInfoListEx #(ptr long) -406 stub DiGetClassDevsEx #(ptr str str word word) -407 stub DiCopyRegSubKeyValue #(word str str str) -408 stub IPGETDRIVERDATE -409 stub IPGETDRIVERVERSION -410 stub IpGetVersionString #(str str ptr word str) -411 pascal VcpExplain(ptr long) VcpExplain16 -412 stub DiBuildDriverIndex #(word) -413 stub DiAddSingleInfToDrvIdx #(str word word) -414 stub FCEGETFLAGS -450 stub UiMakeDlgNonBold #(word) -451 stub UiDeleteNonBoldFont #(word) -500 stub SUEBDPAGE -501 stub SUOCPAGE -502 stub SXLISTSUBPROC -503 stub SXFILLLB -504 stub SXOCPAGEDLG -506 stub SXOCBATCHSETTINGS -507 stub SXOCFIXNEEDS -508 pascal -ret16 CtlSetLddPath(word str) CtlSetLddPath16 -509 stub SXCALLOCPROC -510 stub BUILDINFOCS -511 stub BUILDREGOCS -512 stub DELETEOCS -520 stub DiBuildClassDrvInfoList #(ptr) -521 stub DiBuildCompatDrvInfoList #(ptr) -522 stub DiDestroyDrvInfoList #(ptr) -523 stub DiConvertDriverInfoToDriverNode #(ptr ptr) -524 stub DISELECTBESTCOMPATDRV -525 stub FirstBootMoveToDOSSTART #(str word) -526 stub DOSOptEnableCurCfg #(str) -527 pascal -ret16 InstallHinfSection(word word str word) InstallHinfSection16 -528 stub SXMAKEUNCPATH -529 stub SXISSBSSERVERFILE -530 stub SXFINDBATCHFILES -531 stub ISPANEUROPEAN -532 stub UPGRADENIGGLINGS -533 stub DISPLAY_ISSECONDDISPLAY -534 stub ISWINDOWSFILE -540 stub VERIFYSELECTEDDRIVER -575 stub SXCALLMIGRATIONDLLS -576 stub SXCALLMIGRATIONDLLS_RUNDLL -600 stub PidConstruct #(str str str word) -601 stub PidValidate #(str str) -602 stub GETJAPANESEKEYBOARDTYPE -610 stub CRC32COMPUTE -621 stub SXSAVEINFO -622 stub SXADDPAGEEX -623 stub OPKREMOVEINSTALLEDNETDEVICE -640 stub DOFIRSTRUNSCREENS -700 stub SXSHOWREBOOTDLG -701 stub SXSHOWREBOOTDLG_RUNDLL -750 stub UIPOSITIONDIALOG -775 stub ASPICLEAN -800 stub EXTRACTCABFILE -825 stub PIDGEN3 -826 stub GETSETUPINFO -827 stub SETSETUPINFO -828 stub GETKEYBOARDOPTIONS -829 stub GETLOCALEOPTIONS -830 stub SETINTLOPTIONS -831 stub GETPRODUCTTYPE -832 stub ISOPKMODE -833 stub AUDITONETIMEINSTALL -834 stub DISKDUP -835 stub OPKPREINSTALL -836 stub ISAUDITMODE -837 stub ISAUDITAUTO -838 stub GETVALIDEULA Removed: trunk/reactos/dll/win32/setupapi/setupx16.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupx16…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupx16.h (original) +++ trunk/reactos/dll/win32/setupapi/setupx16.h (removed) @@ -1,563 +1,0 @@ -/* - * Copyright 2000 Andreas Mohr for CodeWeavers - * - * 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 - */ - -#ifndef __SETUPX16_H -#define __SETUPX16_H - -#include "wine/windef16.h" - -typedef UINT16 DI_FUNCTION16; -typedef UINT16 HINF16; -typedef UINT16 LOGDISKID16; -typedef UINT16 VHSTR; - -#define LINE_LEN 256 - -/* error codes stuff */ - -typedef UINT16 RETERR16; -#define OK 0 -#define IP_ERROR (UINT16)100 -#define TP_ERROR (UINT16)200 -#define VCP_ERROR (UINT16)300 -#define GEN_ERROR (UINT16)400 -#define DI_ERROR (UINT16)500 - -enum { - ERR_IP_INVALID_FILENAME = IP_ERROR+1, - ERR_IP_ALLOC_ERR, - ERR_IP_INVALID_SECT_NAME, - ERR_IP_OUT_OF_HANDLES, - ERR_IP_INF_NOT_FOUND, - ERR_IP_INVALID_INFFILE, - ERR_IP_INVALID_HINF, - ERR_IP_INVALID_FIELD, - ERR_IP_SECT_NOT_FOUND, - ERR_IP_END_OF_SECTION, - ERR_IP_PROFILE_NOT_FOUND, - ERR_IP_LINE_NOT_FOUND, - ERR_IP_FILEREAD, - ERR_IP_TOOMANYINFFILES, - ERR_IP_INVALID_SAVERESTORE, - ERR_IP_INVALID_INFTYPE -}; - -/****** virtual copy operations ******/ - -typedef DWORD LPEXPANDVTBL; - -typedef struct { - DWORD dwSoFar; - DWORD dwTotal; -} VCPPROGRESS, *LPVCPPROGRESS; - -typedef struct { - WORD cbSize; - LOGDISKID16 ldid; - VHSTR vhstrRoot; - VHSTR vhstrVolumeLabel; - VHSTR vhstrDiskName; - WORD wVolumeTime; - WORD wVolumeDate; - DWORD dwSerialNumber; - WORD fl; - LPARAM lparamRef; - - VCPPROGRESS prgFileRead; - VCPPROGRESS prgByteRead; - - VCPPROGRESS prgFileWrite; - VCPPROGRESS prgByteWrite; -} VCPDISKINFO, *LPVCPDISKINFO; - -typedef struct { - LOGDISKID16 ldid; - VHSTR vhstrDir; - VHSTR vhstrFileName; -} VCPFILESPEC, *LPVCPFILESPEC; - -typedef struct { - UINT16 uiMDate; - UINT16 uiMTime; - UINT16 uiADate; - UINT16 uiATime; - UINT16 uiAttr; - DWORD llenIn; - DWORD llenOut; -} VCPFATTR, *LPVCPFATTR; - -typedef struct { - UINT16 uDate; - UINT16 uTime; - DWORD dwSize; -} VCPFILESTAT, *LPVCPFILESTAT; - -typedef struct -{ - HFILE16 hFileSrc; - HFILE16 hFileDst; - VCPFATTR fAttr; - WORD dosError; - VHSTR vhstrFileName; - WPARAM vcpm; -} VIRTNODEEX, *LPVIRTNODEEX; - -typedef struct { - WORD cbSize; - VCPFILESPEC vfsSrc; - VCPFILESPEC vfsDst; - WORD fl; - LPARAM lParam; - LPEXPANDVTBL lpExpandVtbl; - LPVIRTNODEEX lpvnex; - VHSTR vhstrDstFinalName; - VCPFILESTAT vFileStat; -} VIRTNODE, *LPVIRTNODE; - -typedef struct { - WORD cbSize; - VCPPROGRESS prgDiskRead; - VCPPROGRESS prgFileRead; - VCPPROGRESS prgByteRead; - - VCPPROGRESS prgDiskWrite; - VCPPROGRESS prgFileWrite; - VCPPROGRESS prgByteWrite; - - LPVCPDISKINFO lpvdiIn; - LPVCPDISKINFO lpvdiOut; - LPVIRTNODE lpvn; -} VCPSTATUS, *LPVCPSTATUS; - -#define CNFL_BACKUP 0x0001 -#define CNFL_DELETEONFAILURE 0x0002 -#define CNFL_RENAMEONSUCCESS 0x0004 -#define CNFL_CONTINUATION 0x0008 -#define CNFL_SKIPPED 0x0010 -#define CNFL_IGNOREERRORS 0x0020 -#define CNFL_RETRYFILE 0x0040 -#define CNFL_COPIED 0x0080 -#define VNFL_UNIQUE 0x0000 -#define VNFL_MULTIPLEOK 0x0100 -#define VNFL_DESTROYOLD 0x0200 -#define VNFL_COPY 0x0000 -#define VNFL_DELETE 0x0800 -#define VNFL_RENAME 0x1000 -#define VNFL_NODE_TYPE (VNFL_RENAME|VNFL_DELETE|VNFL_COPY) -#define VNFL_CREATED 0x2000 -#define VNFL_REJECTED 0x4000 -#define VNFL_DEVICEINSTALLER 0x8000 - -enum { - ERR_VCP_IOFAIL = VCP_ERROR+1, - ERR_VCP_STRINGTOOLONG, - ERR_VCP_NOMEM, - ERR_VCP_QUEUEFULL, - ERR_VCP_NOVHSTR, - ERR_VCP_OVERFLOW, - ERR_VCP_BADARG, - ERR_VCP_UNINIT, - ERR_VCP_NOTFOUND, - ERR_VCP_BUSY, - ERR_VCP_INTERRUPTED, - ERR_VCP_BADDEST, - ERR_VCP_SKIPPED, - ERR_VCP_IO, - ERR_VCP_LOCKED, - ERR_VCP_WRONGDISK, - ERR_VCP_CHANGEMODE, - ERR_VCP_LDDINVALID, - ERR_VCP_LDDFIND, - ERR_VCP_LDDUNINIT, - ERR_VCP_LDDPATH_INVALID, - ERR_VCP_NOEXPANSION, - ERR_VCP_NOTOPEN, - ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG, - ERR_VCP_NO_DIGITAL_SIGNATURE_FILE -}; - -#define VCPN_OK 0 -#define VCPN_PROCEED 0 -#define VCPN_ABORT -1 -#define VCPN_RETRY -2 -#define VCPN_IGNORE -3 -#define VCPN_SKIP -4 -#define VCPN_FORCE -5 -#define VCPN_DEFER -6 -#define VCPN_FAIL -7 -#define VCPN_RETRYFILE -8 - -#define VCPFL_ABANDON 0x00 -#define VCPFL_BACKUP 0x01 -#define VCPFL_COPY 0x02 -#define VCPFL_BACKUPANDCOPY (VCPFL_BACKUP|VCPFL_COPY) -#define VCPFL_INSPECIFIEDORDER 0x04 -#define VCPFL_DELETE 0x08 -#define VCPFL_RENAME 0x10 -#define VCPFL_ALL (VCPFL_COPY|VCPFL_DELETE|VCPFL_RENAME) - -#define CFNL_BACKUP 0x0001 -#define CFNL_DELETEONFAILURE 0x0002 -#define CFNL_RENAMEONSUCCESS 0x0004 -#define CFNL_CONTINUATION 0x0008 -#define CFNL_SKIPPED 0x0010 -#define CFNL_IGNOREERRORS 0x0020 -#define CFNL_RETRYFILE 0x0040 -#define CFNL_COPIED 0x0080 -#define VFNL_MULTIPLEOK 0x0100 -#define VFNL_DESTROYOLD 0x0200 -#define VFNL_NOW 0x0400 -#define VFNL_COPY 0x0000 -#define VFNL_DELETE 0x0800 -#define VFNL_RENAME 0x1000 -#define VFNL_CREATED 0x2000 -#define VFNL_REJECTED 0x4000 -#define VCPM_DISKCLASS 0x01 -#define VCPM_DISKFIRST 0x0100 -#define VCPM_DISKLAST 0x01ff - -enum { - VCPM_DISKCREATEINFO = VCPM_DISKFIRST, - VCPM_DISKGETINFO, - VCPM_DISKDESTROYINFO, - VCPM_DISKPREPINFO, - VCPM_DISKENSURE, - VCPM_DISKPROMPT, - VCPM_DISKFORMATBEGIN, - VCPM_DISKFORMATTING, - VCPM_DISKFORMATEND -}; - -#define VCPM_FILEINCLASS 0x02 -#define VCPM_FILEOUTCLASS 0x03 -#define VCPM_FILEFIRSTIN 0x0200 -#define VCPM_FILEFIRSTOUT 0x0300 -#define VCPM_FILELAST 0x03ff - -enum { - VCPM_FILEOPENIN = VCPM_FILEFIRSTIN, - VCPM_FILEGETFATTR, - VCPM_FILECLOSEIN, - VCPM_FILECOPY, - VCPM_FILENEEDED, - - VCPM_FILEOPENOUT = VCPM_FILEFIRSTOUT, - VCPM_FILESETFATTR, - VCPM_FILECLOSEOUT, - VCPM_FILEFINALIZE, - VCPM_FILEDELETE, - VCPM_FILERENAME -}; - -#define VCPM_NODECLASS 0x04 -#define VCPM_NODEFIRST 0x0400 -#define VCPM_NODELAST 0x04ff - -enum { - VCPM_NODECREATE = VCPM_NODEFIRST, - VCPM_NODEACCEPT, - VCPM_NODEREJECT, - VCPM_NODEDESTROY, - VCPM_NODECHANGEDESTDIR, - VCPM_NODECOMPARE -}; - -#define VCPM_TALLYCLASS 0x05 -#define VCPM_TALLYFIRST 0x0500 -#define VCPM_TALLYLAST 0x05ff - -enum { - VCPM_TALLYSTART = VCPM_TALLYFIRST, - VCPM_TALLYEND, - VCPM_TALLYFILE, - VCPM_TALLYDISK -}; - -#define VCPM_VERCLASS 0x06 -#define VCPM_VERFIRST 0x0600 -#define VCPM_VERLAST 0x06ff - -enum { - VCPM_VERCHECK = VCPM_VERFIRST, - VCPM_VERCHECKDONE, - VCPM_VERRESOLVECONFLICT -}; - -#define VCPM_VSTATCLASS 0x07 -#define VCPM_VSTATFIRST 0x0700 -#define VCPM_VSTATLAST 0x07ff - -enum { - VCPM_VSTATSTART = VCPM_VSTATFIRST, - VCPM_VSTATEND, - VCPM_VSTATREAD, - VCPM_VSTATWRITE, - VCPM_VSTATNEWDISK, - VCPM_VSTATCLOSESTART, - VCPM_VSTATCLOSEEND, - VCPM_VSTATBACKUPSTART, - VCPM_VSTATBACKUPEND, - VCPM_VSTATRENAMESTART, - VCPM_VSTATRENAMEEND, - VCPM_VSTATCOPYSTART, - VCPM_VSTATCOPYEND, - VCPM_VSTATDELETESTART, - VCPM_VSTATDELETEEND, - VCPM_VSTATPATHCHECKSTART, - VCPM_VSTATPATHCHECKEND, - VCPM_VSTATCERTIFYSTART, - VCPM_VSTATCERTIFYEND, - VCPM_VSTATUSERABORT, - VCPM_VSTATYIELD -}; - -#define VCPM_PATHCLASS 0x08 -#define VCPM_PATHFIRST 0x0800 -#define VCPM_PATHLAST 0x08ff - -enum { - VCPM_BUILDPATH = VCPM_PATHFIRST, - VCPM_UNIQUEPATH, - VCPM_CHECKPATH -}; - -#define VCPM_PATCHCLASS 0x09 -#define VCPM_PATCHFIRST 0x0900 -#define VCPM_PATCHLAST 0x09ff - -enum { - VCPM_FILEPATCHBEFORECPY = VCPM_PATCHFIRST, - VCPM_FILEPATCHAFTERCPY, - VCPM_FILEPATCHINFOPEN, - VCPM_FILEPATCHINFCLOSE -}; - -#define VCPM_CERTCLASS 0x0a -#define VCPM_CERTFIRST 0x0a00 -#define VCPM_CERTLAST 0x0aff - -enum { - VCPM_FILECERTIFY = VCPM_CERTFIRST, - VCPM_FILECERTIFYWARN -}; - -typedef LRESULT (CALLBACK *VIFPROC)(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, LPARAM lParam, LPARAM lparamRef); - -typedef int (CALLBACK *VCPENUMPROC)(LPVIRTNODE lpvn, LPARAM lparamRef); - -RETERR16 WINAPI VcpOpen16(VIFPROC vifproc, LPARAM lparamMsgRef); - -/* VcpQueueCopy flags */ -#define VNLP_SYSCRITICAL 0x0001 -#define VNLP_SETUPCRITICAL 0x0002 -#define VNLP_NOVERCHECK 0x0004 -#define VNLP_FORCETEMP 0x0008 -#define VNLP_IFEXISTS 0x0010 -#define VNLP_KEEPNEWER 0x0020 -#define VNLP_PATCHIFEXIST 0x0040 -#define VNLP_NOPATCH 0x0080 -#define VNLP_CATALOGCERT 0x0100 -#define VNLP_NEEDCERTIFY 0x0200 -#define VNLP_COPYIFEXISTS 0x0400 - -RETERR16 WINAPI VcpQueueCopy16( - LPCSTR lpszSrcFileName, LPCSTR lpszDstFileName, - LPCSTR lpszSrcDir, LPCSTR lpszDstDir, - LOGDISKID16 ldidSrc, LOGDISKID16 ldidDst, - LPEXPANDVTBL lpExpandVtbl, - WORD fl, LPARAM lParam -); -RETERR16 VcpFlush16(WORD fl, LPCSTR lpszBackupDest); -RETERR16 WINAPI VcpClose16(WORD fl, LPCSTR lpszBackupDest); - -/* VcpExplain flags */ -enum { - VCPEX_SRC_DISK, - VCPEX_SRC_CABINET, - VCPEX_SRC_LOCN, - VCPEX_DST_LOCN, - VCPEX_SRC_FILE, - VCPEX_DST_FILE, - VCPEX_DST_FILE_FINAL, - VCPEX_DOS_ERROR, - VCPEX_MESSAGE, - VCPEX_DOS_SOLUTION, - VCPEX_SRC_FULL, - VCPEX_DST_FULL, - VCPEX_DST_FULL_FINAL -}; - -LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat); - -/****** logical disk management ******/ - -typedef struct _LOGDISKDESC_S { /* ldd */ - WORD cbSize; /* struct size */ - LOGDISKID16 ldid; /* logical disk ID */ - LPSTR pszPath; /* path this descriptor points to */ - LPSTR pszVolLabel; /* volume label of the disk related to it */ - LPSTR pszDiskName; /* name of this disk */ - WORD wVolTime; /* modification time of volume label */ - WORD wVolDate; /* modification date */ - DWORD dwSerNum; /* serial number of disk */ - WORD wFlags; -} LOGDISKDESC_S, *LPLOGDISKDESC; - -/** logical disk identifiers (LDID) **/ - -/* predefined LDIDs */ -#define LDID_PREDEF_START 0x0001 -#define LDID_PREDEF_END 0x7fff - -/* registry-assigned LDIDs */ -#define LDID_VAR_START 0x7000 -#define LDID_VAR_END 0x7fff - -/* dynamically assigned LDIDs */ -#define LDID_ASSIGN_START 0x8000 -#define LDID_ASSIGN_END 0xbfff - -#define LDID_NULL 0 -#define LDID_ABSOLUTE ((UINT)-1) -#define LDID_SRCPATH 1 /* setup source path */ -#define LDID_SETUPTEMP 2 /* setup temp dir */ -#define LDID_UNINSTALL 3 /* uninstall dir */ -#define LDID_BACKUP 4 /* backup dir */ -#define LDID_SETUPSCRATCH 5 /* setup scratch dir */ -#define LDID_WIN 10 /* win dir */ -#define LDID_SYS 11 /* win system dir */ -#define LDID_IOS 12 /* win Iosubsys dir */ -#define LDID_CMD 13 /* win command dir */ -#define LDID_CPL 14 /* win control panel dir */ -#define LDID_PRINT 15 /* win printer dir */ -#define LDID_MAIL 16 /* win mail dir */ -#define LDID_INF 17 /* win inf dir */ -#define LDID_HELP 18 /* win help dir */ -#define LDID_WINADMIN 19 /* admin dir */ -#define LDID_FONTS 20 /* win fonts dir */ -#define LDID_VIEWERS 21 /* win viewers dir */ -#define LDID_VMM32 22 /* win VMM32 dir */ -#define LDID_COLOR 23 /* win color mngment dir */ -#define LDID_APPS 24 /* win apps dir */ -#define LDID_SHARED 25 /* win shared dir */ -#define LDID_WINBOOT 26 /* guaranteed win boot drive */ -#define LDID_MACHINE 27 /* machine specific files */ -#define LDID_HOST_WINBOOT 28 -#define LDID_BOOT 30 /* boot drive root dir */ -#define LDID_BOOT_HOST 31 /* boot drive host root dir */ -#define LDID_OLD_WINBOOT 32 /* root subdir */ -#define LDID_OLD_WIN 33 /* old windows dir */ - -/* flags for GenInstall() */ -#define GENINSTALL_DO_FILES 1 -#define GENINSTALL_DO_INI 2 -#define GENINSTALL_DO_REG 4 -#define GENINSTALL_DO_INI2REG 8 -#define GENINSTALL_DO_CFGAUTO 16 -#define GENINSTALL_DO_LOGCONFIG 32 -#define GENINSTALL_DO_REGSRCPATH 64 -#define GENINSTALL_DO_PERUSER 128 - -#define GEINISTALL_DO_INIREG 14 -#define GENINSTALL_DO_ALL 255 - -/* - * flags for InstallHinfSection() - * 128 can be added, too. This means that the .inf file is provided by you - * instead of being a 32 bit file (i.e. Windows .inf file). - * In this case all files you install must be in the same dir - * as your .inf file on the install disk. - */ -#define HOW_NEVER_REBOOT 0 -#define HOW_ALWAYS_SILENT_REBOOT 1 -#define HOW_ALWAYS_PROMPT_REBOOT 2 -#define HOW_SILENT_REBOOT 3 -#define HOW_PROMPT_REBOOT 4 - -/****** device installation stuff ******/ - -#define MAX_CLASS_NAME_LEN 32 -#define MAX_DEVNODE_ID_LEN 256 -#define MAX_GUID_STR 50 - -typedef struct _DEVICE_INFO -{ - UINT16 cbSize; - struct _DEVICE_INFO *lpNextDi; - char szDescription[LINE_LEN]; - DWORD dnDevnode; - HKEY hRegKey; - char szRegSubkey[MAX_DEVNODE_ID_LEN]; - char szClassName[MAX_CLASS_NAME_LEN]; - DWORD Flags; - HWND16 hwndParent; - /*LPDRIVER_NODE*/ LPVOID lpCompatDrvList; - /*LPDRIVER_NODE*/ LPVOID lpClassDrvList; - /*LPDRIVER_NODE*/ LPVOID lpSelectedDriver; - ATOM atDriverPath; - ATOM atTempInfFile; - HINSTANCE16 hinstClassInstaller; - HINSTANCE16 hinstClassPropProvidor; - HINSTANCE16 hinstDevicePropProvidor; - HINSTANCE16 hinstBasicPropProvidor; - FARPROC16 fpClassInstaller; - FARPROC16 fpClassEnumPropPages; - FARPROC16 fpDeviceEnumPropPages; - FARPROC16 fpEnumBasicProperties; - DWORD dwSetupReserved; - DWORD dwClassInstallReserved; - /*GENCALLBACKPROC*/ LPVOID gicpGenInstallCallBack; - - LPARAM gicplParam; - UINT16 InfType; - - HINSTANCE16 hinstPrivateProblemHandler; - FARPROC16 fpPrivateProblemHandler; - LPARAM lpClassInstallParams; - struct _DEVICE_INFO *lpdiChildList; - DWORD dwFlagsEx; - /*LPDRIVER_INFO*/ LPVOID lpCompatDrvInfoList; - /*LPDRIVER_INFO*/ LPVOID lpClassDrvInfoList; - char szClassGUID[MAX_GUID_STR]; -} DEVICE_INFO16, *LPDEVICE_INFO16, **LPLPDEVICE_INFO16; - - -extern void WINAPI GenFormStrWithoutPlaceHolders16(LPSTR,LPCSTR,HINF16); -extern RETERR16 WINAPI IpOpen16(LPCSTR,HINF16 *); -extern RETERR16 WINAPI IpClose16(HINF16); -extern RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC); -extern RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC); -extern RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC); -extern RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC); -extern RETERR16 WINAPI CtlDelLdd16(LOGDISKID16); -extern RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath); -extern RETERR16 WINAPI GenInstall16(HINF16,LPCSTR,WORD); - -typedef struct tagLDD_LIST { - LPLOGDISKDESC pldd; - struct tagLDD_LIST *next; -} LDD_LIST; - -#define INIT_LDD(ldd, LDID) \ - do { \ - memset(&(ldd), 0, sizeof(LOGDISKDESC_S)); \ - (ldd).cbSize = sizeof(LOGDISKDESC_S); \ - ldd.ldid = LDID; \ - } while(0) - -#endif /* __SETUPX16_H */ Removed: trunk/reactos/dll/win32/setupapi/setupx_main.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupx_m…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupx_main.c (original) +++ trunk/reactos/dll/win32/setupapi/setupx_main.c (removed) @@ -1,615 +1,0 @@ -/* - * SETUPX library - * - * Copyright 1998,2000 Andreas Mohr - * - * 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 - * - * FIXME: Rather non-functional functions for now. - * - * See: - *
http://www.geocities.com/SiliconValley/Network/5317/drivers.html
- *
http://willemer.de/informatik/windows/inf_info.htm
(German) - *
http://www.microsoft.com/ddk/ddkdocs/win98ddk/devinst_12uw.htm
- * DDK: setupx.h - *
http://mmatrix.tripod.com/customsystemfolder/infsysntaxfull.html
- *
http://www.rdrop.com/~cary/html/inf_faq.html
- *
http://support.microsoft.com/support/kb/articles/q194/6/40.asp
- * - * Stuff tested with: - * - rs405deu.exe (German Acroread 4.05 setup) - * - ie5setup.exe - * - Netmeeting - * - * FIXME: - * - string handling is... weird ;) (buflen etc.) - * - memory leaks ? - * - separate that mess (but probably only when it's done completely) - * - * SETUPX consists of several parts with the following acronyms/prefixes: - * Di device installer (devinst.c ?) - * Gen generic installer (geninst.c ?) - * Ip .INF parsing (infparse.c) - * LDD logical device descriptor (ldd.c ?) - * LDID logical device ID - * SU setup (setup.c ?) - * Tp text processing (textproc.c ?) - * Vcp virtual copy module (vcp.c ?) - * ... - * - * The SETUPX DLL is NOT thread-safe. That's why many installers urge you to - * "close all open applications". - * All in all the design of it seems to be a bit weak. - * Not sure whether my implementation of it is better, though ;-) - */ - -#include <stdlib.h> -#include <stdarg.h> -#include <stdio.h> -#include <string.h> -#include "windef.h" -#include "winbase.h" -#include "winreg.h" -#include "winerror.h" -#include "wine/winuser16.h" -#include "wownt32.h" -#include "wingdi.h" -#include "winuser.h" -#include "winnls.h" -#include "setupapi.h" -#include "setupx16.h" -#include "setupapi_private.h" -#include "winerror.h" -#include "wine/debug.h" - -WINE_DEFAULT_DEBUG_CHANNEL(setupapi); - -#define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16)) - -/*********************************************************************** - * SURegOpenKey (SETUPX.47) - */ -DWORD WINAPI SURegOpenKey( HKEY hkey, LPCSTR lpszSubKey, PHKEY retkey ) -{ - FIXME("(%p,%s,%p), semi-stub.\n",hkey,debugstr_a(lpszSubKey),retkey); - return RegOpenKeyA( hkey, lpszSubKey, retkey ); -} - -/*********************************************************************** - * SURegQueryValueEx (SETUPX.50) - */ -DWORD WINAPI SURegQueryValueEx( HKEY hkey, LPSTR lpszValueName, - LPDWORD lpdwReserved, LPDWORD lpdwType, - LPBYTE lpbData, LPDWORD lpcbData ) -{ - FIXME("(%p,%s,%p,%p,%p,%ld), semi-stub.\n",hkey,debugstr_a(lpszValueName), - lpdwReserved,lpdwType,lpbData,lpcbData?*lpcbData:0); - return RegQueryValueExA( hkey, lpszValueName, lpdwReserved, lpdwType, - lpbData, lpcbData ); -} - - -/*********************************************************************** - * InstallHinfSection (SETUPX.527) - * - * hwnd = parent window - * hinst = instance of SETUPX.DLL - * lpszCmdLine = e.g. "DefaultInstall 132 C:\MYINSTALL\MYDEV.INF" - * Here "DefaultInstall" is the .inf file section to be installed (optional). - * The 132 value is made of the HOW_xxx flags and sometimes 128 (-> setupx16.h). - * - * nCmdShow = nCmdShow of CreateProcess - */ -RETERR16 WINAPI InstallHinfSection16( HWND16 hwnd, HINSTANCE16 hinst, LPCSTR lpszCmdLine, INT16 nCmdShow) -{ - InstallHinfSectionA( HWND_32(hwnd), HINSTANCE_32(hinst), lpszCmdLine, nCmdShow ); - return OK; -} - -typedef struct -{ - LPCSTR RegValName; - LPCSTR StdString; /* fallback string; sub dir of windows directory */ -} LDID_DATA; - -static const LDID_DATA LDID_Data[34] = -{ - { /* 0 (LDID_NULL) -- not defined */ - NULL, - NULL - }, - { /* 1 (LDID_SRCPATH) = source of installation. hmm, what to do here ? */ - "SourcePath", /* hmm, does SETUPX have to care about updating it ?? */ - NULL - }, - { /* 2 (LDID_SETUPTEMP) = setup temp dir */ - "SetupTempDir", - NULL - }, - { /* 3 (LDID_UNINSTALL) = uninstall backup dir */ - "UninstallDir", - NULL - }, - { /* 4 (LDID_BACKUP) = backup dir */ - "BackupDir", - NULL - }, - { /* 5 (LDID_SETUPSCRATCH) = setup scratch dir */ - "SetupScratchDir", - NULL - }, - { /* 6 -- not defined */ - NULL, - NULL - }, - { /* 7 -- not defined */ - NULL, - NULL - }, - { /* 8 -- not defined */ - NULL, - NULL - }, - { /* 9 -- not defined */ - NULL, - NULL - }, - { /* 10 (LDID_WIN) = windows dir */ - "WinDir", - "" - }, - { /* 11 (LDID_SYS) = system dir */ - "SysDir", - NULL /* call GetSystemDirectory() instead */ - }, - { /* 12 (LDID_IOS) = IOSubSys dir */ - NULL, /* FIXME: registry string ? */ - "SYSTEM\\IOSUBSYS" - }, - { /* 13 (LDID_CMD) = COMMAND dir */ - NULL, /* FIXME: registry string ? */ - "COMMAND" - }, - { /* 14 (LDID_CPL) = control panel dir */ - NULL, - "" - }, - { /* 15 (LDID_PRINT) = windows printer dir */ - NULL, - "SYSTEM" /* correct ?? */ - }, - { /* 16 (LDID_MAIL) = destination mail dir */ - NULL, - "" - }, - { /* 17 (LDID_INF) = INF dir */ - "SetupScratchDir", /* correct ? */ - "INF" - }, - { /* 18 (LDID_HELP) = HELP dir */ - NULL, /* ??? */ - "HELP" - }, - { /* 19 (LDID_WINADMIN) = Admin dir */ - "WinAdminDir", - "" - }, - { /* 20 (LDID_FONTS) = Fonts dir */ - NULL, /* ??? */ - "FONTS" - }, - { /* 21 (LDID_VIEWERS) = Viewers */ - NULL, /* ??? */ - "SYSTEM\\VIEWERS" - }, - { /* 22 (LDID_VMM32) = VMM32 dir */ - NULL, /* ??? */ - "SYSTEM\\VMM32" - }, - { /* 23 (LDID_COLOR) = ICM dir */ - "ICMPath", - "SYSTEM\\COLOR" - }, - { /* 24 (LDID_APPS) = root of boot drive ? */ - "AppsDir", - "C:\\" - }, - { /* 25 (LDID_SHARED) = shared dir */ - "SharedDir", - "" - }, - { /* 26 (LDID_WINBOOT) = Windows boot dir */ - "WinBootDir", - "" - }, - { /* 27 (LDID_MACHINE) = machine specific files */ - "MachineDir", - NULL - }, - { /* 28 (LDID_HOST_WINBOOT) = Host Windows boot dir */ - "HostWinBootDir", - NULL - }, - { /* 29 -- not defined */ - NULL, - NULL - }, - { /* 30 (LDID_BOOT) = Root of boot drive */ - "BootDir", - NULL - }, - { /* 31 (LDID_BOOT_HOST) = Root of boot drive host */ - "BootHost", - NULL - }, - { /* 32 (LDID_OLD_WINBOOT) = subdir of root */ - "OldWinBootDir", - NULL - }, - { /* 33 (LDID_OLD_WIN) = old win dir */ - "OldWinDir", - NULL - } - /* the rest (34-38) isn't too interesting, so I'll forget about it */ -}; - -/* - * LDD == Logical Device Descriptor - * LDID == Logical Device ID - * - * The whole LDD/LDID business might go into a separate file named - * ldd.c. - * At the moment I don't know what the hell these functions are really doing. - * That's why I added reporting stubs. - * The only thing I do know is that I need them for the LDD/LDID infrastructure. - * That's why I implemented them in a way that's suitable for my purpose. - */ -static LDD_LIST *pFirstLDD = NULL; - -static BOOL std_LDDs_done = FALSE; - -void SETUPX_CreateStandardLDDs(void) -{ - HKEY hKey = 0; - WORD n; - DWORD type, len; - LOGDISKDESC_S ldd; - char buffer[MAX_PATH]; - - /* has to be here, otherwise loop */ - std_LDDs_done = TRUE; - - RegOpenKeyA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup", &hKey); - - for (n=0; n < sizeof(LDID_Data)/sizeof(LDID_DATA); n++) - { - buffer[0] = '\0'; - - len = MAX_PATH; - if ( (hKey) && (LDID_Data[n].RegValName) - && (RegQueryValueExA(hKey, LDID_Data[n].RegValName, - NULL, &type, (LPBYTE)buffer, &len) == ERROR_SUCCESS) - && (type == REG_SZ) ) - { - TRACE("found value '%s' for LDID %d\n", buffer, n); - } - else - switch(n) - { - case LDID_SRCPATH: - FIXME("LDID_SRCPATH: what exactly do we have to do here ?\n"); - strcpy(buffer, "X:\\FIXME"); - break; - case LDID_SYS: - GetSystemDirectoryA(buffer, MAX_PATH); - break; - case LDID_APPS: - case LDID_MACHINE: - case LDID_HOST_WINBOOT: - case LDID_BOOT: - case LDID_BOOT_HOST: - strcpy(buffer, "C:\\"); - break; - default: - if (LDID_Data[n].StdString) - { - DWORD len = GetWindowsDirectoryA(buffer, MAX_PATH); - LPSTR p; - p = buffer + len; - *p++ = '\\'; - strcpy(p, LDID_Data[n].StdString); - } - break; - } - if (buffer[0]) - { - INIT_LDD(ldd, n); - ldd.pszPath = buffer; - TRACE("LDID %d -> '%s'\n", ldd.ldid, ldd.pszPath); - CtlSetLdd16(&ldd); - } - } - if (hKey) RegCloseKey(hKey); -} - -/*********************************************************************** - * CtlDelLdd (SETUPX.37) - * - * RETURN - * ERR_VCP_LDDINVALID if ldid < LDID_ASSIGN_START. - */ -RETERR16 SETUPX_DelLdd(LOGDISKID16 ldid) -{ - LDD_LIST *pCurr, *pPrev = NULL; - - TRACE("(%d)\n", ldid); - - if (!std_LDDs_done) - SETUPX_CreateStandardLDDs(); - - if (ldid < LDID_ASSIGN_START) - return ERR_VCP_LDDINVALID; - - pCurr = pFirstLDD; - /* search until we find the appropriate LDD or hit the end */ - while ((pCurr != NULL) && (ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } - if ( (pCurr == NULL) /* hit end of list */ - || (ldid != pCurr->pldd->ldid) ) - return ERR_VCP_LDDFIND; /* correct ? */ - - /* ok, found our victim: eliminate it */ - - if (pPrev) - pPrev->next = pCurr->next; - - if (pCurr == pFirstLDD) - pFirstLDD = NULL; - HeapFree(GetProcessHeap(), 0, pCurr); - - return OK; -} - -/*********************************************************************** - * CtlDelLdd (SETUPX.37) - */ -RETERR16 WINAPI CtlDelLdd16(LOGDISKID16 ldid) -{ - FIXME("(%d); - please report this!\n", ldid); - return SETUPX_DelLdd(ldid); -} - -/*********************************************************************** - * CtlFindLdd (SETUPX.35) - * - * doesn't check pldd ptr validity: crash (W98SE) - * - * RETURN - * ERR_VCP_LDDINVALID if pldd->cbSize != structsize - * 1 in all other cases ?? - * - */ -RETERR16 WINAPI CtlFindLdd16(LPLOGDISKDESC pldd) -{ - LDD_LIST *pCurr, *pPrev = NULL; - - TRACE("(%p)\n", pldd); - - if (!std_LDDs_done) - SETUPX_CreateStandardLDDs(); - - if (pldd->cbSize != sizeof(LOGDISKDESC_S)) - return ERR_VCP_LDDINVALID; - - pCurr = pFirstLDD; - /* search until we find the appropriate LDD or hit the end */ - while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } - if ( (pCurr == NULL) /* hit end of list */ - || (pldd->ldid != pCurr->pldd->ldid) ) - return ERR_VCP_LDDFIND; /* correct ? */ - - memcpy(pldd, pCurr->pldd, pldd->cbSize); - /* hmm, we probably ought to strcpy() the string ptrs here */ - - return 1; /* what is this ?? */ -} - -/*********************************************************************** - * CtlSetLdd (SETUPX.33) - * - * Set an LDD entry. - * - * RETURN - * ERR_VCP_LDDINVALID if pldd.cbSize != sizeof(LOGDISKDESC_S) - * - */ -RETERR16 WINAPI CtlSetLdd16(LPLOGDISKDESC pldd) -{ - LDD_LIST *pCurr, *pPrev = NULL; - LPLOGDISKDESC pCurrLDD; - HANDLE heap; - BOOL is_new = FALSE; - - TRACE("(%p)\n", pldd); - - if (!std_LDDs_done) - SETUPX_CreateStandardLDDs(); - - if (pldd->cbSize != sizeof(LOGDISKDESC_S)) - return ERR_VCP_LDDINVALID; - - heap = GetProcessHeap(); - pCurr = pFirstLDD; - /* search until we find the appropriate LDD or hit the end */ - while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } - if (!pCurr || pldd->ldid != pCurr->pldd->ldid) - { - is_new = TRUE; - pCurr = HeapAlloc(heap, 0, sizeof(LDD_LIST)); - pCurr->pldd = HeapAlloc(heap, 0, sizeof(LOGDISKDESC_S)); - pCurr->next = NULL; - pCurrLDD = pCurr->pldd; - } - else - { - pCurrLDD = pCurr->pldd; - HeapFree(heap, 0, pCurrLDD->pszPath); - HeapFree(heap, 0, pCurrLDD->pszVolLabel); - HeapFree(heap, 0, pCurrLDD->pszDiskName); - } - - memcpy(pCurrLDD, pldd, sizeof(LOGDISKDESC_S)); - - if (pldd->pszPath) - { - pCurrLDD->pszPath = HeapAlloc( heap, 0, strlen(pldd->pszPath)+1 ); - strcpy( pCurrLDD->pszPath, pldd->pszPath ); - } - if (pldd->pszVolLabel) - { - pCurrLDD->pszVolLabel = HeapAlloc( heap, 0, strlen(pldd->pszVolLabel)+1 ); - strcpy( pCurrLDD->pszVolLabel, pldd->pszVolLabel ); - } - if (pldd->pszDiskName) - { - pCurrLDD->pszDiskName = HeapAlloc( heap, 0, strlen(pldd->pszDiskName)+1 ); - strcpy( pCurrLDD->pszDiskName, pldd->pszDiskName ); - } - - if (is_new) /* link into list */ - { - if (pPrev) - { - pCurr->next = pPrev->next; - pPrev->next = pCurr; - } - if (!pFirstLDD) - pFirstLDD = pCurr; - } - - return OK; -} - - -/*********************************************************************** - * CtlAddLdd (SETUPX.36) - * - * doesn't check pldd ptr validity: crash (W98SE) - * - */ -static LOGDISKID16 ldid_to_add = LDID_ASSIGN_START; -RETERR16 WINAPI CtlAddLdd16(LPLOGDISKDESC pldd) -{ - pldd->ldid = ldid_to_add++; - return CtlSetLdd16(pldd); -} - -/*********************************************************************** - * CtlGetLdd (SETUPX.34) - * - * doesn't check pldd ptr validity: crash (W98SE) - * What the !@#$%&*( is the difference between CtlFindLdd() and CtlGetLdd() ?? - * - * RETURN - * ERR_VCP_LDDINVALID if pldd->cbSize != structsize - * - */ -static RETERR16 SETUPX_GetLdd(LPLOGDISKDESC pldd) -{ - LDD_LIST *pCurr, *pPrev = NULL; - - if (!std_LDDs_done) - SETUPX_CreateStandardLDDs(); - - if (pldd->cbSize != sizeof(LOGDISKDESC_S)) - return ERR_VCP_LDDINVALID; - - pCurr = pFirstLDD; - /* search until we find the appropriate LDD or hit the end */ - while ((pCurr != NULL) && (pldd->ldid > pCurr->pldd->ldid)) - { - pPrev = pCurr; - pCurr = pCurr->next; - } - if (pCurr == NULL) /* hit end of list */ - return ERR_VCP_LDDFIND; /* correct ? */ - - memcpy(pldd, pCurr->pldd, pldd->cbSize); - /* hmm, we probably ought to strcpy() the string ptrs here */ - - return OK; -} - -/**********************************************************************/ - -RETERR16 WINAPI CtlGetLdd16(LPLOGDISKDESC pldd) -{ - FIXME("(%p); - please report this!\n", pldd); - return SETUPX_GetLdd(pldd); -} - -/*********************************************************************** - * CtlGetLddPath (SETUPX.38) - * - * Gets the path of an LDD. - * No crash if szPath == NULL. - * szPath has to be at least MAX_PATH_LEN bytes long. - * RETURN - * ERR_VCP_LDDUNINIT if LDD for LDID not found. - */ -RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath) -{ - TRACE("(%d, %p);\n", ldid, szPath); - - if (szPath) - { - LOGDISKDESC_S ldd; - INIT_LDD(ldd, ldid); - if (CtlFindLdd16(&ldd) == ERR_VCP_LDDFIND) - return ERR_VCP_LDDUNINIT; - SETUPX_GetLdd(&ldd); - strcpy(szPath, ldd.pszPath); - TRACE("ret '%s' for LDID %d\n", szPath, ldid); - } - return OK; -} - -/*********************************************************************** - * CtlSetLddPath (SETUPX.508) - * - * Sets the path of an LDD. - * Creates LDD for LDID if not existing yet. - */ -RETERR16 WINAPI CtlSetLddPath16(LOGDISKID16 ldid, LPSTR szPath) -{ - LOGDISKDESC_S ldd; - TRACE("(%d, '%s');\n", ldid, szPath); - - SetupSetDirectoryIdA( 0, ldid, szPath ); - INIT_LDD(ldd, ldid); - ldd.pszPath = szPath; - return CtlSetLdd16(&ldd); -} Modified: trunk/reactos/dll/win32/setupapi/stringtable.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/stringta…
============================================================================== --- trunk/reactos/dll/win32/setupapi/stringtable.c (original) +++ trunk/reactos/dll/win32/setupapi/stringtable.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" Modified: trunk/reactos/dll/win32/setupapi/stubs.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/stubs.c?…
============================================================================== --- trunk/reactos/dll/win32/setupapi/stubs.c (original) +++ trunk/reactos/dll/win32/setupapi/stubs.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "setupapi_private.h" @@ -58,6 +58,7 @@ DWORD destnamesize, PDWORD required, PWSTR *destinfnamecomponent) { + FIXME("%s %s 0x%lx 0x%lx\n", debugstr_w(sourceinffile), debugstr_w(sourcemedialoc), mediatype, copystyle); FIXME("stub: source %s location %s ...\n", debugstr_w(sourceinffile), debugstr_w(sourcemedialoc)); //return FALSE; Modified: trunk/reactos/dll/win32/setupapi/virtcopy.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/virtcopy…
============================================================================== --- trunk/reactos/dll/win32/setupapi/virtcopy.c (original) +++ trunk/reactos/dll/win32/setupapi/virtcopy.c Sun May 28 23:20:19 2006 @@ -15,7 +15,7 @@ * * 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 + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * * FIXME: we now rely on builtin setupapi.dll for dialog resources. * This is bad ! We ought to have 16bit resource handling working.
18 years, 7 months
1
0
0
0
[ion] 22090: - Add SecurityQoS and PreviousMode parameters to ObFindObject, so that these can be sent to the parse routine. Also don't send OBJECT_CREATE_INFORMATION to it, but each needed member separately. This avoids having to create a "Fake" structure in some calls which don't actually use capture the information. - Also remove RemainingPath and stop exposing it to public APIs. Move all ObInsertObject/ObOpen, ReferenceByName hacks to ObFindObject, and add a small one there. We basically trad
by ion@svn.reactos.org
Author: ion Date: Sun May 28 23:05:19 2006 New Revision: 22090 URL:
http://svn.reactos.ru/svn/reactos?rev=22090&view=rev
Log: - Add SecurityQoS and PreviousMode parameters to ObFindObject, so that these can be sent to the parse routine. Also don't send OBJECT_CREATE_INFORMATION to it, but each needed member separately. This avoids having to create a "Fake" structure in some calls which don't actually use capture the information. - Also remove RemainingPath and stop exposing it to public APIs. Move all ObInsertObject/ObOpen,ReferenceByName hacks to ObFindObject, and add a small one there. We basically trade 4 hacks for 1. Modified: trunk/reactos/ntoskrnl/include/internal/ob.h trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ob/obref.c trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c Modified: trunk/reactos/ntoskrnl/include/internal/ob.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/include/internal/o…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ob.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ob.h Sun May 28 23:05:19 2006 @@ -84,14 +84,17 @@ NTSTATUS NTAPI ObFindObject( - POBJECT_CREATE_INFORMATION ObjectCreateInfo, - PUNICODE_STRING ObjectName, - PVOID* ReturnedObject, - PUNICODE_STRING RemainingPath, - POBJECT_TYPE ObjectType, - POBP_LOOKUP_CONTEXT Context, + IN HANDLE RootHandle, + IN PUNICODE_STRING ObjectName, + IN ULONG Attributes, + IN KPROCESSOR_MODE PreviousMode, + IN PVOID *ReturnedObject, + IN POBJECT_TYPE ObjectType, + IN POBP_LOOKUP_CONTEXT Context, IN PACCESS_STATE AccessState, - IN PVOID ParseContext + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN PVOID ParseContext, + IN PVOID Insert ); NTSTATUS Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c Sun May 28 23:05:19 2006 @@ -754,7 +754,6 @@ IN OUT PVOID ParseContext, OUT PHANDLE Handle) { - UNICODE_STRING RemainingPath; PVOID Object = NULL; UNICODE_STRING ObjectName; OBJECT_CREATE_INFORMATION ObjectCreateInfo; @@ -797,25 +796,18 @@ } /* Now do the lookup */ - Status = ObFindObject(&ObjectCreateInfo, + Status = ObFindObject(ObjectCreateInfo.RootDirectory, &ObjectName, + ObjectCreateInfo.Attributes, + AccessMode, &Object, - &RemainingPath, ObjectType, - &Context, // Temporary Hack + &Context, PassedAccessState, - ParseContext); + ObjectCreateInfo.SecurityQos, + ParseContext, + NULL); if (!NT_SUCCESS(Status)) goto Cleanup; - - /* ROS Hack */ - if (RemainingPath.Buffer != NULL) - { - if (wcschr(RemainingPath.Buffer + 1, L'\\') == NULL) - Status = STATUS_OBJECT_NAME_NOT_FOUND; - else - Status =STATUS_OBJECT_PATH_NOT_FOUND; - goto Cleanup; - } /* Create the actual handle now */ Status = ObpCreateHandle(Object, @@ -826,9 +818,6 @@ Cleanup: /* Dereference the object */ if (Object) ObDereferenceObject(Object); - - /* ROS Hacl: Free the remaining path */ - RtlFreeUnicodeString(&RemainingPath); /* Delete the access state */ if (PassedAccessState == &AccessState) @@ -923,15 +912,13 @@ { POBJECT_CREATE_INFORMATION ObjectCreateInfo; POBJECT_HEADER Header; - POBJECT_HEADER_NAME_INFO ObjectNameInfo; PVOID FoundObject = NULL; POBJECT_HEADER FoundHeader = NULL; NTSTATUS Status = STATUS_SUCCESS; - UNICODE_STRING RemainingPath; - BOOLEAN ObjectAttached = FALSE; PSECURITY_DESCRIPTOR NewSecurityDescriptor = NULL; SECURITY_SUBJECT_CONTEXT SubjectContext; OBP_LOOKUP_CONTEXT Context; + POBJECT_HEADER_NAME_INFO ObjectNameInfo; PAGED_CODE(); /* Get the Header and Create Info */ @@ -942,111 +929,69 @@ /* First try to find the Object */ if (ObjectNameInfo && ObjectNameInfo->Name.Buffer) { - DPRINT("Object has a name. Trying to find it: %wZ.\n", &ObjectNameInfo->Name); - Status = ObFindObject(ObjectCreateInfo, + Status = ObFindObject(ObjectCreateInfo->RootDirectory, &ObjectNameInfo->Name, + ObjectCreateInfo->Attributes, + KernelMode, &FoundObject, - &RemainingPath, - NULL, + Header->Type, &Context, NULL, - NULL); - DPRINT("FoundObject: %x, Path: %wZ\n", FoundObject, &RemainingPath); - if (!NT_SUCCESS(Status)) - { - DPRINT1("ObFindObject() failed! (Status 0x%x)\n", Status); - return Status; - } + ObjectCreateInfo->SecurityQos, + NULL, + Object); + if (!NT_SUCCESS(Status)) return Status; if (FoundObject) { DPRINT("Getting header: %x\n", FoundObject); FoundHeader = OBJECT_TO_OBJECT_HEADER(FoundObject); } - - if (FoundHeader && RemainingPath.Buffer == NULL) - { - DPRINT("Object exists\n"); - ObDereferenceObject(FoundObject); - return STATUS_OBJECT_NAME_COLLISION; - } - } - else - { - DPRINT("No name, empty remaining path\n"); - RtlInitUnicodeString(&RemainingPath, NULL); - } - - if (FoundHeader && FoundHeader->Type == ObDirectoryType && - RemainingPath.Buffer) - { - /* The name was changed so let's update it */ - /* FIXME: TEMPORARY HACK This will go in ObFindObject in the next commit */ - PVOID NewName; - PWSTR BufferPos = RemainingPath.Buffer; - ULONG Delta = 0; - - ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(Header); - - if (BufferPos[0] == L'\\') - { - BufferPos++; - Delta = sizeof(WCHAR); - } - NewName = ExAllocatePool(NonPagedPool, RemainingPath.MaximumLength - Delta); - RtlMoveMemory(NewName, BufferPos, RemainingPath.MaximumLength - Delta); - if (ObjectNameInfo->Name.Buffer) ExFreePool(ObjectNameInfo->Name.Buffer); - ObjectNameInfo->Name.Buffer = NewName; - ObjectNameInfo->Name.Length = RemainingPath.Length - Delta; - ObjectNameInfo->Name.MaximumLength = RemainingPath.MaximumLength - Delta; - ObpInsertEntryDirectory(FoundObject, &Context, Header); - ObjectAttached = TRUE; - } - - if ((Header->Type == IoFileObjectType) || - (Header->Type->TypeInfo.OpenProcedure != NULL)) - { - DPRINT("About to call Open Routine\n"); - if (Header->Type == IoFileObjectType) - { - /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ - DPRINT("Calling IopCreateFile: %x\n", FoundObject); - Status = IopCreateFile(&Header->Body, - FoundObject, - RemainingPath.Buffer, - ObjectCreateInfo); - DPRINT("Called IopCreateFile: %x\n", Status); - - } - else if (Header->Type->TypeInfo.OpenProcedure != NULL) - { - DPRINT("Calling %x\n", Header->Type->TypeInfo.OpenProcedure); - Status = Header->Type->TypeInfo.OpenProcedure(ObCreateHandle, - NULL, - &Header->Body, - 0, - 0); - } - - if (!NT_SUCCESS(Status)) - { - DPRINT("Create Failed\n"); - if (ObjectAttached == TRUE) + } + else + { + /* + * OK, if we got here then that means we don't have a name, + * so RemainingPath.Buffer/RemainingPath would've been NULL + * under the old implemetantation, so just use NULL. + * If remaining path wouldn't have been NULL, then we would've + * called ObFindObject which already has this code. + * We basically kill 3-4 hacks and add 2 new ones. + */ + if ((Header->Type == IoFileObjectType) || + (Header->Type->TypeInfo.OpenProcedure != NULL)) + { + DPRINT("About to call Open Routine\n"); + if (Header->Type == IoFileObjectType) { - ObpDeleteEntryDirectory(&Context); + /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ + DPRINT("Calling IopCreateFile: %x\n", FoundObject); + Status = IopCreateFile(&Header->Body, + FoundObject, + NULL, + NULL); + DPRINT("Called IopCreateFile: %x\n", Status); } - if (FoundObject) + else if (Header->Type->TypeInfo.OpenProcedure) { - ObDereferenceObject(FoundObject); + DPRINT("Calling %x\n", Header->Type->TypeInfo.OpenProcedure); + Status = Header->Type->TypeInfo.OpenProcedure(ObCreateHandle, + NULL, + &Header->Body, + 0, + 0); } - RtlFreeUnicodeString(&RemainingPath); - return Status; - } - } - - RtlFreeUnicodeString(&RemainingPath); - - DPRINT("Security Assignment in progress\n"); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Create Failed\n"); + if (FoundObject) ObDereferenceObject(FoundObject); + return Status; + } + } + } + + DPRINT("Security Assignment in progress\n"); SeCaptureSubjectContext(&SubjectContext); /* Build the new security descriptor */ Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=22…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c (original) +++ trunk/reactos/ntoskrnl/ob/obname.c Sun May 28 23:05:19 2006 @@ -22,24 +22,28 @@ NTSTATUS NTAPI -ObFindObject(POBJECT_CREATE_INFORMATION ObjectCreateInfo, - PUNICODE_STRING ObjectName, - PVOID* ReturnedObject, - PUNICODE_STRING RemainingPath, - POBJECT_TYPE ObjectType, - POBP_LOOKUP_CONTEXT Context, +ObFindObject(IN HANDLE RootHandle, + IN PUNICODE_STRING ObjectName, + IN ULONG Attributes, + IN KPROCESSOR_MODE PreviousMode, + IN PVOID *ReturnedObject, + IN POBJECT_TYPE ObjectType, + IN POBP_LOOKUP_CONTEXT Context, IN PACCESS_STATE AccessState, - IN PVOID ParseContext) + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, + IN PVOID ParseContext, + IN PVOID Insert) { PVOID NextObject; PVOID CurrentObject; PVOID RootObject; POBJECT_HEADER CurrentHeader; - NTSTATUS Status; + NTSTATUS Status = STATUS_SUCCESS; PWSTR current; UNICODE_STRING PathString; - ULONG Attributes; UNICODE_STRING CurrentUs; + UNICODE_STRING Path; + PUNICODE_STRING RemainingPath = &Path; PAGED_CODE(); @@ -48,20 +52,20 @@ RtlInitUnicodeString (RemainingPath, NULL); - if (ObjectCreateInfo->RootDirectory == NULL) + if (RootHandle == NULL) { ObReferenceObjectByPointer(NameSpaceRoot, DIRECTORY_TRAVERSE, NULL, - ObjectCreateInfo->ProbeMode); + PreviousMode); CurrentObject = NameSpaceRoot; } else { - Status = ObReferenceObjectByHandle(ObjectCreateInfo->RootDirectory, + Status = ObReferenceObjectByHandle(RootHandle, 0, NULL, - ObjectCreateInfo->ProbeMode, + PreviousMode, &CurrentObject, NULL); if (!NT_SUCCESS(Status)) @@ -77,7 +81,7 @@ return STATUS_SUCCESS; } - if (ObjectCreateInfo->RootDirectory == NULL && + if (RootHandle == NULL && ObjectName->Buffer[0] != L'\\') { ObDereferenceObject (CurrentObject); @@ -104,7 +108,6 @@ current = PathString.Buffer; RootObject = CurrentObject; - Attributes = ObjectCreateInfo->Attributes; if (ObjectType == ObSymbolicLinkType) Attributes |= OBJ_OPENLINK; @@ -194,7 +197,7 @@ ObReferenceObjectByPointer(NextObject, DIRECTORY_TRAVERSE, NULL, - ObjectCreateInfo->ProbeMode); + PreviousMode); } @@ -214,7 +217,114 @@ RtlFreeUnicodeString (&PathString); *ReturnedObject = CurrentObject; - return STATUS_SUCCESS; + /* + * Icky hack: put the code that was in ObInsertObject here so that + * we can get rid of the "RemainingPath" stuff, which shouldn't + * be exposed outside of here. + * Also makes the interface closer to NT parsing, and will make the + * eventual changes easier to deal with + */ + if (Insert) + { + PVOID FoundObject = NULL; + POBJECT_HEADER Header = OBJECT_TO_OBJECT_HEADER(Insert); + POBJECT_HEADER FoundHeader = NULL; + BOOLEAN ObjectAttached = FALSE; + FoundObject = *ReturnedObject; + if (FoundObject) + { + FoundHeader = OBJECT_TO_OBJECT_HEADER(FoundObject); + } + + if (FoundHeader && RemainingPath->Buffer == NULL) + { + DPRINT("Object exists\n"); + ObDereferenceObject(FoundObject); + return STATUS_OBJECT_NAME_COLLISION; + } + + if (FoundHeader && FoundHeader->Type == ObDirectoryType && + RemainingPath->Buffer) + { + /* The name was changed so let's update it */ + PVOID NewName; + PWSTR BufferPos = RemainingPath->Buffer; + ULONG Delta = 0; + POBJECT_HEADER_NAME_INFO ObjectNameInfo; + + ObjectNameInfo = OBJECT_HEADER_TO_NAME_INFO(Header); + + if (BufferPos[0] == L'\\') + { + BufferPos++; + Delta = sizeof(WCHAR); + } + NewName = ExAllocatePool(NonPagedPool, RemainingPath->MaximumLength - Delta); + RtlMoveMemory(NewName, BufferPos, RemainingPath->MaximumLength - Delta); + if (ObjectNameInfo->Name.Buffer) ExFreePool(ObjectNameInfo->Name.Buffer); + ObjectNameInfo->Name.Buffer = NewName; + ObjectNameInfo->Name.Length = RemainingPath->Length - Delta; + ObjectNameInfo->Name.MaximumLength = RemainingPath->MaximumLength - Delta; + ObpInsertEntryDirectory(FoundObject, Context, Header); + ObjectAttached = TRUE; + } + + if ((Header->Type == IoFileObjectType) || + (Header->Type->TypeInfo.OpenProcedure != NULL)) + { + DPRINT("About to call Open Routine\n"); + if (Header->Type == IoFileObjectType) + { + /* TEMPORARY HACK. DO NOT TOUCH -- Alex */ + DPRINT("Calling IopCreateFile: %x\n", FoundObject); + Status = IopCreateFile(&Header->Body, + FoundObject, + RemainingPath->Buffer, + NULL); + DPRINT("Called IopCreateFile: %x\n", Status); + + } + else if (Header->Type->TypeInfo.OpenProcedure != NULL) + { + DPRINT("Calling %x\n", Header->Type->TypeInfo.OpenProcedure); + Status = Header->Type->TypeInfo.OpenProcedure(ObCreateHandle, + NULL, + &Header->Body, + 0, + 0); + } + + if (!NT_SUCCESS(Status)) + { + DPRINT("Create Failed\n"); + if (ObjectAttached == TRUE) + { + ObpDeleteEntryDirectory(Context); + } + if (FoundObject) + { + ObDereferenceObject(FoundObject); + } + RtlFreeUnicodeString(RemainingPath); + return Status; + } + } + RtlFreeUnicodeString(RemainingPath); + } + else + { + /* ROS Hack */ + DPRINT("REmaining path: %wZ\n", RemainingPath); + if (RemainingPath->Buffer != NULL) + { + if (wcschr(RemainingPath->Buffer + 1, L'\\') == NULL) + Status = STATUS_OBJECT_NAME_NOT_FOUND; + else + Status =STATUS_OBJECT_PATH_NOT_FOUND; + } + } + + return Status; } /* PUBLIC FUNCTIONS *********************************************************/ Modified: trunk/reactos/ntoskrnl/ob/obref.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/ob/obref.c?rev=220…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obref.c (original) +++ trunk/reactos/ntoskrnl/ob/obref.c Sun May 28 23:05:19 2006 @@ -200,9 +200,7 @@ PVOID* ObjectPtr) { PVOID Object = NULL; - UNICODE_STRING RemainingPath; UNICODE_STRING ObjectName; - OBJECT_CREATE_INFORMATION ObjectCreateInfo; NTSTATUS Status; OBP_LOOKUP_CONTEXT Context; AUX_DATA AuxData; @@ -224,36 +222,30 @@ if (!NT_SUCCESS(Status)) goto Quickie; } - /* - * Create a fake ObjectCreateInfo structure. Note that my upcoming - * ObFindObject refactoring will remove the need for this hack. - */ - ObjectCreateInfo.RootDirectory = NULL; - ObjectCreateInfo.Attributes = Attributes; - Status = ObFindObject(&ObjectCreateInfo, + /* Find the object */ + Status = ObFindObject(NULL, &ObjectName, + Attributes, + AccessMode, &Object, - &RemainingPath, ObjectType, &Context, PassedAccessState, - ParseContext); + NULL, + ParseContext, + NULL); if (!NT_SUCCESS(Status)) goto Quickie; /* ROS Hack */ - if (RemainingPath.Buffer != NULL || Object == NULL) + if (Object == NULL) { *ObjectPtr = NULL; - RtlFreeUnicodeString (&RemainingPath); Status = STATUS_OBJECT_NAME_NOT_FOUND; goto Quickie; } /* Return the object */ *ObjectPtr = Object; - - /* ROS Hack: Free the remaining path */ - RtlFreeUnicodeString(&RemainingPath); /* Free the access state */ if (PassedAccessState == &AccessState) Modified: trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/desktop.c Sun May 28 23:05:19 2006 @@ -150,7 +150,7 @@ Status = ObCreateObject(KernelMode, ExDesktopObjectType, &ObjectAttributes, - UserMode, + KernelMode, NULL, sizeof(DESKTOP_OBJECT), 0,
18 years, 7 months
1
0
0
0
[hpoussin] 22089: Forward more functions to setupapi
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun May 28 22:36:57 2006 New Revision: 22089 URL:
http://svn.reactos.ru/svn/reactos?rev=22089&view=rev
Log: Forward more functions to setupapi Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr32…
============================================================================== --- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (original) +++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def Sun May 28 22:36:57 2006 @@ -19,9 +19,9 @@ ; LIBRARY CFGMGR32.DLL EXPORTS -;CMP_Init_Detection +CMP_Init_Detection(a)4=SETUPAPI.CMP_Init_Detection ;CMP_RegisterNotification -;CMP_Report_LogOn +CMP_Report_LogOn(a)4=SETUPAPI.CMP_Report_LogOn ;CMP_UnregisterNotification ;CMP_WaitNoPendingInstallEvents ;CMP_WaitServices @@ -152,8 +152,8 @@ ;CM_Merge_Range_List ;CM_Modify_Res_Des ;CM_Modify_Res_Des_Ex -;CM_Move_DevNode -;CM_Move_DevNode_Ex +CM_Move_DevNode(a)12=SETUPAPI.CM_Move_DevNode +CM_Move_DevNode_Ex(a)16=SETUPAPI.CM_Move_DevNode_Ex ;CM_Next_Range CM_Open_Class_KeyA(a)24=SETUPAPI.CM_Open_Class_KeyA CM_Open_Class_KeyW(a)24=SETUPAPI.CM_Open_Class_KeyW @@ -167,8 +167,8 @@ ;CM_Query_Arbitrator_Free_Size_Ex ;CM_Query_Remove_SubTree ;CM_Query_Remove_SubTree_Ex -;CM_Reenumerate_DevNode -;CM_Reenumerate_DevNode_Ex +CM_Reenumerate_DevNode(a)8=SETUPAPI.CM_Reenumerate_DevNode +CM_Reenumerate_DevNode_Ex(a)12=SETUAPI.CM_Reenumerate_DevNode_Ex ;CM_Register_Device_Driver ;CM_Register_Device_Driver_Ex ;CM_Register_Device_InterfaceA @@ -199,11 +199,11 @@ ;CM_Set_HW_Prof_FlagsW ;CM_Set_HW_Prof_Flags_ExA ;CM_Set_HW_Prof_Flags_ExW -;CM_Setup_DevNode -;CM_Setup_DevNode_Ex +CM_Setup_DevNode(a)8=SETUPAPI.CM_Setup_DevNode +CM_Setup_DevNode_Ex(a)12=SETUPAPI.CM_Setup_DevNode_Ex ;CM_Test_Range_Available -;CM_Uninstall_DevNode -;CM_Uninstall_DevNode_Ex +CM_Uninstall_DevNode(a)8=SETUPAPI.CM_Uninstall_DevNode +CM_Uninstall_DevNode_Ex(a)12=SETUPAPI.CM_Uninstall_DevNode_Ex ;CM_Unregister_Device_InterfaceA ;CM_Unregister_Device_InterfaceW ;CM_Unregister_Device_Interface_ExA
18 years, 7 months
1
0
0
0
[hpoussin] 22088: [AUDIT] No code in cfgmgr32. All exported functions are redirected to setupapi
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun May 28 22:36:34 2006 New Revision: 22088 URL:
http://svn.reactos.ru/svn/reactos?rev=22088&view=rev
Log: [AUDIT] No code in cfgmgr32. All exported functions are redirected to setupapi Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def (props changed) trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.rc (props changed) Propchange: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.def ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -* Propchange: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.rc ------------------------------------------------------------------------------ --- svn:needs-lock (original) +++ svn:needs-lock (removed) @@ -1,1 +1,0 @@ -*
18 years, 7 months
1
0
0
0
[hpoussin] 22087: Rewrite SetupDiGetActualSectionToInstallExW: - Do less lookups in section names list - Take care of possible ProductType and SuiteMask fields in section names
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun May 28 20:44:52 2006 New Revision: 22087 URL:
http://svn.reactos.ru/svn/reactos?rev=22087&view=rev
Log: Rewrite SetupDiGetActualSectionToInstallExW: - Do less lookups in section names list - Take care of possible ProductType and SuiteMask fields in section names Modified: trunk/reactos/dll/win32/setupapi/devinst.c trunk/reactos/dll/win32/setupapi/parser.c trunk/reactos/dll/win32/setupapi/setupapi_private.h Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c Sun May 28 20:44:52 2006 @@ -84,6 +84,15 @@ COINSTALLER_PROC Function; BOOL DoPostProcessing; PVOID PrivateData; +}; + +struct GetSectionCallbackInfo +{ + PSP_ALTPLATFORM_INFO PlatformInfo; + BYTE ProductType; + WORD SuiteMask; + WCHAR BestSection[LINE_LEN + 1]; + DWORD BestScore1, BestScore2, BestScore3, BestScore4, BestScore5; }; static BOOL @@ -948,6 +957,291 @@ return bResult; } +/* Lower scores are best ones */ +static BOOL +CheckSectionValid( + IN LPCWSTR SectionName, + IN PSP_ALTPLATFORM_INFO PlatformInfo, + IN BYTE ProductType, + IN WORD SuiteMask, + OUT PDWORD ScorePlatform, + OUT PDWORD ScoreMajorVersion, + OUT PDWORD ScoreMinorVersion, + OUT PDWORD ScoreProductType, + OUT PDWORD ScoreSuiteMask) +{ + LPWSTR Section = NULL; + LPCWSTR pExtensionPlatform, pExtensionArchitecture; + LPWSTR Fields[6]; + DWORD i; + BOOL ret = FALSE; + + TRACE("%s %p 0x%x 0x%x\n", + debugstr_w(SectionName), PlatformInfo, ProductType, SuiteMask); + + static const WCHAR ExtensionPlatformNone[] = {'.',0}; + static const WCHAR ExtensionPlatformNT[] = {'.','N','T',0}; + static const WCHAR ExtensionPlatformWindows[] = {'.','W','i','n',0}; + + static const WCHAR ExtensionArchitectureNone[] = {0}; + static const WCHAR ExtensionArchitecturealpha[] = {'a','l','p','h','a',0}; + static const WCHAR ExtensionArchitectureamd64[] = {'a','m','d','6','4',0}; + static const WCHAR ExtensionArchitectureia64[] = {'i','a','6','4',0}; + static const WCHAR ExtensionArchitecturemips[] = {'m','i','p','s',0}; + static const WCHAR ExtensionArchitectureppc[] = {'p','p','c',0}; + static const WCHAR ExtensionArchitecturex86[] = {'x','8','6',0}; + + *ScorePlatform = *ScoreMajorVersion = *ScoreMinorVersion = *ScoreProductType = *ScoreSuiteMask = 0; + + Section = DuplicateString(SectionName); + if (!Section) + { + TRACE("DuplicateString() failed\n"); + goto cleanup; + } + + /* Set various extensions values */ + switch (PlatformInfo->Platform) + { + case VER_PLATFORM_WIN32_WINDOWS: + pExtensionPlatform = ExtensionPlatformWindows; + break; + case VER_PLATFORM_WIN32_NT: + pExtensionPlatform = ExtensionPlatformNT; + break; + default: + ERR("Unkown platform 0x%lx\n", PlatformInfo->Platform); + pExtensionPlatform = ExtensionPlatformNone; + break; + } + switch (PlatformInfo->ProcessorArchitecture) + { + case PROCESSOR_ARCHITECTURE_ALPHA: + pExtensionArchitecture = ExtensionArchitecturealpha; + break; + case PROCESSOR_ARCHITECTURE_AMD64: + pExtensionArchitecture = ExtensionArchitectureamd64; + break; + case PROCESSOR_ARCHITECTURE_IA64: + pExtensionArchitecture = ExtensionArchitectureia64; + break; + case PROCESSOR_ARCHITECTURE_INTEL: + pExtensionArchitecture = ExtensionArchitecturex86; + break; + case PROCESSOR_ARCHITECTURE_MIPS: + pExtensionArchitecture = ExtensionArchitecturemips; + break; + case PROCESSOR_ARCHITECTURE_PPC: + pExtensionArchitecture = ExtensionArchitectureppc; + break; + default: + ERR("Unknown processor architecture 0x%x\n", PlatformInfo->ProcessorArchitecture); + case PROCESSOR_ARCHITECTURE_UNKNOWN: + pExtensionArchitecture = ExtensionArchitectureNone; + break; + } + + /* + * Field[0] Platform + * Field[1] Architecture + * Field[2] Major version + * Field[3] Minor version + * Field[4] Product type + * Field[5] Suite mask + * Remark: lastests fields may be NULL if the information is not provided + */ + Fields[0] = strchrW(Section, '.'); + if (Fields[0] == NULL) + { + TRACE("No extension found\n"); + *ScorePlatform = *ScoreMajorVersion = *ScoreMinorVersion = *ScoreProductType = *ScoreSuiteMask = ULONG_MAX; + ret = TRUE; + goto cleanup; + } + Fields[1] = Fields[0] + 1; + Fields[2] = Fields[3] = Fields[4] = Fields[5] = NULL; + for (i = 2; Fields[i - 1] != NULL && i < 6; i++) + { + Fields[i] = wcschr(Fields[i - 1], '.'); + if (Fields[i]) + { + Fields[i]++; + *(Fields[i] - 1) = L'\0'; + } + } + /* Take care of first 2 fields */ + if (strncmpiW(Fields[0], ExtensionPlatformWindows, strlenW(ExtensionPlatformWindows)) == 0) + { + if (PlatformInfo->Platform != VER_PLATFORM_WIN32_WINDOWS) + { + TRACE("Mismatch on platform field\n"); + goto cleanup; + } + Fields[1] += wcslen(ExtensionPlatformWindows) - 1; + } + else if (strncmpiW(Fields[0], ExtensionPlatformNT, strlenW(ExtensionPlatformNT)) == 0) + { + if (PlatformInfo->Platform != VER_PLATFORM_WIN32_NT) + { + TRACE("Mismatch on platform field\n"); + goto cleanup; + } + Fields[1] += wcslen(ExtensionPlatformNT) - 1; + } + else + { + /* No platform specified */ + *ScorePlatform |= 0x02; + } + if (strcmpiW(Fields[1], ExtensionArchitectureNone) == 0) + { + /* No architecture specified */ + *ScorePlatform |= 0x01; + } + else if (strcmpiW(Fields[1], pExtensionArchitecture) != 0) + { + TRACE("Mismatch on architecture field ('%s' and '%s')\n", + debugstr_w(Fields[1]), debugstr_w(pExtensionArchitecture)); + goto cleanup; + } + + /* Check if informations are matching */ + if (Fields[2] && *Fields[2]) + { + DWORD MajorVersion, MinorVersion = 0; + MajorVersion = strtoulW(Fields[2], NULL, 0); + if ((MajorVersion == 0 || MajorVersion == ULONG_MAX) && + (errno == ERANGE || errno == EINVAL)) + { + TRACE("Wrong MajorVersion ('%s')\n", debugstr_w(Fields[2])); + goto cleanup; + } + if (Fields[3] && *Fields[3]) + { + MinorVersion = strtoulW(Fields[3], NULL, 0); + if ((MinorVersion == 0 || MinorVersion == ULONG_MAX) && + (errno == ERANGE || errno == EINVAL)) + { + TRACE("Wrong MinorVersion ('%s')\n", debugstr_w(Fields[3])); + goto cleanup; + } + } + if (PlatformInfo->MajorVersion < MajorVersion || + (PlatformInfo->MajorVersion == MajorVersion && PlatformInfo->MinorVersion < MinorVersion)) + { + TRACE("Mismatch on version field (%lu.%lu and %lu.%lu)\n", + MajorVersion, MinorVersion, PlatformInfo->MajorVersion, PlatformInfo->MinorVersion); + goto cleanup; + } + *ScoreMajorVersion = MajorVersion - PlatformInfo->MajorVersion; + if (MajorVersion == PlatformInfo->MajorVersion) + *ScoreMinorVersion = MinorVersion - PlatformInfo->MinorVersion; + else + *ScoreMinorVersion = MinorVersion; + } + else if (Fields[3] && *Fields[3]) + { + TRACE("Minor version found without major version\n"); + goto cleanup; + } + else + { + *ScoreMajorVersion = PlatformInfo->MajorVersion; + *ScoreMinorVersion = PlatformInfo->MinorVersion; + } + + if (Fields[4] && *Fields[4]) + { + DWORD CurrentProductType; + CurrentProductType = strtoulW(Fields[4], NULL, 0); + if ((CurrentProductType == 0 || CurrentProductType == ULONG_MAX) && + (errno == ERANGE || errno == EINVAL)) + { + TRACE("Wrong Product type ('%s')\n", debugstr_w(Fields[4])); + goto cleanup; + } + if (CurrentProductType != ProductType) + { + TRACE("Mismatch on product type (0x%08lx and 0x%08x)\n", + CurrentProductType, ProductType); + goto cleanup; + } + } + else + *ScoreProductType = 1; + + if (Fields[5] && *Fields[5]) + { + DWORD CurrentSuiteMask; + CurrentSuiteMask = strtoulW(Fields[5], NULL, 0); + if ((CurrentSuiteMask == 0 || CurrentSuiteMask == ULONG_MAX) && + (errno == ERANGE || errno == EINVAL)) + { + TRACE("Wrong Suite mask ('%s')\n", debugstr_w(Fields[5])); + goto cleanup; + } + if ((CurrentSuiteMask & ~SuiteMask) != 0) + { + TRACE("Mismatch on suite mask (0x%08lx and 0x%08x)\n", + CurrentSuiteMask, SuiteMask); + goto cleanup; + } + *ScoreSuiteMask = SuiteMask & ~CurrentSuiteMask; + } + else + *ScoreSuiteMask = SuiteMask; + + ret = TRUE; + +cleanup: + MyFree(Section); + return ret; +} + +static BOOL +GetSectionCallback( + IN LPCWSTR SectionName, + IN PVOID Context) +{ + struct GetSectionCallbackInfo *info = Context; + DWORD Score1, Score2, Score3, Score4, Score5; + BOOL ret; + + ret = CheckSectionValid( + SectionName, + info->PlatformInfo, + info->ProductType, + info->SuiteMask, + &Score1, &Score2, &Score3, &Score4, &Score5); + if (!ret) + { + TRACE("Section %s not compatible\n", debugstr_w(SectionName)); + return TRUE; + } + if (Score1 > info->BestScore1) goto done; + if (Score1 < info->BestScore1) goto bettersection; + if (Score2 > info->BestScore2) goto done; + if (Score2 < info->BestScore2) goto bettersection; + if (Score3 > info->BestScore3) goto done; + if (Score3 < info->BestScore3) goto bettersection; + if (Score4 > info->BestScore4) goto done; + if (Score4 < info->BestScore4) goto bettersection; + if (Score5 > info->BestScore5) goto done; + if (Score5 < info->BestScore5) goto bettersection; + goto done; + +bettersection: + strcpyW(info->BestSection, SectionName); + info->BestScore1 = Score1; + info->BestScore2 = Score2; + info->BestScore3 = Score3; + info->BestScore4 = Score4; + info->BestScore5 = Score5; + +done: + return TRUE; +} + /*********************************************************************** * SetupDiGetActualSectionToInstallExW (SETUPAPI.@) */ @@ -979,161 +1273,83 @@ else { static SP_ALTPLATFORM_INFO CurrentPlatform = { 0, }; + static BYTE CurrentProductType = 0; + static WORD CurrentSuiteMask = 0; PSP_ALTPLATFORM_INFO pPlatformInfo = &CurrentPlatform; - LPCWSTR pExtensionPlatform, pExtensionArchitecture; - WCHAR SectionName[LINE_LEN + 1]; - LONG lLineCount = -1; + struct GetSectionCallbackInfo CallbackInfo; DWORD dwFullLength; + BYTE ProductType; + WORD SuiteMask; /* Fill platform info if needed */ if (AlternatePlatformInfo) + { pPlatformInfo = AlternatePlatformInfo; - else if (CurrentPlatform.cbSize != sizeof(SP_ALTPLATFORM_INFO)) - { - /* That's the first time we go here. We need to fill in the structure */ - OSVERSIONINFO VersionInfo; - SYSTEM_INFO SystemInfo; - VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - ret = GetVersionEx(&VersionInfo); - if (!ret) - goto done; - GetSystemInfo(&SystemInfo); - CurrentPlatform.cbSize = sizeof(SP_ALTPLATFORM_INFO); - CurrentPlatform.Platform = VersionInfo.dwPlatformId; - CurrentPlatform.MajorVersion = VersionInfo.dwMajorVersion; - CurrentPlatform.MinorVersion = VersionInfo.dwMinorVersion; - CurrentPlatform.ProcessorArchitecture = SystemInfo.wProcessorArchitecture; - CurrentPlatform.Reserved = 0; - } - -static const WCHAR ExtensionPlatformNone[] = {'.',0}; -static const WCHAR ExtensionPlatformNT[] = {'.','N','T',0}; -static const WCHAR ExtensionPlatformWindows[] = {'.','W','i','n',0}; - -static const WCHAR ExtensionArchitectureNone[] = {0}; -static const WCHAR ExtensionArchitecturealpha[] = {'a','l','p','h','a',0}; -static const WCHAR ExtensionArchitectureamd64[] = {'a','m','d','6','4',0}; -static const WCHAR ExtensionArchitectureia64[] = {'i','a','6','4',0}; -static const WCHAR ExtensionArchitecturemips[] = {'m','i','p','s',0}; -static const WCHAR ExtensionArchitectureppc[] = {'p','p','c',0}; -static const WCHAR ExtensionArchitecturex86[] = {'x','8','6',0}; - - /* Set various extensions values */ - switch (pPlatformInfo->Platform) - { - case VER_PLATFORM_WIN32_WINDOWS: - pExtensionPlatform = ExtensionPlatformWindows; - break; - case VER_PLATFORM_WIN32_NT: - pExtensionPlatform = ExtensionPlatformNT; - break; - default: - ERR("Unkown platform 0x%lx\n", pPlatformInfo->Platform); - pExtensionPlatform = ExtensionPlatformNone; - break; - } - switch (pPlatformInfo->ProcessorArchitecture) - { - case PROCESSOR_ARCHITECTURE_ALPHA: - pExtensionArchitecture = ExtensionArchitecturealpha; - break; - case PROCESSOR_ARCHITECTURE_AMD64: - pExtensionArchitecture = ExtensionArchitectureamd64; - break; - case PROCESSOR_ARCHITECTURE_IA64: - pExtensionArchitecture = ExtensionArchitectureia64; - break; - case PROCESSOR_ARCHITECTURE_INTEL: - pExtensionArchitecture = ExtensionArchitecturex86; - break; - case PROCESSOR_ARCHITECTURE_MIPS: - pExtensionArchitecture = ExtensionArchitecturemips; - break; - case PROCESSOR_ARCHITECTURE_PPC: - pExtensionArchitecture = ExtensionArchitectureppc; - break; - default: - ERR("Unknown processor architecture 0x%x\n", pPlatformInfo->ProcessorArchitecture); - case PROCESSOR_ARCHITECTURE_UNKNOWN: - pExtensionArchitecture = ExtensionArchitectureNone; - break; - } - -static const WCHAR FormatPlatformArchitectureMajorMinor[] = {'%','s','%','s','%','s','.','%','l','u','.','%','l','u',0}; -static const WCHAR FormatPlatformMajorMinor[] = {'%','s','%','s','.','%','l','u','.','%','l','u',0}; -static const WCHAR FormatPlatformArchitectureMajor[] = {'%','s','%','s','%','s','.','%','l','u',0}; -static const WCHAR FormatPlatformMajor[] = {'%','s','%','s','.','%','l','u',0}; -static const WCHAR FormatPlatformArchitecture[] = {'%','s','%','s','%','s',0}; -static const WCHAR FormatPlatform[] = {'%','s','%','s',0}; -static const WCHAR FormatNone[] = {'%','s',0}; - - SectionName[LINE_LEN] = UNICODE_NULL; - - /* Test with platform.architecture.major.minor extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatformArchitectureMajorMinor, InfSectionName, - pExtensionPlatform, pExtensionArchitecture, pPlatformInfo->MajorVersion, pPlatformInfo->MinorVersion); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test with platform.major.minor extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatformMajorMinor, InfSectionName, - pExtensionPlatform, pPlatformInfo->MajorVersion, pPlatformInfo->MinorVersion); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test with platform.architecture.major extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatformArchitectureMajor, InfSectionName, - pExtensionPlatform, pExtensionArchitecture, pPlatformInfo->MajorVersion); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test with platform.major extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatformMajor, InfSectionName, - pExtensionPlatform, pPlatformInfo->MajorVersion); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test with platform.architecture extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatformArchitecture, InfSectionName, - pExtensionPlatform, pExtensionArchitecture); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test with platform extension */ - snprintfW(SectionName, LINE_LEN, FormatPlatform, InfSectionName, - pExtensionPlatform); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* Test without extension */ - snprintfW(SectionName, LINE_LEN, FormatNone, InfSectionName); - lLineCount = SetupGetLineCountW(InfHandle, SectionName); - if (lLineCount != -1) goto sectionfound; - - /* No appropriate section found */ - SetLastError(ERROR_INVALID_PARAMETER); - goto done; - -sectionfound: - dwFullLength = lstrlenW(SectionName); - if (InfSectionWithExt != NULL && InfSectionWithExtSize != 0) - { - if (InfSectionWithExtSize < (dwFullLength + 1)) + ProductType = 0; + SuiteMask = 0; + } + else + { + if (CurrentPlatform.cbSize != sizeof(SP_ALTPLATFORM_INFO)) + { + /* That's the first time we go here. We need to fill in the structure */ + OSVERSIONINFOEX VersionInfo; + SYSTEM_INFO SystemInfo; + VersionInfo.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX); + ret = GetVersionEx((POSVERSIONINFO)&VersionInfo); + if (!ret) + goto done; + GetSystemInfo(&SystemInfo); + CurrentPlatform.cbSize = sizeof(SP_ALTPLATFORM_INFO); + CurrentPlatform.Platform = VersionInfo.dwPlatformId; + CurrentPlatform.MajorVersion = VersionInfo.dwMajorVersion; + CurrentPlatform.MinorVersion = VersionInfo.dwMinorVersion; + CurrentPlatform.ProcessorArchitecture = SystemInfo.wProcessorArchitecture; + CurrentPlatform.Reserved = 0; + CurrentProductType = VersionInfo.wProductType; + CurrentSuiteMask = VersionInfo.wSuiteMask; + } + ProductType = CurrentProductType; + SuiteMask = CurrentSuiteMask; + } + + CallbackInfo.PlatformInfo = pPlatformInfo; + CallbackInfo.ProductType = ProductType; + CallbackInfo.SuiteMask = SuiteMask; + CallbackInfo.BestScore1 = ULONG_MAX; + CallbackInfo.BestScore2 = ULONG_MAX; + CallbackInfo.BestScore3 = ULONG_MAX; + CallbackInfo.BestScore4 = ULONG_MAX; + CallbackInfo.BestScore5 = ULONG_MAX; + strcpyW(CallbackInfo.BestSection, InfSectionName); + if (!EnumerateSectionsStartingWith( + InfHandle, + InfSectionName, + GetSectionCallback, + &CallbackInfo)) + { + SetLastError(ERROR_GEN_FAILURE); + goto done; + } + + dwFullLength = lstrlenW(CallbackInfo.BestSection); + if (RequiredSize != NULL) + *RequiredSize = dwFullLength + 1; + + if (InfSectionWithExtSize > 0) + { + if (InfSectionWithExtSize < dwFullLength + 1) { SetLastError(ERROR_INSUFFICIENT_BUFFER); goto done; } - - lstrcpyW(InfSectionWithExt, SectionName); - if (Extension != NULL) - { - DWORD dwLength = lstrlenW(SectionName); + strcpyW(InfSectionWithExt, CallbackInfo.BestSection); + if (Extension) + { + DWORD dwLength = lstrlenW(InfSectionName); *Extension = (dwLength == dwFullLength) ? NULL : &InfSectionWithExt[dwLength]; } } - - if (RequiredSize != NULL) - *RequiredSize = dwFullLength + 1; ret = TRUE; } @@ -5677,8 +5893,6 @@ HeapFree(GetProcessHeap(), 0, details); return NULL; } - DPRINT1("FullInfFileName %S\n", details->FullInfFileName); - DPRINT1("DirectoryName %S\n", details->DirectoryName); return details; } @@ -5981,7 +6195,7 @@ DriverAlreadyAdded = FALSE; for (DriverRank = 0, currentId = (LPCWSTR)HardwareIDs; !DriverAlreadyAdded && *currentId; currentId += strlenW(currentId) + 1, DriverRank++) { - if (wcsicmp(DeviceId, currentId) == 0) + if (strcmpiW(DeviceId, currentId) == 0) { AddDriverToList( pDriverListHead, @@ -6002,7 +6216,7 @@ { for (DriverRank = 0, currentId = (LPCWSTR)CompatibleIDs; !DriverAlreadyAdded && *currentId; currentId += strlenW(currentId) + 1, DriverRank++) { - if (wcsicmp(DeviceId, currentId) == 0) + if (strcmpiW(DeviceId, currentId) == 0) { AddDriverToList( pDriverListHead, @@ -7060,7 +7274,7 @@ DeviceID = HardwareIDs; while (DeviceID && *DeviceID && (size = wcslen(DeviceID)) + 1 < sizeLeft) { - TRACE("Adding %S to list\n", DeviceID); + TRACE("Adding %s to list\n", debugstr_w(DeviceID)); wcscpy(pBuffer, DeviceID); DeviceID += size + 1; pBuffer += size + 1; @@ -7077,7 +7291,7 @@ DeviceID = CompatibleIDs; while (DeviceID && *DeviceID && (size = wcslen(DeviceID)) + 1 < sizeLeft) { - TRACE("Adding %S to list\n", DeviceID); + TRACE("Adding %s to list\n", debugstr_w(DeviceID)); wcscpy(pBuffer, DeviceID); DeviceID += size + 1; pBuffer += size + 1; Modified: trunk/reactos/dll/win32/setupapi/parser.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/parser.c…
============================================================================== --- trunk/reactos/dll/win32/setupapi/parser.c (original) +++ trunk/reactos/dll/win32/setupapi/parser.c Sun May 28 20:44:52 2006 @@ -2145,10 +2145,8 @@ } Cleanup: - if (DirectoryPathW != NULL) - MyFree(DirectoryPathW); - if (ReturnBufferW != NULL) - MyFree(ReturnBufferW); + MyFree(DirectoryPathW); + MyFree(ReturnBufferW); return ret; } @@ -2222,10 +2220,27 @@ } Cleanup: - if (InfNameW != NULL) - MyFree(InfNameW); - if (ClassNameW != NULL) - MyFree(ClassNameW); + MyFree(InfNameW); + MyFree(ClassNameW); return ret; } + +BOOL EnumerateSectionsStartingWith( + IN HINF hInf, + IN LPCWSTR pStr, + IN FIND_CALLBACK Callback, + IN PVOID Context) +{ + struct inf_file *file = (struct inf_file *)hInf; + size_t len = strlenW(pStr); + unsigned int i; + + for (i = 0; i < file->nb_sections; i++) + if (strncmpiW(pStr, file->sections[i]->name, len) == 0) + { + if (!Callback(file->sections[i]->name, Context)) + return FALSE; + } + return TRUE; +} Modified: trunk/reactos/dll/win32/setupapi/setupapi_private.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi_private.h (original) +++ trunk/reactos/dll/win32/setupapi/setupapi_private.h Sun May 28 20:44:52 2006 @@ -21,7 +21,9 @@ #define __SETUPAPI_PRIVATE_H #include <assert.h> +#include <errno.h> #include <fcntl.h> +#include <limits.h> #include <share.h> #include <wchar.h> @@ -231,4 +233,7 @@ BOOL GetStringField( PINFCONTEXT context, DWORD index, PWSTR *value); +typedef BOOL (*FIND_CALLBACK)(LPCWSTR SectionName, PVOID Context); +BOOL EnumerateSectionsStartingWith(HINF hInf, LPCWSTR pStr, FIND_CALLBACK Callback, PVOID Context); + #endif /* __SETUPAPI_PRIVATE_H */
18 years, 7 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
38
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Results per page:
10
25
50
100
200