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
February 2011
----- 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
18 participants
352 discussions
Start a n
N
ew thread
[tkreuzer] 50920: [WIN32K] - In NtGdiGetDIBitsInternal use a shared lock for the bitmaps and provide background colors when initializing the XLATEOBJ. This fixes mono bitmaps passed to GetDIBits. (...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 27 17:38:18 2011 New Revision: 50920 URL:
http://svn.reactos.org/svn/reactos?rev=50920&view=rev
Log: [WIN32K] - In NtGdiGetDIBitsInternal use a shared lock for the bitmaps and provide background colors when initializing the XLATEOBJ. This fixes mono bitmaps passed to GetDIBits. (no it does not fix pink icons in VLC) - In BuildDIBPalette don't handle 15bpp, its not valid. and 16 bpp is 555, this is documented in MSDN. Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Sun Feb 27 17:38:18 2011 @@ -649,7 +649,7 @@ } /* Get a pointer to the source bitmap object */ - psurf = SURFACE_LockSurface(hBitmap); + psurf = SURFACE_ShareLockSurface(hBitmap); if (psurf == NULL) { ScanLines = 0; @@ -944,7 +944,7 @@ goto done ; } - psurfDest = SURFACE_LockSurface(hBmpDest); + psurfDest = SURFACE_ShareLockSurface(hBmpDest); rcDest.left = 0; rcDest.top = 0; @@ -955,7 +955,7 @@ srcPoint.y = height < 0 ? psurf->SurfObj.sizlBitmap.cy - (StartScan + ScanLines) : StartScan; - EXLATEOBJ_vInitialize(&exlo, psurf->ppal, psurfDest->ppal, 0, 0, 0); + EXLATEOBJ_vInitialize(&exlo, psurf->ppal, psurfDest->ppal, 0xffffff, 0xffffff, 0); ret = IntEngCopyBits(&psurfDest->SurfObj, &psurf->SurfObj, @@ -963,6 +963,8 @@ &exlo.xlo, &rcDest, &srcPoint); + + SURFACE_ShareUnlockSurface(psurfDest); if(!ret) ScanLines = 0; @@ -994,7 +996,7 @@ done: if(pDC) DC_UnlockDc(pDC); - if(psurf) SURFACE_UnlockSurface(psurf); + if(psurf) SURFACE_ShareUnlockSurface(psurf); if(pbmci) DIB_FreeConvertedBitmapInfo(Info, (BITMAPINFO*)pbmci); return ScanLines; @@ -1101,13 +1103,13 @@ hBitmap = DIB_CreateDIBSection(pdc, BitsInfo, Usage, &pvBits, NULL, 0, 0); DC_UnlockDc(pdc); + if(!hBitmap) + { + DPRINT1("Error, failed to create a DIB section\n"); + goto cleanup; + } + hdcMem = NtGdiCreateCompatibleDC(hDC); - if(!hBitmap) - { - DPRINT1("Error, failed to create a DIB section\n"); - NtGdiDeleteObjectApp(hdcMem); - goto cleanup; - } RtlCopyMemory(pvBits, safeBits, cjMaxBits); hOldBitmap = NtGdiSelectBitmap(hdcMem, hBitmap); @@ -1771,17 +1773,10 @@ paletteType = PAL_BITFIELDS; switch (bits) { - case 15: + case 16: paletteType |= PAL_RGB16_555; RedMask = 0x7C00; GreenMask = 0x03E0; - BlueMask = 0x001F; - break; - - case 16: - paletteType |= PAL_RGB16_565; - RedMask = 0xF800; - GreenMask = 0x07E0; BlueMask = 0x001F; break;
13 years, 10 months
1
0
0
0
[tkreuzer] 50919: Fix build
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 27 17:31:54 2011 New Revision: 50919 URL:
http://svn.reactos.org/svn/reactos?rev=50919&view=rev
Log: Fix build Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Sun Feb 27 17:31:54 2011 @@ -413,13 +413,15 @@ void ConvertBackBitmapInfo(PBITMAPINFO pbmi, PBITMAPINFO pbmiConverted) { + INT i; + /* Check if we converted from PBITMAPCOREINFO */ if (pbmiConverted != pbmi) { PBITMAPCOREINFO pbci = (PBITMAPCOREINFO)pbmi; /* Convert back header */ - pbci->bmciHeader.biSize = sizeof(BITMAPCOREHEADER); + pbci->bmciHeader.bcSize = sizeof(BITMAPCOREHEADER); pbci->bmciHeader.bcWidth = pbmiConverted->bmiHeader.biWidth; pbci->bmciHeader.bcHeight = pbmiConverted->bmiHeader.biHeight; pbci->bmciHeader.bcPlanes = 1; @@ -428,9 +430,9 @@ /* Convert back colors */ for (i = 0; i < pbmiConverted->bmiHeader.biClrUsed; i++) { - pbci->bmciColors.rgbtRed = pbmiConverted->bmiColors.rgbRed; - pbci->bmciColors.rgbtGreen = pbmiConverted->bmiColors.rgbGreen; - pbci->bmciColors.rgbtBlue = pbmiConverted->bmiColors.rgbBlue; + pbci->bmciColors[i].rgbtRed = pbmiConverted->bmiColors[i].rgbRed; + pbci->bmciColors[i].rgbtGreen = pbmiConverted->bmiColors[i].rgbGreen; + pbci->bmciColors[i].rgbtBlue = pbmiConverted->bmiColors[i].rgbBlue; } /* Free memory */
13 years, 10 months
1
0
0
0
[tkreuzer] 50918: [GDI32] In GetDIBits convert a BITMAPCOREHEADER to a BITMAPINFOHEADER before calling win32k, like done in other places. Convert it back after. This allows to simplify NtGdiGetDIBi...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 27 17:20:02 2011 New Revision: 50918 URL:
http://svn.reactos.org/svn/reactos?rev=50918&view=rev
Log: [GDI32] In GetDIBits convert a BITMAPCOREHEADER to a BITMAPINFOHEADER before calling win32k, like done in other places. Convert it back after. This allows to simplify NtGdiGetDIBitsInternal (not done yet) Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Sun Feb 27 17:20:02 2011 @@ -410,6 +410,33 @@ return CreateDIBSection(hDC, (CONST BITMAPINFO *)&dibs.dsBmih, 0, NULL, NULL, 0); } +void +ConvertBackBitmapInfo(PBITMAPINFO pbmi, PBITMAPINFO pbmiConverted) +{ + /* Check if we converted from PBITMAPCOREINFO */ + if (pbmiConverted != pbmi) + { + PBITMAPCOREINFO pbci = (PBITMAPCOREINFO)pbmi; + + /* Convert back header */ + pbci->bmciHeader.biSize = sizeof(BITMAPCOREHEADER); + pbci->bmciHeader.bcWidth = pbmiConverted->bmiHeader.biWidth; + pbci->bmciHeader.bcHeight = pbmiConverted->bmiHeader.biHeight; + pbci->bmciHeader.bcPlanes = 1; + pbci->bmciHeader.bcBitCount = pbmiConverted->bmiHeader.biBitCount; + + /* Convert back colors */ + for (i = 0; i < pbmiConverted->bmiHeader.biClrUsed; i++) + { + pbci->bmciColors.rgbtRed = pbmiConverted->bmiColors.rgbRed; + pbci->bmciColors.rgbtGreen = pbmiConverted->bmiColors.rgbGreen; + pbci->bmciColors.rgbtBlue = pbmiConverted->bmiColors.rgbBlue; + } + + /* Free memory */ + RtlFreeHeap(RtlGetProcessHeap(), 0, pbmiConverted); + } +} INT WINAPI @@ -422,8 +449,9 @@ LPBITMAPINFO lpbmi, UINT uUsage) { - UINT cjBmpScanSize; - UINT cjInfoSize; + PBITMAPINFO pbmiConverted; + UINT cjBmpScanSize, cjInfoSize; + INT iResult; if (!hDC || !GdiIsHandleValid((HGDIOBJ)hDC) || !lpbmi) { @@ -431,15 +459,22 @@ return 0; } + /* Convert BITMAPINFO to a proper format */ + pbmiConverted = ConvertBitmapInfo(lpbmi, uUsage, &cjInfoSize, FALSE); + if (!pbmiConverted) + { + GdiSetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + cjBmpScanSize = DIB_BitmapMaxBitsSize(lpbmi, cScanLines); - cjInfoSize = DIB_BitmapInfoSize(lpbmi, uUsage); - - if ( lpvBits ) - { - if ( lpbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER) ) - { - if ( lpbmi->bmiHeader.biCompression == BI_JPEG || - lpbmi->bmiHeader.biCompression == BI_PNG ) + + if (lpvBits) + { + if (lpbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) + { + if (lpbmi->bmiHeader.biCompression == BI_JPEG || + lpbmi->bmiHeader.biCompression == BI_PNG) { SetLastError(ERROR_INVALID_PARAMETER); return 0; @@ -447,16 +482,21 @@ } } - return NtGdiGetDIBitsInternal(hDC, - hbmp, - uStartScan, - cScanLines, - lpvBits, - lpbmi, - uUsage, - cjBmpScanSize, - cjInfoSize); -} + iResult = NtGdiGetDIBitsInternal(hDC, + hbmp, + uStartScan, + cScanLines, + lpvBits, + pbmiConverted, + uUsage, + cjBmpScanSize, + cjInfoSize); + + ConvertBackBitmapInfo(lpbmi, pbmiConverted); + + return iResult; +} + /* * @implemented
13 years, 10 months
1
0
0
0
[tkreuzer] 50917: [NTOSKRNL] Fix a serious bug, where NtAllocateVirtualMemory could allocate memory user mode memory above MmHighestUserAddress up to MmSystemRangeStart - 1, which is a no-access area.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Feb 27 15:16:00 2011 New Revision: 50917 URL:
http://svn.reactos.org/svn/reactos?rev=50917&view=rev
Log: [NTOSKRNL] Fix a serious bug, where NtAllocateVirtualMemory could allocate memory user mode memory above MmHighestUserAddress up to MmSystemRangeStart - 1, which is a no-access area. Modified: trunk/reactos/ntoskrnl/mm/marea.c Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=50…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Sun Feb 27 15:16:00 2011 @@ -458,7 +458,7 @@ { PVOID LowestAddress = MmGetAddressSpaceOwner(AddressSpace) ? MM_LOWEST_USER_ADDRESS : MmSystemRangeStart; PVOID HighestAddress = MmGetAddressSpaceOwner(AddressSpace) ? - (PVOID)((ULONG_PTR)MmSystemRangeStart - 1) : (PVOID)MAXULONG_PTR; + MmHighestUserAddress : (PVOID)MAXULONG_PTR; PVOID AlignedAddress; PMEMORY_AREA Node; PMEMORY_AREA FirstNode;
13 years, 10 months
1
0
0
0
[ekohl] 50916: [URLCACHE] Do not initialize the URL-Cache for a system process. Patch will be submitted to WINE. See issue #5372 for more details.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Feb 26 22:23:03 2011 New Revision: 50916 URL:
http://svn.reactos.org/svn/reactos?rev=50916&view=rev
Log: [URLCACHE] Do not initialize the URL-Cache for a system process. Patch will be submitted to WINE. See issue #5372 for more details. Modified: trunk/reactos/dll/win32/wininet/urlcache.c Modified: trunk/reactos/dll/win32/wininet/urlcache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/urlcache…
============================================================================== --- trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wininet/urlcache.c [iso-8859-1] Sat Feb 26 22:23:03 2011 @@ -527,6 +527,7 @@ static const WCHAR HistoryPrefix[] = {'V','i','s','i','t','e','d',':',0}; static const WCHAR CookieSuffix[] = {0}; static const WCHAR CookiePrefix[] = {'C','o','o','k','i','e',':',0}; + static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0}; static const struct { int nFolder; /* CSIDL_* constant */ @@ -539,6 +540,12 @@ { CSIDL_COOKIES, CookieSuffix, CookiePrefix }, }; DWORD i; + + if (GetEnvironmentVariableW(UserProfile, NULL, 0) == 0 && GetLastError() == ERROR_ENVVAR_NOT_FOUND) + { + TRACE("Environment variable 'USERPROFILE' does not exist!\n"); + return; + } for (i = 0; i < sizeof(DefaultContainerData) / sizeof(DefaultContainerData[0]); i++) {
13 years, 10 months
1
0
0
0
[ekohl] 50915: [SETUPAPI] Rename functions according to the new naming scheme: CaptureAndConvertAnsiArg --> pSetupCaptureAndConvertAnsiArg CenterWindowRelativeToParent --> pSetupCenterWindowRelativ...
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Feb 26 21:40:17 2011 New Revision: 50915 URL:
http://svn.reactos.org/svn/reactos?rev=50915&view=rev
Log: [SETUPAPI] Rename functions according to the new naming scheme: CaptureAndConvertAnsiArg --> pSetupCaptureAndConvertAnsiArg CenterWindowRelativeToParent --> pSetupCenterWindowRelativeToParent ConcatenatePaths --> pSetupConcatenatePaths DuplicateString --> pSetupDuplicateString EnablePrivilege --> pSetupEnablePrivilege GetVersionInfoFromImage --> pSetupGetVersionInfoFromImage IsUserAdmin --> pSetupIsUserAdmin MultiByteToUnicode --> pSetupMultiByteToUnicode MyGetFileTitle --> pSetupGetFileTitle OpenAndMapForRead --> pSetupOpenAndMapForRead RegistryDelnode --> pSetupRegistryDelnode UnicodeToMultiByte --> pSetupUnicodeToMultiByte UnmapAndCloseFile --> pSetupUnmapAndCloseFile Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c trunk/reactos/dll/win32/setupapi/devclass.c trunk/reactos/dll/win32/setupapi/devinst.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/setupapi.spec trunk/reactos/dll/win32/setupapi/stubs.c trunk/reactos/include/psdk/setupapi.h Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -153,7 +153,7 @@ if (!PnpGetLocalHandles(&BindingHandle, NULL)) return CR_FAILURE; - bAdmin = IsUserAdmin(); + bAdmin = pSetupIsUserAdmin(); for (i = 0; i < 30; i++) { @@ -237,7 +237,7 @@ FIXME("%p %p %lu %lx %p\n", plcLogConf, dnDevInst, Priority, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (plcLogConf == NULL) @@ -340,7 +340,7 @@ TRACE("%p %s %lx %p\n", dnDevInst, pszID, ulFlags, hMachine); - if (CaptureAndConvertAnsiArg(pszID, &pszIDW)) + if (pSetupCaptureAndConvertAnsiArg(pszID, &pszIDW)) return CR_INVALID_DATA; ret = CM_Add_ID_ExW(dnDevInst, pszIDW, ulFlags, hMachine); @@ -364,7 +364,7 @@ TRACE("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (dnDevInst == 0) @@ -455,7 +455,7 @@ if (UNCServerName == NULL || *UNCServerName == 0) return CM_Connect_MachineW(NULL, phMachine); - if (CaptureAndConvertAnsiArg(UNCServerName, &pServerNameW)) + if (pSetupCaptureAndConvertAnsiArg(UNCServerName, &pServerNameW)) return CR_INVALID_DATA; ret = CM_Connect_MachineW(pServerNameW, phMachine); @@ -572,7 +572,7 @@ TRACE("%p %s %p %lx %p\n", pdnDevInst, debugstr_a(pDeviceID), dnParent, ulFlags, hMachine); - if (CaptureAndConvertAnsiArg(pDeviceID, &pDeviceIDW)) + if (pSetupCaptureAndConvertAnsiArg(pDeviceID, &pDeviceIDW)) return CR_INVALID_DATA; ret = CM_Create_DevNode_ExW(pdnDevInst, pDeviceIDW, dnParent, ulFlags, @@ -599,7 +599,7 @@ FIXME("%p %s %p %lx %p\n", pdnDevInst, debugstr_w(pDeviceID), dnParent, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (pdnDevInst == NULL) @@ -769,7 +769,7 @@ FIXME("%p %lx %p\n", dnDevInst, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (dnDevInst == 0) @@ -868,7 +868,7 @@ TRACE("%p %lx %p\n", dnDevInst, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (dnDevInst == 0) @@ -1135,7 +1135,7 @@ TRACE("%lx %lx %lx\n", lcLogConfToBeFreed, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; pLogConfInfo = (PLOG_CONF_INFO)lcLogConfToBeFreed; @@ -2040,7 +2040,7 @@ } else { - if (CaptureAndConvertAnsiArg(pszFilter, &pszFilterW)) + if (pSetupCaptureAndConvertAnsiArg(pszFilter, &pszFilterW)) { ret = CR_INVALID_DEVICE_ID; goto Done; @@ -2165,7 +2165,7 @@ } else { - if (CaptureAndConvertAnsiArg(pszFilter, &pszFilterW)) + if (pSetupCaptureAndConvertAnsiArg(pszFilter, &pszFilterW)) return CR_INVALID_DEVICE_ID; ret = CM_Get_Device_ID_List_Size_ExW(pulLen, @@ -2576,7 +2576,7 @@ if (szDevInstName != NULL) { - if (CaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW)) + if (pSetupCaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW)) return CR_INVALID_DEVICE_ID; } @@ -3356,7 +3356,7 @@ if (pDeviceID != NULL) { - if (CaptureAndConvertAnsiArg(pDeviceID, &pDevIdW)) + if (pSetupCaptureAndConvertAnsiArg(pDeviceID, &pDevIdW)) return CR_INVALID_DEVICE_ID; } @@ -3506,7 +3506,7 @@ FIXME("%lx %lx %lx %lx\n", dnFromDevInst, dnToDevInst, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (dnFromDevInst == 0 || dnToDevInst == 0) @@ -3606,7 +3606,7 @@ if (pszClassName != NULL) { - if (CaptureAndConvertAnsiArg(pszClassName, &pszClassNameW)) + if (pSetupCaptureAndConvertAnsiArg(pszClassName, &pszClassNameW)) return CR_INVALID_DATA; } @@ -4201,7 +4201,7 @@ TRACE("%lx %lx\n", ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (ulFlags & ~CM_DETECT_BITS) @@ -4612,7 +4612,7 @@ TRACE("%lu %lu %lx\n", ulHardwareProfile, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (ulFlags != 0) @@ -4687,7 +4687,7 @@ if (szDevInstName != NULL) { - if (CaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW)) + if (pSetupCaptureAndConvertAnsiArg(szDevInstName, &pszDevIdW)) return CR_INVALID_DEVICE_ID; } @@ -4773,7 +4773,7 @@ FIXME("%lx %lx %lx\n", dnDevInst, ulFlags, hMachine); - if (!IsUserAdmin()) + if (!pSetupIsUserAdmin()) return CR_ACCESS_DENIED; if (dnDevInst == 0) Modified: trunk/reactos/dll/win32/setupapi/devclass.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devclas…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devclass.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -446,7 +446,7 @@ if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (MachineNameW == NULL) return FALSE; } Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -156,10 +156,10 @@ *ScorePlatform = *ScoreMajorVersion = *ScoreMinorVersion = *ScoreProductType = *ScoreSuiteMask = 0; - Section = DuplicateString(SectionName); + Section = pSetupDuplicateString(SectionName); if (!Section) { - TRACE("DuplicateString() failed\n"); + TRACE("pSetupDuplicateString() failed\n"); goto cleanup; } @@ -687,7 +687,7 @@ if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (MachineNameW == NULL) return FALSE; } @@ -910,13 +910,13 @@ return FALSE; } - ClassNameW = MultiByteToUnicode(ClassName, CP_ACP); + ClassNameW = pSetupMultiByteToUnicode(ClassName, CP_ACP); if (ClassNameW == NULL) return FALSE; if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (MachineNameW == NULL) { MyFree(ClassNameW); @@ -1101,7 +1101,7 @@ BOOL ret; if (MachineName) - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); ret = SetupDiClassNameFromGuidExW(ClassGuid, ClassNameW, MAX_CLASS_NAME_LEN, RequiredSize, MachineNameW, Reserved); if (ret) @@ -1235,7 +1235,7 @@ if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (MachineNameW == NULL) return INVALID_HANDLE_VALUE; } @@ -1381,7 +1381,7 @@ } else { - InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP); + InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); if (InfSectionNameW == NULL) return INVALID_HANDLE_VALUE; } } @@ -1635,12 +1635,12 @@ if (DeviceName) { - DeviceNameW = MultiByteToUnicode(DeviceName, CP_ACP); + DeviceNameW = pSetupMultiByteToUnicode(DeviceName, CP_ACP); if (DeviceNameW == NULL) return FALSE; } if (DeviceDescription) { - DeviceDescriptionW = MultiByteToUnicode(DeviceDescription, CP_ACP); + DeviceDescriptionW = pSetupMultiByteToUnicode(DeviceDescription, CP_ACP); if (DeviceDescriptionW == NULL) { MyFree(DeviceNameW); @@ -2038,7 +2038,7 @@ if (InfSectionName) { - InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP); + InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); if (InfSectionNameW == NULL) goto cleanup; } @@ -2135,7 +2135,7 @@ if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (!MachineNameW) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -2285,7 +2285,7 @@ if (enumstr) { - enumstrW = MultiByteToUnicode(enumstr, CP_ACP); + enumstrW = pSetupMultiByteToUnicode(enumstr, CP_ACP); if (!enumstrW) { ret = INVALID_HANDLE_VALUE; @@ -2294,7 +2294,7 @@ } if (machine) { - machineW = MultiByteToUnicode(machine, CP_ACP); + machineW = pSetupMultiByteToUnicode(machine, CP_ACP); if (!machineW) { MyFree(enumstrW); @@ -2540,7 +2540,7 @@ if (ReferenceString) { - ReferenceStringW = MultiByteToUnicode(ReferenceString, CP_ACP); + ReferenceStringW = pSetupMultiByteToUnicode(ReferenceString, CP_ACP); if (ReferenceStringW == NULL) return FALSE; } @@ -2621,7 +2621,7 @@ SetLastError(ERROR_INVALID_PARAMETER); return INVALID_HANDLE_VALUE; } - InfSectionNameW = MultiByteToUnicode(InfSectionName, CP_ACP); + InfSectionNameW = pSetupMultiByteToUnicode(InfSectionName, CP_ACP); if (!InfSectionNameW) return INVALID_HANDLE_VALUE; } @@ -3462,7 +3462,7 @@ } else { - InfFileNameW = MultiByteToUnicode(InfFileName, CP_ACP); + InfFileNameW = pSetupMultiByteToUnicode(InfFileName, CP_ACP); if (InfFileNameW == NULL) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -3592,7 +3592,7 @@ if (MachineName) { - MachineNameW = MultiByteToUnicode(MachineName, CP_ACP); + MachineNameW = pSetupMultiByteToUnicode(MachineName, CP_ACP); if (MachineNameW == NULL) return INVALID_HANDLE_VALUE; } @@ -3934,7 +3934,7 @@ TRACE("%p %s %08lx %p\n", DeviceInfoSet, debugstr_a(DevicePath), OpenFlags, DeviceInterfaceData); - DevicePathW = MultiByteToUnicode(DevicePath, CP_ACP); + DevicePathW = pSetupMultiByteToUnicode(DevicePath, CP_ACP); if (DevicePathW == NULL) return FALSE; @@ -4667,7 +4667,7 @@ TRACE("%p %s %p %lx %p\n", DeviceInfoSet, DeviceInstanceId, hwndParent, OpenFlags, DeviceInfoData); - DeviceInstanceIdW = MultiByteToUnicode(DeviceInstanceId, CP_ACP); + DeviceInstanceIdW = pSetupMultiByteToUnicode(DeviceInstanceId, CP_ACP); if (DeviceInstanceIdW == NULL) return FALSE; Modified: trunk/reactos/dll/win32/setupapi/install.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/install…
============================================================================== --- trunk/reactos/dll/win32/setupapi/install.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/install.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -998,7 +998,7 @@ } else { - FullIconName = DuplicateString(FullFileName); + FullIconName = pSetupDuplicateString(FullFileName); if (!FullIconName) goto cleanup; } @@ -2177,9 +2177,9 @@ if (!DestinationInfFileName && DestinationInfFileNameSize > 0) SetLastError(ERROR_INVALID_PARAMETER); - else if (!(SourceInfFileNameW = MultiByteToUnicode(SourceInfFileName, CP_ACP))) + else if (!(SourceInfFileNameW = pSetupMultiByteToUnicode(SourceInfFileName, CP_ACP))) SetLastError(ERROR_INVALID_PARAMETER); - else if (OEMSourceMediaType != SPOST_NONE && !(OEMSourceMediaLocationW = MultiByteToUnicode(OEMSourceMediaLocation, CP_ACP))) + else if (OEMSourceMediaType != SPOST_NONE && !(OEMSourceMediaLocationW = pSetupMultiByteToUnicode(OEMSourceMediaLocation, CP_ACP))) SetLastError(ERROR_INVALID_PARAMETER); else { Modified: trunk/reactos/dll/win32/setupapi/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/misc.c?…
============================================================================== --- trunk/reactos/dll/win32/setupapi/misc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/misc.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -63,7 +63,7 @@ Comma++; /* W->A conversion for function name */ - FunctionNameA = UnicodeToMultiByte(Comma, CP_ACP); + FunctionNameA = pSetupUnicodeToMultiByte(Comma, CP_ACP); if (!FunctionNameA) { rc = GetLastError(); @@ -168,7 +168,7 @@ /************************************************************************** - * DuplicateString [SETUPAPI.@] + * pSetupDuplicateString [SETUPAPI.@] * * Duplicates a unicode string. * @@ -182,7 +182,7 @@ * NOTES * Call MyFree() to release the duplicated string. */ -LPWSTR WINAPI DuplicateString(LPCWSTR lpSrc) +LPWSTR WINAPI pSetupDuplicateString(LPCWSTR lpSrc) { LPWSTR lpDst; @@ -250,7 +250,7 @@ /************************************************************************** - * MultiByteToUnicode [SETUPAPI.@] + * pSetupMultiByteToUnicode [SETUPAPI.@] * * Converts a multi-byte string to a Unicode string. * @@ -265,7 +265,7 @@ * NOTE * Use MyFree to release the returned Unicode string. */ -LPWSTR WINAPI MultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage) +LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage) { LPWSTR lpUnicodeStr; int nLength; @@ -296,7 +296,7 @@ /************************************************************************** - * UnicodeToMultiByte [SETUPAPI.@] + * pSetupUnicodeToMultiByte [SETUPAPI.@] * * Converts a Unicode string to a multi-byte string. * @@ -311,7 +311,7 @@ * NOTE * Use MyFree to release the returned multi-byte string. */ -LPSTR WINAPI UnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage) +LPSTR WINAPI pSetupUnicodeToMultiByte(LPCWSTR lpUnicodeStr, UINT uCodePage) { LPSTR lpMultiByteStr; int nLength; @@ -411,7 +411,7 @@ /************************************************************************** - * EnablePrivilege [SETUPAPI.@] + * pSetupEnablePrivilege [SETUPAPI.@] * * Enables or disables one of the current users privileges. * @@ -424,7 +424,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI EnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable) +BOOL WINAPI pSetupEnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable) { TOKEN_PRIVILEGES Privileges; HANDLE hToken; @@ -536,14 +536,14 @@ if (pDst == NULL) return ERROR_INVALID_PARAMETER; - *pDst = DuplicateString(pSrc); + *pDst = pSetupDuplicateString(pSrc); return ERROR_SUCCESS; } /************************************************************************** - * CaptureAndConvertAnsiArg [SETUPAPI.@] + * pSetupCaptureAndConvertAnsiArg [SETUPAPI.@] * * Captures an ANSI string and converts it to a UNICODE string. * @@ -558,19 +558,19 @@ * NOTE * Call MyFree to release the captured UNICODE string. */ -DWORD WINAPI CaptureAndConvertAnsiArg(LPCSTR pSrc, LPWSTR *pDst) +DWORD WINAPI pSetupCaptureAndConvertAnsiArg(LPCSTR pSrc, LPWSTR *pDst) { if (pDst == NULL) return ERROR_INVALID_PARAMETER; - *pDst = MultiByteToUnicode(pSrc, CP_ACP); + *pDst = pSetupMultiByteToUnicode(pSrc, CP_ACP); return ERROR_SUCCESS; } /************************************************************************** - * OpenAndMapFileForRead [SETUPAPI.@] + * pSetupOpenAndMapFileForRead [SETUPAPI.@] * * Open and map a file to a buffer. * @@ -588,11 +588,11 @@ * NOTE * Call UnmapAndCloseFile to release the file. */ -DWORD WINAPI OpenAndMapFileForRead(LPCWSTR lpFileName, - LPDWORD lpSize, - LPHANDLE lpFile, - LPHANDLE lpMapping, - LPVOID *lpBuffer) +DWORD WINAPI pSetupOpenAndMapFileForRead(LPCWSTR lpFileName, + LPDWORD lpSize, + LPHANDLE lpFile, + LPHANDLE lpMapping, + LPVOID *lpBuffer) { DWORD dwError; @@ -635,7 +635,7 @@ /************************************************************************** - * UnmapAndCloseFile [SETUPAPI.@] + * pSetupUnmapAndCloseFile [SETUPAPI.@] * * Unmap and close a mapped file. * @@ -648,7 +648,7 @@ * Success: TRUE * Failure: FALSE */ -BOOL WINAPI UnmapAndCloseFile(HANDLE hFile, HANDLE hMapping, LPVOID lpBuffer) +BOOL WINAPI pSetupUnmapAndCloseFile(HANDLE hFile, HANDLE hMapping, LPVOID lpBuffer) { TRACE("%p %p %p\n", hFile, hMapping, lpBuffer); @@ -938,7 +938,7 @@ /************************************************************************** - * MyGetFileTitle [SETUPAPI.@] + * pSetupGetFileTitle [SETUPAPI.@] * * Returns a pointer to the last part of a fully qualified file name. * @@ -949,7 +949,7 @@ * Pointer to a files name. */ LPWSTR WINAPI -MyGetFileTitle(LPCWSTR lpFileName) +pSetupGetFileTitle(LPCWSTR lpFileName) { LPWSTR ptr; LPWSTR ret; @@ -976,7 +976,7 @@ /************************************************************************** - * ConcatenatePaths [SETUPAPI.@] + * pSetupConcatenatePaths [SETUPAPI.@] * * Concatenates two paths. * @@ -991,10 +991,10 @@ * Failure: FALSE */ BOOL WINAPI -ConcatenatePaths(LPWSTR lpPath, - LPCWSTR lpAppend, - DWORD dwBufferSize, - LPDWORD lpRequiredSize) +pSetupConcatenatePaths(LPWSTR lpPath, + LPCWSTR lpAppend, + DWORD dwBufferSize, + LPDWORD lpRequiredSize) { DWORD dwPathSize; DWORD dwAppendSize; @@ -1048,7 +1048,7 @@ /************************************************************************** - * CenterWindowRelativeToParent [SETUPAPI.@] + * pSetupCenterWindowRelativeToParent [SETUPAPI.@] * * Centers a window relative to its parent. * @@ -1059,7 +1059,7 @@ * None */ VOID WINAPI -CenterWindowRelativeToParent(HWND hwnd) +pSetupCenterWindowRelativeToParent(HWND hwnd) { HWND hwndOwner; POINT ptOrigin; @@ -1094,7 +1094,7 @@ /************************************************************************** - * GetVersionInfoFromImage [SETUPAPI.@] + * pSetupGetVersionInfoFromImage [SETUPAPI.@] * * Retrieves version information for a given file. * @@ -1109,9 +1109,9 @@ * Failure: FALSE */ BOOL WINAPI -GetVersionInfoFromImage(LPWSTR lpFileName, - PULARGE_INTEGER lpFileVersion, - LPWORD lpVersionVarSize) +pSetupGetVersionInfoFromImage(LPWSTR lpFileName, + PULARGE_INTEGER lpFileVersion, + LPWORD lpVersionVarSize) { DWORD dwHandle; DWORD dwSize; @@ -1345,7 +1345,7 @@ TRACE("%s, %p, %d, %p, %p, %p, %p\n", debugstr_a(source), name, len, required, source_size, target_size, type); - if (!source || !(sourceW = MultiByteToUnicode( source, CP_ACP ))) return FALSE; + if (!source || !(sourceW = pSetupMultiByteToUnicode( source, CP_ACP ))) return FALSE; if (name) { @@ -1359,7 +1359,7 @@ ret = SetupGetFileCompressionInfoExW( sourceW, nameW, nb_chars, &nb_chars, source_size, target_size, type ); if (ret) { - if ((nameA = UnicodeToMultiByte( nameW, CP_ACP ))) + if ((nameA = pSetupUnicodeToMultiByte( nameW, CP_ACP ))) { if (name && len >= nb_chars) lstrcpyA( name, nameA ); else @@ -1580,8 +1580,8 @@ DWORD ret = FALSE; WCHAR *sourceW = NULL, *targetW = NULL; - if (source && !(sourceW = MultiByteToUnicode( source, CP_ACP ))) return FALSE; - if (target && !(targetW = MultiByteToUnicode( target, CP_ACP ))) + if (source && !(sourceW = pSetupMultiByteToUnicode( source, CP_ACP ))) return FALSE; + if (target && !(targetW = pSetupMultiByteToUnicode( target, CP_ACP ))) { MyFree( sourceW ); return ERROR_NOT_ENOUGH_MEMORY; @@ -1736,7 +1736,7 @@ */ BOOL WINAPI -IsUserAdmin(VOID) +pSetupIsUserAdmin(VOID) { SID_IDENTIFIER_AUTHORITY Authority = {SECURITY_NT_AUTHORITY}; BOOL bResult = FALSE; @@ -1773,7 +1773,7 @@ if (Flags & SPFILELOG_SYSTEMLOG) { - if (!IsUserAdmin() && !(Flags & SPFILELOG_QUERYONLY)) + if (!pSetupIsUserAdmin() && !(Flags & SPFILELOG_QUERYONLY)) { /* insufficient privileges */ SetLastError(ERROR_ACCESS_DENIED); Modified: trunk/reactos/dll/win32/setupapi/parser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/parser.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/parser.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/parser.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -2243,7 +2243,7 @@ if (DirectoryPath != NULL) { - DirectoryPathW = MultiByteToUnicode(DirectoryPath, CP_ACP); + DirectoryPathW = pSetupMultiByteToUnicode(DirectoryPath, CP_ACP); if (DirectoryPathW == NULL) goto Cleanup; } @@ -2318,7 +2318,7 @@ if (InfName != NULL) { - InfNameW = MultiByteToUnicode(InfName, CP_ACP); + InfNameW = pSetupMultiByteToUnicode(InfName, CP_ACP); if (InfNameW == NULL) goto Cleanup; } Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -213,7 +213,7 @@ @ stdcall InstallHinfSection(long long str long) InstallHinfSectionA @ stdcall InstallHinfSectionA(long long str long) @ stdcall InstallHinfSectionW(long long wstr long) -@ stdcall IsUserAdmin() +@ stdcall IsUserAdmin() pSetupIsUserAdmin @ stdcall MyFree(ptr) @ stdcall MyMalloc(long) @ stdcall MyRealloc(ptr long) @@ -532,32 +532,32 @@ @ stdcall SetupUninstallOEMInfW(wstr long ptr) @ stub SetupVerifyInfFileA @ stub SetupVerifyInfFileW -@ stdcall UnicodeToMultiByte(wstr long) +@ stdcall UnicodeToMultiByte(wstr long) pSetupUnicodeToMultiByte @ stub VerifyCatalogFile @ stub pSetupAccessRunOnceNodeList @ stub pSetupAcquireSCMLock @ stub pSetupAddMiniIconToList @ stub pSetupAddTagToGroupOrderListEntry @ stub pSetupAppendStringToMultiSz -@ stdcall pSetupCaptureAndConvertAnsiArg(str ptr) CaptureAndConvertAnsiArg -@ stdcall pSetupCenterWindowRelativeToParent(long) CenterWindowRelativeToParent -@ stdcall pSetupConcatenatePaths(wstr wstr long ptr) ConcatenatePaths +@ stdcall pSetupCaptureAndConvertAnsiArg(str ptr) +@ stdcall pSetupCenterWindowRelativeToParent(long) +@ stdcall pSetupConcatenatePaths(wstr wstr long ptr) @ stub pSetupDestroyRunOnceNodeList @ stub pSetupDiGetDeviceInfoContext @ stub pSetupDiSetDeviceInfoContext @ stub pSetupDoesUserHavePrivilege -@ stdcall pSetupDuplicateString(wstr) DuplicateString -@ stdcall pSetupEnablePrivilege(wstr long) EnablePrivilege +@ stdcall pSetupDuplicateString(wstr) +@ stdcall pSetupEnablePrivilege(wstr long) @ stub pSetupFree @ stub pSetupFreeStringArray @ stub pSetupGetCurrentDriverSigningPolicy @ stdcall pSetupGetField(ptr long) -@ stdcall pSetupGetFileTitle(wstr) MyGetFileTitle +@ stdcall pSetupGetFileTitle(wstr) @ stdcall pSetupGetGlobalFlags() @ stub pSetupGetInfSections @ stdcall pSetupGetQueueFlags(ptr) @ stub pSetupGetRealSystemTime -@ stdcall pSetupGetVersionInfoFromImage(wstr ptr ptr) GetVersionInfoFromImage +@ stdcall pSetupGetVersionInfoFromImage(wstr ptr ptr) @ stdcall pSetupGuidFromString(wstr ptr) @ stub pSetupHandleFailedVerification @ stub pSetupInfCacheBuild @@ -566,16 +566,16 @@ @ stub pSetupInstallStopEx @ stdcall pSetupIsGuidNull(ptr) @ stub pSetupIsLocalSystem -@ stdcall pSetupIsUserAdmin() IsUserAdmin +@ stdcall pSetupIsUserAdmin() @ stub pSetupMakeSurePathExists @ stub pSetupMalloc @ stub pSetupModifyGlobalFlags -@ stdcall pSetupMultiByteToUnicode(str long) MultiByteToUnicode -@ stdcall pSetupOpenAndMapFileForRead(wstr ptr ptr ptr ptr) OpenAndMapFileForRead +@ stdcall pSetupMultiByteToUnicode(str long) +@ stdcall pSetupOpenAndMapFileForRead(wstr ptr ptr ptr ptr) @ stub pSetupOutOfMemory @ stub pSetupQueryMultiSzValueToArray @ stub pSetupRealloc -@ stdcall pSetupRegistryDelnode(long long) RegistryDelnode +@ stdcall pSetupRegistryDelnode(long long) @ stub pSetupRetrieveServiceConfig @ stub pSetupSetArrayToMultiSzValue @ stdcall pSetupSetGlobalFlags(long) @@ -597,8 +597,8 @@ @ stdcall pSetupStringTableSetExtraData(ptr long ptr long) @ stdcall pSetupStringTableStringFromId(ptr long) @ stdcall pSetupStringTableStringFromIdEx(ptr long ptr ptr) -@ stdcall pSetupUnicodeToMultiByte(wstr long) UnicodeToMultiByte -@ stdcall pSetupUnmapAndCloseFile(long long ptr) UnmapAndCloseFile +@ stdcall pSetupUnicodeToMultiByte(wstr long) +@ stdcall pSetupUnmapAndCloseFile(long long ptr) @ stub pSetupVerifyCatalogFile @ stub pSetupVerifyFile @ stub pSetupVerifyQueuedCatalogs Modified: trunk/reactos/dll/win32/setupapi/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/stubs.c…
============================================================================== --- trunk/reactos/dll/win32/setupapi/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/stubs.c [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -42,9 +42,9 @@ } /*********************************************************************** - * RegistryDelnode(SETUPAPI.@) - */ -BOOL WINAPI RegistryDelnode(DWORD x, DWORD y) + * pSetupRegistryDelnode(SETUPAPI.@) + */ +BOOL WINAPI pSetupRegistryDelnode(DWORD x, DWORD y) { FIXME("%08x %08x: stub\n", x, y); return FALSE; Modified: trunk/reactos/include/psdk/setupapi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/setupapi.h?re…
============================================================================== --- trunk/reactos/include/psdk/setupapi.h [iso-8859-1] (original) +++ trunk/reactos/include/psdk/setupapi.h [iso-8859-1] Sat Feb 26 21:40:17 2011 @@ -1116,24 +1116,15 @@ WINSETUPAPI LONG WINAPI AddTagToGroupOrderList(PCWSTR, DWORD, DWORD); WINSETUPAPI VOID WINAPI AssertFail(LPSTR, UINT, LPSTR); -WINSETUPAPI DWORD WINAPI CaptureAndConvertAnsiArg(PCSTR, PWSTR*); WINSETUPAPI DWORD WINAPI CaptureStringArg(PCWSTR, PWSTR*); -WINSETUPAPI VOID WINAPI CenterWindowRelativeToParent(HWND); -WINSETUPAPI BOOL WINAPI ConcatenatePaths(LPWSTR, LPCWSTR, DWORD, LPDWORD); WINSETUPAPI BOOL WINAPI DelayedMove(PCWSTR, PCWSTR); WINSETUPAPI BOOL WINAPI DoesUserHavePrivilege(PCWSTR); -WINSETUPAPI PWSTR WINAPI DuplicateString(PCWSTR); -WINSETUPAPI BOOL WINAPI EnablePrivilege(PCWSTR, BOOL); WINSETUPAPI BOOL WINAPI FileExists(PCWSTR, PWIN32_FIND_DATAW); WINSETUPAPI DWORD WINAPI GetSetFileTimestamp(PCWSTR, PFILETIME, PFILETIME, PFILETIME, BOOLEAN); -WINSETUPAPI BOOL WINAPI GetVersionInfoFromImage(LPWSTR, PULARGE_INTEGER, LPWORD); WINSETUPAPI BOOL WINAPI IsUserAdmin(VOID); -WINSETUPAPI PWSTR WINAPI MultiByteToUnicode(PCSTR, UINT); WINSETUPAPI VOID WINAPI MyFree(PVOID); -WINSETUPAPI PWSTR WINAPI MyGetFileTitle(PCWSTR); WINSETUPAPI PVOID WINAPI MyMalloc(DWORD); WINSETUPAPI PVOID WINAPI MyRealloc(PVOID, DWORD); -WINSETUPAPI DWORD WINAPI OpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID*); WINSETUPAPI LONG WINAPI QueryRegistryValue(HKEY, PCWSTR, PBYTE*, PDWORD, PDWORD); WINSETUPAPI DWORD WINAPI RetreiveFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR*); @@ -1430,6 +1421,20 @@ WINSETUPAPI DWORD WINAPI StampFileSecurity(PCWSTR, PSECURITY_DESCRIPTOR); + +WINSETUPAPI DWORD WINAPI pSetupCaptureAndConvertAnsiArg(PCSTR, PWSTR*); +WINSETUPAPI VOID WINAPI pSetupCenterWindowRelativeToParent(HWND); +WINSETUPAPI BOOL WINAPI pSetupConcatenatePaths(LPWSTR, LPCWSTR, DWORD, LPDWORD); +WINSETUPAPI PWSTR WINAPI pSetupDuplicateString(PCWSTR); +WINSETUPAPI BOOL WINAPI pSetupEnablePrivilege(PCWSTR, BOOL); +WINSETUPAPI PWSTR WINAPI pSetupGetFileTitle(PCWSTR); +WINSETUPAPI BOOL WINAPI pSetupGetVersionInfoFromImage(LPWSTR, PULARGE_INTEGER, LPWORD); +WINSETUPAPI BOOL WINAPI pSetupIsUserAdmin(VOID); +WINSETUPAPI PWSTR WINAPI pSetupMultiByteToUnicode(PCSTR, UINT); +WINSETUPAPI DWORD WINAPI pSetupOpenAndMapForRead(PCWSTR, PDWORD, PHANDLE, PHANDLE, PVOID*); + + + WINSETUPAPI DWORD WINAPI pSetupStringTableAddString(HSTRING_TABLE, LPWSTR, DWORD); WINSETUPAPI DWORD WINAPI pSetupStringTableAddStringEx(HSTRING_TABLE, LPWSTR, DWORD, LPVOID, DWORD); WINSETUPAPI VOID WINAPI pSetupStringTableDestroy(HSTRING_TABLE); @@ -1443,9 +1448,12 @@ WINSETUPAPI LPWSTR WINAPI pSetupStringTableStringFromId(HSTRING_TABLE, DWORD); WINSETUPAPI BOOL WINAPI pSetupStringTableStringFromIdEx(HSTRING_TABLE, DWORD, LPWSTR, LPDWORD); +WINSETUPAPI PSTR WINAPI pSetupUnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); +WINSETUPAPI BOOL WINAPI pSetupUnmapAndCloseFile(HANDLE, HANDLE, PVOID); + + WINSETUPAPI DWORD WINAPI TakeOwnershipOfFile(PCWSTR); WINSETUPAPI PSTR WINAPI UnicodeToMultiByte(PCWSTR lpUnicodeStr, UINT uCodePage); -WINSETUPAPI BOOL WINAPI UnmapAndCloseFile(HANDLE, HANDLE, PVOID); /* for backward compatability */
13 years, 10 months
1
0
0
0
[hpoussin] 50914: [ntoskrnl] Fix compilation with _WINKD_=1
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sat Feb 26 20:00:08 2011 New Revision: 50914 URL:
http://svn.reactos.org/svn/reactos?rev=50914&view=rev
Log: [ntoskrnl] Fix compilation with _WINKD_=1 Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c Modified: trunk/reactos/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/traphdlr.…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Sat Feb 26 20:00:08 2011 @@ -46,7 +46,7 @@ }; PFAST_SYSTEM_CALL_EXIT KiFastCallExitHandler; -#if DBG +#if DBG && !defined(_WINKD_) PKDBG_PRESERVICEHOOK KeWin32PreServiceHook = NULL; PKDBG_POSTSERVICEHOOK KeWin32PostServiceHook = NULL; #endif @@ -1452,7 +1452,7 @@ VOID KiDbgPreServiceHook(ULONG SystemCallNumber, PULONG_PTR Arguments) { -#if DBG +#if DBG && !defined(_WINKD_) if (SystemCallNumber >= 0x1000 && KeWin32PreServiceHook) KeWin32PreServiceHook(SystemCallNumber, Arguments); #endif @@ -1462,7 +1462,7 @@ ULONG_PTR KiDbgPostServiceHook(ULONG SystemCallNumber, ULONG_PTR Result) { -#if DBG +#if DBG && !defined(_WINKD_) if (SystemCallNumber >= 0x1000 && KeWin32PostServiceHook) return KeWin32PostServiceHook(SystemCallNumber, Result); #endif
13 years, 10 months
1
0
0
0
[pschweitzer] 50913: [KERNEL32] Start unifying kernel32 Find* functions. All calls end in same methods that are working only in unicode now. Next step would be to unify stream & files using only on...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Feb 26 17:18:21 2011 New Revision: 50913 URL:
http://svn.reactos.org/svn/reactos?rev=50913&view=rev
Log: [KERNEL32] Start unifying kernel32 Find* functions. All calls end in same methods that are working only in unicode now. Next step would be to unify stream & files using only one struct. Modified: trunk/reactos/dll/win32/kernel32/file/find.c Modified: trunk/reactos/dll/win32/kernel32/file/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/fi…
============================================================================== --- trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/file/find.c [iso-8859-1] Sat Feb 26 17:18:21 2011 @@ -5,6 +5,7 @@ * FILE: lib/kernel32/file/find.c * PURPOSE: Find functions * PROGRAMMER: Ariadne ( ariadne(a)xs4all.nl) + * Pierre Schweitzer (pierre.schweitzer(a)reactos.org) * UPDATE HISTORY: * Created 01/11/98 */ @@ -74,34 +75,6 @@ } static VOID -InternalCopyDeviceFindDataA(LPWIN32_FIND_DATAA lpFindFileData, - PUNICODE_STRING FileName, - ULONG DeviceNameInfo) -{ - UNICODE_STRING DeviceName; - ANSI_STRING BufferA; - CHAR Buffer[MAX_PATH]; - - DeviceName.Length = DeviceName.MaximumLength = (USHORT)(DeviceNameInfo & 0xFFFF); - DeviceName.Buffer = (LPWSTR)((ULONG_PTR)FileName->Buffer + (DeviceNameInfo >> 16)); - - BufferA.MaximumLength = sizeof(Buffer) - sizeof(Buffer[0]); - BufferA.Buffer = Buffer; - if (bIsFileApiAnsi) - RtlUnicodeStringToAnsiString (&BufferA, &DeviceName, FALSE); - else - RtlUnicodeStringToOemString (&BufferA, &DeviceName, FALSE); - - /* Return the data */ - RtlZeroMemory(lpFindFileData, - sizeof(*lpFindFileData)); - lpFindFileData->dwFileAttributes = FILE_ATTRIBUTE_ARCHIVE; - RtlCopyMemory(lpFindFileData->cFileName, - BufferA.Buffer, - BufferA.Length); -} - -static VOID InternalCopyFindDataW(LPWIN32_FIND_DATAW lpFindFileData, PFILE_BOTH_DIR_INFORMATION lpFileInfo) { @@ -126,57 +99,6 @@ lpFindFileData->cAlternateFileName[lpFileInfo->ShortNameLength / sizeof(WCHAR)] = 0; } -static VOID -InternalCopyFindDataA(LPWIN32_FIND_DATAA lpFindFileData, - PFILE_BOTH_DIR_INFORMATION lpFileInfo) -{ - UNICODE_STRING FileNameU; - ANSI_STRING FileNameA; - - lpFindFileData->dwFileAttributes = lpFileInfo->FileAttributes; - - lpFindFileData->ftCreationTime.dwHighDateTime = lpFileInfo->CreationTime.u.HighPart; - lpFindFileData->ftCreationTime.dwLowDateTime = lpFileInfo->CreationTime.u.LowPart; - - lpFindFileData->ftLastAccessTime.dwHighDateTime = lpFileInfo->LastAccessTime.u.HighPart; - lpFindFileData->ftLastAccessTime.dwLowDateTime = lpFileInfo->LastAccessTime.u.LowPart; - - lpFindFileData->ftLastWriteTime.dwHighDateTime = lpFileInfo->LastWriteTime.u.HighPart; - lpFindFileData->ftLastWriteTime.dwLowDateTime = lpFileInfo->LastWriteTime.u.LowPart; - - lpFindFileData->nFileSizeHigh = lpFileInfo->EndOfFile.u.HighPart; - lpFindFileData->nFileSizeLow = lpFileInfo->EndOfFile.u.LowPart; - - FileNameU.Length = FileNameU.MaximumLength = (USHORT)lpFileInfo->FileNameLength; - FileNameU.Buffer = lpFileInfo->FileName; - - FileNameA.MaximumLength = sizeof(lpFindFileData->cFileName) - sizeof(CHAR); - FileNameA.Buffer = lpFindFileData->cFileName; - - /* convert unicode string to ansi (or oem) */ - if (bIsFileApiAnsi) - RtlUnicodeStringToAnsiString (&FileNameA, &FileNameU, FALSE); - else - RtlUnicodeStringToOemString (&FileNameA, &FileNameU, FALSE); - - FileNameA.Buffer[FileNameA.Length] = 0; - - TRACE("lpFileInfo->ShortNameLength %d\n", lpFileInfo->ShortNameLength); - - FileNameU.Length = FileNameU.MaximumLength = lpFileInfo->ShortNameLength; - FileNameU.Buffer = lpFileInfo->ShortName; - - FileNameA.MaximumLength = sizeof(lpFindFileData->cAlternateFileName) - sizeof(CHAR); - FileNameA.Buffer = lpFindFileData->cAlternateFileName; - - /* convert unicode string to ansi (or oem) */ - if (bIsFileApiAnsi) - RtlUnicodeStringToAnsiString (&FileNameA, &FileNameU, FALSE); - else - RtlUnicodeStringToOemString (&FileNameA, &FileNameU, FALSE); - - FileNameA.Buffer[FileNameA.Length] = 0; -} /* * @implemented @@ -186,8 +108,7 @@ InternalFindNextFile ( HANDLE hFindFile, PUNICODE_STRING SearchPattern, - PVOID lpFindFileData, - BOOL bUnicode + PVOID lpFindFileData ) { PKERNEL32_FIND_DATA_HEADER IHeader; @@ -290,16 +211,8 @@ { _SEH2_TRY { - if (bUnicode) - { - InternalCopyFindDataW(lpFindFileData, - FoundFile); - } - else - { - InternalCopyFindDataA(lpFindFileData, - FoundFile); - } + InternalCopyFindDataW(lpFindFileData, + FoundFile); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -334,8 +247,7 @@ InternalFindFirstFile ( LPCWSTR lpFileName, BOOLEAN DirectoryOnly, - PVOID lpFindFileData, - BOOL bUnicode + PVOID lpFindFileData ) { OBJECT_ATTRIBUTES ObjectAttributes; @@ -460,18 +372,9 @@ DeviceNameInfo = RtlIsDosDeviceName_U((PWSTR)((ULONG_PTR)lpFileName)); if (DeviceNameInfo != 0) { - if (bUnicode) - { - InternalCopyDeviceFindDataW(lpFindFileData, - lpFileName, - DeviceNameInfo); - } - else - { - InternalCopyDeviceFindDataA(lpFindFileData, - &FileName, - DeviceNameInfo); - } + InternalCopyDeviceFindDataW(lpFindFileData, + lpFileName, + DeviceNameInfo); return FIND_DEVICE_HANDLE; } @@ -526,8 +429,7 @@ bResult = InternalFindNextFile((HANDLE)IHeader, &PathFileName, - lpFindFileData, - bUnicode); + lpFindFileData); RtlFreeHeap (hProcessHeap, 0, @@ -551,17 +453,59 @@ */ HANDLE WINAPI -FindFirstFileA ( - LPCSTR lpFileName, - LPWIN32_FIND_DATAA lpFindFileData - ) -{ - return FindFirstFileExA (lpFileName, - FindExInfoStandard, - (LPVOID)lpFindFileData, - FindExSearchNameMatch, - NULL, - 0); +FindFirstFileA(IN LPCSTR lpFileName, + OUT LPWIN32_FIND_DATAA lpFindFileData) +{ + HANDLE hSearch; + NTSTATUS Status; + ANSI_STRING Ansi; + UNICODE_STRING UTF8; + PUNICODE_STRING lpFileNameW; + WIN32_FIND_DATAW FindFileDataW; + + lpFileNameW = Basep8BitStringToStaticUnicodeString(lpFileName); + if (!lpFileNameW) + { + return INVALID_HANDLE_VALUE; + } + + hSearch = FindFirstFileExW(lpFileNameW->Buffer, + FindExInfoStandard, + &FindFileDataW, + FindExSearchNameMatch, + NULL, 0); + if (hSearch == INVALID_HANDLE_VALUE) + { + return INVALID_HANDLE_VALUE; + } + + memcpy(lpFindFileData, &FindFileDataW, FIELD_OFFSET(WIN32_FIND_DATA, cFileName)); + + RtlInitUnicodeString(&UTF8, FindFileDataW.cFileName); + Ansi.Buffer = lpFindFileData->cFileName; + Ansi.Length = 0; + Ansi.MaximumLength = MAX_PATH; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + FindClose(hSearch); + BaseSetLastNTError(Status); + return INVALID_HANDLE_VALUE; + } + + RtlInitUnicodeString(&UTF8, FindFileDataW.cAlternateFileName); + Ansi.Buffer = lpFindFileData->cAlternateFileName; + Ansi.Length = 0; + Ansi.MaximumLength = 14; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + FindClose(hSearch); + BaseSetLastNTError(Status); + return INVALID_HANDLE_VALUE; + } + + return hSearch; } @@ -570,14 +514,44 @@ */ BOOL WINAPI -FindNextFileA ( - HANDLE hFindFile, - LPWIN32_FIND_DATAA lpFindFileData) -{ - return InternalFindNextFile (hFindFile, - NULL, - lpFindFileData, - FALSE); +FindNextFileA(IN HANDLE hFindFile, + OUT LPWIN32_FIND_DATAA lpFindFileData) +{ + NTSTATUS Status; + ANSI_STRING Ansi; + UNICODE_STRING UTF8; + WIN32_FIND_DATAW FindFileDataW; + + if (!FindNextFileW(hFindFile, &FindFileDataW)) + { + return FALSE; + } + + memcpy(lpFindFileData, &FindFileDataW, FIELD_OFFSET(WIN32_FIND_DATA, cFileName)); + + RtlInitUnicodeString(&UTF8, FindFileDataW.cFileName); + Ansi.Buffer = lpFindFileData->cFileName; + Ansi.Length = 0; + Ansi.MaximumLength = MAX_PATH; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + RtlInitUnicodeString(&UTF8, FindFileDataW.cAlternateFileName); + Ansi.Buffer = lpFindFileData->cAlternateFileName; + Ansi.Length = 0; + Ansi.MaximumLength = 14; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + BaseSetLastNTError(Status); + return FALSE; + } + + return TRUE; } @@ -643,17 +617,15 @@ */ HANDLE WINAPI -FindFirstFileW ( - LPCWSTR lpFileName, - LPWIN32_FIND_DATAW lpFindFileData - ) -{ - return FindFirstFileExW (lpFileName, - FindExInfoStandard, - (LPVOID)lpFindFileData, - FindExSearchNameMatch, - NULL, - 0); +FindFirstFileW(IN LPCWSTR lpFileName, + OUT LPWIN32_FIND_DATAW lpFindFileData) +{ + return FindFirstFileExW(lpFileName, + FindExInfoStandard, + lpFindFileData, + FindExSearchNameMatch, + NULL, + 0); } /* @@ -661,15 +633,12 @@ */ BOOL WINAPI -FindNextFileW ( - HANDLE hFindFile, - LPWIN32_FIND_DATAW lpFindFileData - ) -{ - return InternalFindNextFile (hFindFile, - NULL, - lpFindFileData, - TRUE); +FindNextFileW(IN HANDLE hFindFile, + OUT LPWIN32_FIND_DATAW lpFindFileData) +{ + return InternalFindNextFile(hFindFile, + NULL, + lpFindFileData); } @@ -678,12 +647,12 @@ */ HANDLE WINAPI -FindFirstFileExW (LPCWSTR lpFileName, - FINDEX_INFO_LEVELS fInfoLevelId, - LPVOID lpFindFileData, - FINDEX_SEARCH_OPS fSearchOp, - LPVOID lpSearchFilter, - DWORD dwAdditionalFlags) +FindFirstFileExW(IN LPCWSTR lpFileName, + IN FINDEX_INFO_LEVELS fInfoLevelId, + OUT LPVOID lpFindFileData, + IN FINDEX_SEARCH_OPS fSearchOp, + LPVOID lpSearchFilter, + IN DWORD dwAdditionalFlags) { if (fInfoLevelId != FindExInfoStandard) { @@ -701,8 +670,7 @@ return InternalFindFirstFile (lpFileName, fSearchOp == FindExSearchLimitToDirectories, - lpFindFileData, - TRUE); + lpFindFileData); } SetLastError(ERROR_INVALID_PARAMETER); @@ -714,51 +682,64 @@ */ HANDLE WINAPI -FindFirstFileExA ( - LPCSTR lpFileName, - FINDEX_INFO_LEVELS fInfoLevelId, - LPVOID lpFindFileData, - FINDEX_SEARCH_OPS fSearchOp, - LPVOID lpSearchFilter, - DWORD dwAdditionalFlags - ) -{ - UNICODE_STRING FileNameU; - ANSI_STRING FileNameA; - HANDLE Handle; - - if (fInfoLevelId != FindExInfoStandard) - { - SetLastError(ERROR_INVALID_PARAMETER); - return INVALID_HANDLE_VALUE; - } - if (fSearchOp == FindExSearchNameMatch || fSearchOp == FindExSearchLimitToDirectories) - { - if (lpSearchFilter) - { - SetLastError(ERROR_INVALID_PARAMETER); - return INVALID_HANDLE_VALUE; - } - - RtlInitAnsiString (&FileNameA, (LPSTR)lpFileName); - - /* convert ansi (or oem) string to unicode */ - if (bIsFileApiAnsi) - RtlAnsiStringToUnicodeString (&FileNameU, &FileNameA, TRUE); - else - RtlOemStringToUnicodeString (&FileNameU, &FileNameA, TRUE); - - Handle = InternalFindFirstFile (FileNameU.Buffer, - fSearchOp == FindExSearchLimitToDirectories, - lpFindFileData, - FALSE); - - RtlFreeUnicodeString (&FileNameU); - return Handle; - } - - SetLastError(ERROR_INVALID_PARAMETER); - return INVALID_HANDLE_VALUE; +FindFirstFileExA(IN LPCSTR lpFileName, + IN FINDEX_INFO_LEVELS fInfoLevelId, + OUT LPVOID lpFindFileData, + IN FINDEX_SEARCH_OPS fSearchOp, + LPVOID lpSearchFilter, + IN DWORD dwAdditionalFlags) +{ + HANDLE hSearch; + NTSTATUS Status; + ANSI_STRING Ansi; + UNICODE_STRING UTF8; + PUNICODE_STRING lpFileNameW; + WIN32_FIND_DATAW FindFileDataW; + + lpFileNameW = Basep8BitStringToStaticUnicodeString(lpFileName); + if (!lpFileNameW) + { + return INVALID_HANDLE_VALUE; + } + + hSearch = FindFirstFileExW(lpFileNameW->Buffer, + fInfoLevelId, + &FindFileDataW, + fSearchOp, + lpSearchFilter, + dwAdditionalFlags); + if (hSearch == INVALID_HANDLE_VALUE) + { + return INVALID_HANDLE_VALUE; + } + + memcpy(lpFindFileData, &FindFileDataW, FIELD_OFFSET(WIN32_FIND_DATA, cFileName)); + + RtlInitUnicodeString(&UTF8, FindFileDataW.cFileName); + Ansi.Buffer = ((LPWIN32_FIND_DATAA)lpFindFileData)->cFileName; + Ansi.Length = 0; + Ansi.MaximumLength = MAX_PATH; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + FindClose(hSearch); + BaseSetLastNTError(Status); + return INVALID_HANDLE_VALUE; + } + + RtlInitUnicodeString(&UTF8, FindFileDataW.cAlternateFileName); + Ansi.Buffer = ((LPWIN32_FIND_DATAA)lpFindFileData)->cAlternateFileName; + Ansi.Length = 0; + Ansi.MaximumLength = 14; + Status = BasepUnicodeStringTo8BitString(&Ansi, &UTF8, FALSE); + if (!NT_SUCCESS(Status)) + { + FindClose(hSearch); + BaseSetLastNTError(Status); + return INVALID_HANDLE_VALUE; + } + + return hSearch; }
13 years, 10 months
1
0
0
0
[fireball] 50912: [KERNEL32] - Fix buffer overwrite in GetModuleFileName(). Spotted by DPH. See issue #5964 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Sat Feb 26 16:50:20 2011 New Revision: 50912 URL:
http://svn.reactos.org/svn/reactos?rev=50912&view=rev
Log: [KERNEL32] - Fix buffer overwrite in GetModuleFileName(). Spotted by DPH. See issue #5964 for more details. Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c Modified: trunk/reactos/dll/win32/kernel32/misc/ldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/ld…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/ldr.c [iso-8859-1] Sat Feb 26 16:50:20 2011 @@ -431,10 +431,10 @@ &Module->FullDllName, FALSE); - if (nSize < Length) + if (Length < nSize) + lpFilename[Length] = '\0'; + else SetLastErrorByStatus (STATUS_BUFFER_TOO_SMALL); - else - lpFilename[Length] = '\0'; RtlLeaveCriticalSection (Peb->LoaderLock); return Length; @@ -489,10 +489,10 @@ RtlCopyUnicodeString (&FileName, &Module->FullDllName); - if (nSize < Length) + if (Length < nSize) + lpFilename[Length] = L'\0'; + else SetLastErrorByStatus (STATUS_BUFFER_TOO_SMALL); - else - lpFilename[Length] = L'\0'; RtlLeaveCriticalSection (Peb->LoaderLock);
13 years, 10 months
1
0
0
0
[akhaldi] 50911: [ROSTESTS] - Skip test_apm to prevent the oleaut_winetest:olepicture crash. See issue #5000 for more details.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Feb 26 14:27:09 2011 New Revision: 50911 URL:
http://svn.reactos.org/svn/reactos?rev=50911&view=rev
Log: [ROSTESTS] - Skip test_apm to prevent the oleaut_winetest:olepicture crash. See issue #5000 for more details. Modified: trunk/rostests/winetests/oleaut32/olepicture.c Modified: trunk/rostests/winetests/oleaut32/olepicture.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/olepic…
============================================================================== --- trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/olepicture.c [iso-8859-1] Sat Feb 26 14:27:09 2011 @@ -517,6 +517,11 @@ BOOL keep; short type; + if(!winetest_interactive) { + skip("Bug 5000: oleaut_winetest:olepicture crashes with Page Fault.\n"); + return; + } + hglob = GlobalAlloc (0, sizeof(apmdata)); data = GlobalLock(hglob); memcpy(data, apmdata, sizeof(apmdata));
13 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
...
36
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
Results per page:
10
25
50
100
200