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
October 2005
----- 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
26 participants
737 discussions
Start a n
N
ew thread
[weiden] 18308: partly implemented AuthzInitializeResourceManager and AuthzFreeResourceManager (no support for auditing so far)
by weiden@svn.reactos.com
partly implemented AuthzInitializeResourceManager and AuthzFreeResourceManager (no support for auditing so far) Modified: trunk/reactos/lib/authz/authz.c Modified: trunk/reactos/lib/authz/authz.xml Modified: trunk/reactos/lib/authz/precomp.h Added: trunk/reactos/lib/authz/resman.c _____ Modified: trunk/reactos/lib/authz/authz.c --- trunk/reactos/lib/authz/authz.c 2005-10-07 00:35:10 UTC (rev 18307) +++ trunk/reactos/lib/authz/authz.c 2005-10-07 02:28:42 UTC (rev 18308) @@ -148,19 +148,6 @@ AUTHZAPI BOOL WINAPI -AuthzFreeResourceManager(IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager) -{ - UNIMPLEMENTED; - return FALSE; -} - - -/* - * @unimplemented - */ -AUTHZAPI -BOOL -WINAPI AuthzGetInformationFromContext(IN AUTHZ_CLIENT_CONTEXT_HANDLE hAuthzClientContext, IN AUTHZ_CONTEXT_INFORMATION_CLASS InfoClass, IN DWORD BufferSize, @@ -275,24 +262,6 @@ AUTHZAPI BOOL WINAPI -AuthzInitializeResourceManager(IN DWORD flags, - IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck, - IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups, - IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups, - IN PCWSTR ResourceManagerName, - IN PAUTHZ_RESOURCE_MANAGER_HANDLE pAuthzResourceManager) -{ - UNIMPLEMENTED; - return FALSE; -} - - -/* - * @unimplemented - */ -AUTHZAPI -BOOL -WINAPI AuthzInstallSecurityEventSource(IN DWORD dwFlags, IN PAUTHZ_SOURCE_SCHEMA_REGISTRATION pRegistration) { _____ Modified: trunk/reactos/lib/authz/authz.xml --- trunk/reactos/lib/authz/authz.xml 2005-10-07 00:35:10 UTC (rev 18307) +++ trunk/reactos/lib/authz/authz.xml 2005-10-07 02:28:42 UTC (rev 18308) @@ -11,6 +11,7 @@ <library>kernel32</library> <library>advapi32</library> <file>authz.c</file> + <file>resman.c</file> <file>authz.rc</file> <pch>precomp.h</pch> </module> _____ Modified: trunk/reactos/lib/authz/precomp.h --- trunk/reactos/lib/authz/precomp.h 2005-10-07 00:35:10 UTC (rev 18307) +++ trunk/reactos/lib/authz/precomp.h 2005-10-07 02:28:42 UTC (rev 18308) @@ -11,5 +11,22 @@ #define UNIMPLEMENTED DbgPrint("AUTHZ.DLL: %s is UNIMPLEMENTED!\n", __FUNCTION__) #endif +#if DBG +#define RESMAN_TAG 0x89ABCDEF +#define VALID_RESMAN_HANDLE(handle) ASSERT(((PAUTHZ_RESMAN)handle)->Tag == RESMAN_TAG) +#ifndef ASSERT +#define ASSERT(cond) if (!(cond)) { DbgPrint("%s:%i: ASSERTION %s failed!\n", __FILE__, __LINE__, #cond ); } +#endif + +#else + +#define VALID_RESMAN_HANDLE(handle) +#ifndef ASSERT +#define ASSERT(cond) +#endif + +#endif + + /* EOF */ _____ Added: trunk/reactos/lib/authz/resman.c --- trunk/reactos/lib/authz/resman.c 2005-10-07 00:35:10 UTC (rev 18307) +++ trunk/reactos/lib/authz/resman.c 2005-10-07 02:28:42 UTC (rev 18308) @@ -0,0 +1,271 @@ +/* + * ReactOS Authorization Framework + * Copyright (C) 2005 ReactOS Team + * + * 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 + */ +/* $Id: aclui.c 18173 2005-09-30 18:54:48Z weiden $ + * + * PROJECT: ReactOS Authorization Framework + * FILE: lib/authz/resman.c + * PURPOSE: Authorization Framework + * PROGRAMMER: Thomas Weidenmueller <w3seek(a)reactos.com> + * + * UPDATE HISTORY: + * 10/07/2005 Created + */ +#include <precomp.h> + +typedef struct _AUTHZ_RESMAN +{ +#if DBG + DWORD Tag; +#endif + + PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck; + PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups; + PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups; + + DWORD flags; + PSID UserSid; + LUID AuthenticationId; + + WCHAR ResourceManagerName[1]; +} AUTHZ_RESMAN, *PAUTHZ_RESMAN; + +static BOOL +AuthzpQueryToken(IN OUT PAUTHZ_RESMAN ResMan, + IN HANDLE hToken) +{ + TOKEN_USER User; + TOKEN_STATISTICS Statistics; + DWORD BufLen; + PSID UserSid = NULL; + BOOL Ret = FALSE; + + /* query information about the user */ + BufLen = sizeof(User); + Ret = GetTokenInformation(hToken, + TokenUser, + &User, + BufLen, + &BufLen); + if (Ret) + { + BufLen = GetLengthSid(User.User.Sid); + if (BufLen != 0) + { + UserSid = (PSID)LocalAlloc(LMEM_FIXED, + BufLen); + if (UserSid != NULL) + { + CopyMemory(UserSid, + User.User.Sid, + BufLen); + } + else + Ret = FALSE; + } + else + Ret = FALSE; + } + + if (Ret) + { + /* query general information */ + BufLen = sizeof(Statistics); + Ret = GetTokenInformation(hToken, + TokenUser, + &Statistics, + BufLen, + &BufLen); + } + + if (Ret) + { + ResMan->UserSid = UserSid; + ResMan->AuthenticationId = Statistics.AuthenticationId; + Ret = TRUE; + } + else + { + if (UserSid != NULL) + { + LocalFree((HLOCAL)UserSid); + } + } + + return Ret; +} + +static BOOL +AuthzpInitUnderImpersonation(IN OUT PAUTHZ_RESMAN ResMan) +{ + HANDLE hToken; + BOOL Ret; + + Ret = OpenThreadToken(GetCurrentThread(), + TOKEN_QUERY, + TRUE, + &hToken); + if (Ret) + { + Ret = AuthzpQueryToken(ResMan, + hToken); + CloseHandle(hToken); + } + + return Ret; +} + +static BOOL +AuthzpInitSelf(IN OUT PAUTHZ_RESMAN ResMan) +{ + HANDLE hToken; + BOOL Ret; + + Ret = OpenProcessToken(GetCurrentProcess(), + TOKEN_QUERY, + &hToken); + if (Ret) + { + Ret = AuthzpQueryToken(ResMan, + hToken); + CloseHandle(hToken); + } + + return Ret; +} + + +/* + * @unimplemented + */ +AUTHZAPI +BOOL +WINAPI +AuthzInitializeResourceManager(IN DWORD flags, + IN PFN_AUTHZ_DYNAMIC_ACCESS_CHECK pfnAccessCheck OPTIONAL, + IN PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS pfnComputeDynamicGroups OPTIONAL, + IN PFN_AUTHZ_FREE_DYNAMIC_GROUPS pfnFreeDynamicGroups OPTIONAL, + IN PCWSTR ResourceManagerName OPTIONAL, + IN PAUTHZ_RESOURCE_MANAGER_HANDLE pAuthzResourceManager) +{ + BOOL Ret = FALSE; + + if (pAuthzResourceManager != NULL && + !(flags & ~(AUTHZ_RM_FLAG_NO_AUDIT | AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION))) + { + PAUTHZ_RESMAN ResMan; + SIZE_T RequiredSize = sizeof(AUTHZ_RESMAN); + + if (ResourceManagerName != NULL) + { + RequiredSize += wcslen(ResourceManagerName) * sizeof(WCHAR); + } + + ResMan = (PAUTHZ_RESMAN)LocalAlloc(LMEM_FIXED, + RequiredSize); + if (ResMan != NULL) + { + /* initialize the resource manager structure */ +#if DBG + ResMan->Tag = RESMAN_TAG; +#endif + + ResMan->flags = flags; + ResMan->UserSid = NULL; + + if (ResourceManagerName != NULL) + { + wcscpy(ResMan->ResourceManagerName, + ResourceManagerName); + } + else + ResMan->ResourceManagerName[0] = UNICODE_NULL; + + ResMan->pfnAccessCheck = pfnAccessCheck; + ResMan->pfnComputeDynamicGroups = pfnComputeDynamicGroups; + ResMan->pfnFreeDynamicGroups = pfnFreeDynamicGroups; + + if (!(flags & AUTHZ_RM_FLAG_NO_AUDIT)) + { + /* FIXME - initialize auditing */ + DPRINT1("Auditing not implemented!\n"); + } + + if (flags & AUTHZ_RM_FLAG_INITIALIZE_UNDER_IMPERSONATION) + { + Ret = AuthzpInitUnderImpersonation(ResMan); + } + else + { + Ret = AuthzpInitSelf(ResMan); + } + + if (Ret) + { + /* finally return the handle */ + *pAuthzResourceManager = (AUTHZ_RESOURCE_MANAGER_HANDLE)ResMan; + } + else + { + DPRINT1("Querying the token failed!\n"); + LocalFree((HLOCAL)ResMan); + } + } + } + else + SetLastError(ERROR_INVALID_PARAMETER); + + return Ret; +} + + +/* + * @unimplemented + */ +AUTHZAPI +BOOL +WINAPI +AuthzFreeResourceManager(IN AUTHZ_RESOURCE_MANAGER_HANDLE AuthzResourceManager) +{ + BOOL Ret = FALSE; + + if (AuthzResourceManager != NULL) + { + PAUTHZ_RESMAN ResMan = (PAUTHZ_RESMAN)AuthzResourceManager; + + VALID_RESMAN_HANDLE(AuthzResourceManager); + + if (!(ResMan->flags & AUTHZ_RM_FLAG_NO_AUDIT)) + { + /* FIXME - cleanup auditing */ + } + + if (ResMan->UserSid != NULL) + { + LocalFree((HLOCAL)ResMan->UserSid); + } + + LocalFree((HLOCAL)AuthzResourceManager); + Ret = TRUE; + } + else + SetLastError(ERROR_INVALID_PARAMETER); + + return Ret; +} + Property changes on: trunk/reactos/lib/authz/resman.c ___________________________________________________________________ Name: svn:keywords + author date revision Name: svn:eol-style + native
19 years, 2 months
1
0
0
0
[npwoods] 18307: Regedit: Fixed a bug whereby a registry path accessed by "Goto" might not get properly selected
by npwoods@svn.reactos.com
Regedit: Fixed a bug whereby a registry path accessed by "Goto" might not get properly selected Modified: trunk/reactos/subsys/system/regedit/treeview.c _____ Modified: trunk/reactos/subsys/system/regedit/treeview.c --- trunk/reactos/subsys/system/regedit/treeview.c 2005-10-07 00:32:00 UTC (rev 18306) +++ trunk/reactos/subsys/system/regedit/treeview.c 2005-10-07 00:35:10 UTC (rev 18307) @@ -600,7 +600,7 @@ { memset(&tvi, 0, sizeof(tvi)); tvi.hItem = hChildItem; - tvi.mask = TVIF_TEXT; + tvi.mask = TVIF_TEXT | TVIF_CHILDREN; tvi.pszText = szBuffer; tvi.cchTextMax = sizeof(szBuffer) / sizeof(szBuffer[0]); @@ -613,8 +613,11 @@ if (!hChildItem) return FALSE; - if (!TreeView_Expand(hwndTV, hChildItem, TVE_EXPAND)) - return FALSE; + if (tvi.cChildren > 0) + { + if (!TreeView_Expand(hwndTV, hChildItem, TVE_EXPAND)) + return FALSE; + } keyPath = s ? s + 1 : _T(""); hItem = hChildItem;
19 years, 2 months
1
0
0
0
[npwoods] 18306: Calc: Now using the proper system brush to paint the number pane
by npwoods@svn.reactos.com
Calc: Now using the proper system brush to paint the number pane Modified: trunk/reactos/subsys/system/calc/winecalc.c _____ Modified: trunk/reactos/subsys/system/calc/winecalc.c --- trunk/reactos/subsys/system/calc/winecalc.c 2005-10-06 23:04:00 UTC (rev 18305) +++ trunk/reactos/subsys/system/calc/winecalc.c 2005-10-07 00:32:00 UTC (rev 18306) @@ -2741,6 +2741,8 @@ HFONT hFontOrg; HPEN hPen; HPEN hPenOrg; + HBRUSH hBrush; + HBRUSH hBrushOrg; TCHAR s2[CALC_BUF_SIZE]; @@ -2801,6 +2803,8 @@ hPen = CreatePen(PS_SOLID, 1, RGB(255,255,255)); hPenOrg = SelectObject(hdc, hPen); + hBrush = GetSysColorBrush(COLOR_WINDOW); + hBrushOrg = SelectObject(hdc, hBrush); MoveToEx(hdc, WDISPLAY_LEFT - 1, @@ -2814,6 +2818,7 @@ Rectangle(hdc, WDISPLAY_LEFT, WDISPLAY_TOP, WDISPLAY_RIGHT, WDISPLAY_BOTTOM); SelectObject(hdc, hPenOrg); + SelectObject(hdc, hBrushOrg); DeleteObject(hPen); SetBkMode(hdc, TRANSPARENT);
19 years, 2 months
1
0
0
0
[weiden] 18305: fixed uninitialized variable warning
by weiden@svn.reactos.com
fixed uninitialized variable warning Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-06 22:47:13 UTC (rev 18304) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-06 23:04:00 UTC (rev 18305) @@ -3545,7 +3545,7 @@ LPWSTR HardwareIDs = NULL; LPWSTR CompatibleIDs = NULL; FILETIME DriverDate; - DWORDLONG DriverVersion; + DWORDLONG DriverVersion = 0; DWORD RequiredSize; BOOL ret = FALSE;
19 years, 2 months
1
0
0
0
[hpoussin] 18304: Various changes to device installation functions:
by hpoussin@svn.reactos.com
Various changes to device installation functions: - AddDriverToList: Define a unique return point for the function - GetVersionInformationFromInfFile: Return driver date (still doesn't return driver version) - SetupDiCallClassInstaller: Change device and class co-installers messages (they were swapped) - SetupDiInstallDevice: Create driver key in HKLM\System\CurrentControlSet\Control\Class and write values to it Add missing informations to enum key (HKLM\System\CurrentControlSet\Enum) Define a unique return point for the function Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-06 22:36:14 UTC (rev 18303) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-06 22:47:13 UTC (rev 18304) @@ -131,6 +131,7 @@ SP_DRVINFO_DATA_V2_W Info; LPWSTR InfPath; LPWSTR InfSection; + LPWSTR MatchingId; }; struct DeviceInfoElement /* Element of DeviceInfoSet.ListHead */ @@ -2867,11 +2868,11 @@ InitializeListHead(&ClassCoInstallersListHead); InitializeListHead(&DeviceCoInstallersListHead); - if (CanHandle & CLASS_COINSTALLER) + if (CanHandle & DEVICE_COINSTALLER) { - FIXME("Doesn't use Class co-installers at the moment\n"); + FIXME("Doesn't use Device co-installers at the moment\n"); } - if (CanHandle & DEVICE_COINSTALLER) + if (CanHandle & CLASS_COINSTALLER) { rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, @@ -2896,8 +2897,8 @@ LPCWSTR ptr; for (ptr = KeyBuffer; *ptr; ptr += strlenW(ptr) + 1) { - /* Add coinstaller to DeviceCoInstallersListHead list */ - FIXME("Device coinstaller is '%S'\n", ptr); + /* Add coinstaller to ClassCoInstallersListHead list */ + FIXME("Class coinstaller is '%S'. UNIMPLEMENTED!\n", ptr); } } HeapFree(GetProcessHeap(), 0, KeyBuffer); @@ -3254,26 +3255,29 @@ IN LPCWSTR InfFile, IN LPCWSTR ProviderName, IN LPCWSTR ManufacturerName, + IN LPCWSTR MatchingId, FILETIME DriverDate, DWORDLONG DriverVersion, IN DWORD Rank) { - struct DriverInfoElement *driverInfo; + struct DriverInfoElement *driverInfo = NULL; DWORD RequiredSize = 128; /* Initial buffer size */ BOOL Result = FALSE; PLIST_ENTRY PreviousEntry; LPWSTR DeviceDescription = NULL; LPWSTR InfInstallSection = NULL; + BOOL ret = FALSE; driverInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(struct DriverInfoElement)); if (!driverInfo) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; + goto cleanup; } + memset(driverInfo, 0, sizeof(struct DriverInfoElement)); + /* Fill InfSection field */ SetLastError(ERROR_INSUFFICIENT_BUFFER); - driverInfo->InfSection = NULL; while (!Result && GetLastError() == ERROR_INSUFFICIENT_BUFFER) { HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); @@ -3281,8 +3285,7 @@ if (!driverInfo->InfSection) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - HeapFree(GetProcessHeap(), 0, driverInfo); - return FALSE; + goto cleanup; } Result = SetupGetStringFieldW( &ContextDevice, @@ -3291,22 +3294,27 @@ &RequiredSize); } if (!Result) - { - HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); - HeapFree(GetProcessHeap(), 0, driverInfo); - return FALSE; - } + goto cleanup; + /* Copy InfFile information */ driverInfo->InfPath = HeapAlloc(GetProcessHeap(), 0, (wcslen(InfFile) + 1) * sizeof(WCHAR)); if (!driverInfo->InfPath) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); - HeapFree(GetProcessHeap(), 0, driverInfo); - return FALSE; + goto cleanup; } RtlCopyMemory(driverInfo->InfPath, InfFile, (wcslen(InfFile) + 1) * sizeof(WCHAR)); + /* Copy MatchingId information */ + driverInfo->MatchingId = HeapAlloc(GetProcessHeap(), 0, (wcslen(MatchingId) + 1) * sizeof(WCHAR)); + if (!driverInfo->MatchingId) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + RtlCopyMemory(driverInfo->MatchingId, MatchingId, (wcslen(MatchingId) + 1) * sizeof(WCHAR)); + + /* Get device description */ Result = FALSE; RequiredSize = 128; /* Initial buffer size */ SetLastError(ERROR_INSUFFICIENT_BUFFER); @@ -3315,7 +3323,7 @@ HeapFree(GetProcessHeap(), 0, DeviceDescription); DeviceDescription = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); if (!DeviceDescription) - return FALSE; + goto cleanup; Result = SetupGetStringFieldW( &ContextDevice, 0, /* Field index */ @@ -3323,14 +3331,9 @@ &RequiredSize); } if (!Result) - { - HeapFree(GetProcessHeap(), 0, driverInfo->InfPath); - HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); - HeapFree(GetProcessHeap(), 0, driverInfo); - HeapFree(GetProcessHeap(), 0, DeviceDescription); - return FALSE; - } + goto cleanup; + /* Get inf install section */ Result = FALSE; RequiredSize = 128; /* Initial buffer size */ SetLastError(ERROR_INSUFFICIENT_BUFFER); @@ -3339,13 +3342,7 @@ HeapFree(GetProcessHeap(), 0, InfInstallSection); InfInstallSection = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); if (!InfInstallSection) - { - HeapFree(GetProcessHeap(), 0, driverInfo->InfPath); - HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); - HeapFree(GetProcessHeap(), 0, driverInfo); - HeapFree(GetProcessHeap(), 0, DeviceDescription); - return FALSE; - } + goto cleanup; Result = SetupGetStringFieldW( &ContextDevice, 1, /* Field index */ @@ -3353,14 +3350,7 @@ &RequiredSize); } if (!Result) - { - HeapFree(GetProcessHeap(), 0, driverInfo->InfPath); - HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); - HeapFree(GetProcessHeap(), 0, driverInfo); - HeapFree(GetProcessHeap(), 0, DeviceDescription); - HeapFree(GetProcessHeap(), 0, InfInstallSection); - return FALSE; - } + goto cleanup; TRACE("Adding driver '%S' [%S/%S] (Rank 0x%lx)\n", DeviceDescription, InfFile, InfInstallSection, Rank); @@ -3399,9 +3389,23 @@ InsertTailList(DriverListHead, &driverInfo->ListEntry); } + ret = TRUE; + +cleanup: + if (!ret) + { + if (driverInfo) + { + HeapFree(GetProcessHeap(), 0, driverInfo->InfPath); + HeapFree(GetProcessHeap(), 0, driverInfo->InfSection); + HeapFree(GetProcessHeap(), 0, driverInfo->MatchingId); + } + HeapFree(GetProcessHeap(), 0, driverInfo); + } HeapFree(GetProcessHeap(), 0, DeviceDescription); HeapFree(GetProcessHeap(), 0, InfInstallSection); - return TRUE; + + return ret; } static BOOL @@ -3414,9 +3418,15 @@ { DWORD RequiredSize; WCHAR guidW[MAX_GUID_STRING_LEN + 1]; + LPWSTR DriverVer = NULL; LPWSTR ProviderName = NULL; + LPWSTR pComma; /* Points into DriverVer */ + LPWSTR pVersion = NULL; /* Points into DriverVer */ + SYSTEMTIME SystemTime; BOOL Result; + BOOL ret = FALSE; /* Final result */ + /* Get class Guid */ if (!SetupGetLineTextW( NULL, /* Context */ hInf, @@ -3424,28 +3434,29 @@ guidW, sizeof(guidW), NULL /* Required size */)) { - return FALSE; + goto cleanup; } - - /* Get Provider name, driver date, and driver version */ - guidW[37] = '\0'; /* Replace the } by a NULL character */ if (UuidFromStringW(&guidW[1], ClassGuid) != RPC_S_OK) { - return FALSE; + SetLastError(ERROR_GEN_FAILURE); + goto cleanup; } + + /* Get provider name */ Result = SetupGetLineTextW( NULL, /* Context */ hInf, L"Version", L"Provider", NULL, 0, &RequiredSize); - if (!Result && GetLastError() == ERROR_INSUFFICIENT_BUFFER) + if (Result) { + /* We know know the needed buffer size */ ProviderName = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); if (!ProviderName) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; + goto cleanup; } Result = SetupGetLineTextW( NULL, /* Context */ @@ -3453,13 +3464,67 @@ ProviderName, RequiredSize, &RequiredSize); } - //FIXME: DriverDate = Version.DriverVer => invalid date = 00/00/00 - RtlZeroMemory(DriverDate, sizeof(FILETIME)); - //FIXME: DriverVersion = Version.DriverVer => invalid = 0 + if (!Result) + goto cleanup; + *pProviderName = ProviderName; + + /* Read the "DriverVer" value */ + Result = SetupGetLineTextW( + NULL, /* Context */ + hInf, L"Version", L"DriverVer", + NULL, 0, + &RequiredSize); + if (Result) + { + /* We know know the needed buffer size */ + DriverVer = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); + if (!DriverVer) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + Result = SetupGetLineTextW( + NULL, /* Context */ + hInf, L"Version", L"DriverVer", + DriverVer, RequiredSize, + &RequiredSize); + } + if (!Result) + goto cleanup; + + /* Get driver date and driver version, by analyzing the "DriverVer" value */ + pComma = wcschr(DriverVer, ','); + if (pComma != NULL) + { + *pComma = UNICODE_NULL; + pVersion = pComma + 1; + } + /* Get driver date version. Invalid date = 00/00/00 */ + memset(DriverDate, 0, sizeof(FILETIME)); + if (wcslen(DriverVer) == 10 + && (DriverVer[2] == '-' || DriverVer[2] == '/') + && (DriverVer[5] == '-' || DriverVer[5] == '/')) + { + memset(&SystemTime, 0, sizeof(SYSTEMTIME)); + DriverVer[2] = DriverVer[5] = UNICODE_NULL; + SystemTime.wMonth = ((DriverVer[0] - '0') * 10) + DriverVer[1] - '0'; + SystemTime.wDay = ((DriverVer[3] - '0') * 10) + DriverVer[4] - '0'; + SystemTime.wYear = ((DriverVer[6] - '0') * 1000) + ((DriverVer[7] - '0') * 100) + ((DriverVer[8] - '0') * 10) + DriverVer[9] - '0'; + SystemTimeToFileTime(&SystemTime, DriverDate); + } + /* Get driver version. Invalid version = 0.0.0.0 */ *DriverVersion = 0; + /* FIXME: use pVersion to fill DriverVersion variable */ - *pProviderName = ProviderName; - return TRUE; + ret = TRUE; + +cleanup: + if (!ret) + HeapFree(GetProcessHeap(), 0, ProviderName); + HeapFree(GetProcessHeap(), 0, DriverVer); + + TRACE("Returning %d\n", ret); + return ret; } /*********************************************************************** @@ -3678,6 +3743,7 @@ filename, ProviderName, ManufacturerName, + NULL, DriverDate, DriverVersion, 0)) { @@ -3731,6 +3797,7 @@ filename, ProviderName, ManufacturerName, + currentId, DriverDate, DriverVersion, DriverRank + (i == 2 ? 0 : 0x1000 + i - 3)); DriverAlreadyAdded = TRUE; @@ -3749,6 +3816,7 @@ filename, ProviderName, ManufacturerName, + currentId, DriverDate, DriverVersion, DriverRank + (i == 2 ? 0x2000 : 0x3000 + i - 3)); DriverAlreadyAdded = TRUE; @@ -4382,16 +4450,24 @@ struct DeviceInfoElement *DevInfo = (struct DeviceInfoElement *)DeviceInfoData->Reserved; SYSTEMTIME DriverDate; WCHAR SectionName[MAX_PATH]; + WCHAR Buffer[32]; DWORD SectionNameLength = 0; BOOL Result = FALSE; INFCONTEXT ContextService; INT Flags; DWORD RequiredSize; - HINF hInf = NULL; + HINF hInf = INVALID_HANDLE_VALUE; LPCWSTR AssociatedService = NULL; LPWSTR pSectionName = NULL; + LPWSTR ClassName = NULL; + GUID ClassGuid; + LPWSTR lpGuidString = NULL, lpFullGuidString = NULL; BOOL RebootRequired = FALSE; HKEY hEnumKey, hKey = INVALID_HANDLE_VALUE; + HKEY hClassKey = INVALID_HANDLE_VALUE; + LPWSTR DriverKey = NULL; /* {GUID}\Index */ + LPWSTR pDeviceInstance; /* Points into DriverKey, on the Index field */ + DWORD Index; /* Index used in the DriverKey name */ LONG rc; HWND hWnd; PVOID callback_context; @@ -4444,19 +4520,130 @@ goto cleanup; pSectionName = &SectionName[wcslen(SectionName)]; + /* Get information from [Version] section */ + ClassName = NULL; + RequiredSize = 0; + if (!SetupDiGetINFClassW(DriverInfo->InfPath, &ClassGuid, ClassName, RequiredSize, &RequiredSize)) + { + if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + goto cleanup; + ClassName = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); + if (!ClassName) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + if (!SetupDiGetINFClassW(DriverInfo->InfPath, &ClassGuid, ClassName, RequiredSize, &RequiredSize)) + goto cleanup; + } + /* Format ClassGuid to a string */ + if (UuidToStringW((UUID*)&ClassGuid, &lpGuidString) != RPC_S_OK) + goto cleanup; + RequiredSize = lstrlenW(lpGuidString); + lpFullGuidString = HeapAlloc(GetProcessHeap(), 0, (RequiredSize + 3) * sizeof(WCHAR)); + if (!lpFullGuidString) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + lpFullGuidString[0] = '{'; + memcpy(&lpFullGuidString[1], lpGuidString, RequiredSize * sizeof(WCHAR)); + lpFullGuidString[RequiredSize + 1] = '}'; + lpFullGuidString[RequiredSize + 2] = '\0'; + /* Create driver key information */ - FIXME("FIXME: Create driver key information\n"); - + /* The driver key is in HKLM\System\CurrentControlSet\Control\Class\{GUID}\{#ID} */ + DriverKey = HeapAlloc(GetProcessHeap(), 0, (wcslen(lpFullGuidString) + 6) * sizeof(WCHAR)); + if (!DriverKey) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + wcscpy(DriverKey, lpFullGuidString); + wcscat(DriverKey, L"\\"); + pDeviceInstance = &DriverKey[wcslen(DriverKey)]; + rc = RegOpenKeyExW(DevInfoSet->HKLM, + ControlClass, + 0, + KEY_CREATE_SUB_KEY, + &hClassKey); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + /* Try all values for Index between 0 and 9999 */ + Index = 0; + while (Index <= 9999) + { + DWORD Disposition; + wsprintf(pDeviceInstance, L"%04lu", Index); + rc = RegCreateKeyEx(hClassKey, + DriverKey, + 0, + NULL, + REG_OPTION_NON_VOLATILE, + KEY_SET_VALUE, + NULL, + &hKey, + &Disposition); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + if (Disposition == REG_CREATED_NEW_KEY) + break; + RegCloseKey(hKey); + hKey = INVALID_HANDLE_VALUE; + Index++; + } + if (Index > 9999) + { + /* Unable to create more than 9999 devices within the same class */ + SetLastError(ERROR_GEN_FAILURE); + goto cleanup; + } + /* Write information to driver key */ - FIXME("FIXME: Write information to driver key\n"); - FIXME("DriverDate : '%u-%u-%u'\n", 0, DriverDate.wMonth, DriverDate.wDay, DriverDate.wYear); - FIXME("DriverDesc : '%S'\n", DriverInfo->Info.Description); - FIXME("DriverVersion : '%u.%u.%u.%u'\n", DriverInfo->Info.DriverVersion & 0xff, (DriverInfo->Info.DriverVersion >> 8) & 0xff, (DriverInfo->Info.DriverVersion >> 16) & 0xff, (DriverInfo->Info.DriverVersion >> 24) & 0xff); - FIXME("InfPath : '%S'\n", DriverInfo->InfPath); - FIXME("InfSection : '%S'\n", DriverInfo->InfSection); /* FIXME: remove extension */ - FIXME("InfSectionExt : '%S'\n", L"???"); /* FIXME */ - FIXME("MatchingDeviceId: '%S'\n", L"???"); /* FIXME */ - FIXME("ProviderName : '%S'\n", DriverInfo->Info.ProviderName); + *pSectionName = UNICODE_NULL; + TRACE("Write information to driver key\n"); + TRACE("DriverDate : '%u-%u-%u'\n", DriverDate.wMonth, DriverDate.wDay, DriverDate.wYear); + TRACE("DriverDesc : '%S'\n", DriverInfo->Info.Description); + TRACE("DriverVersion : '%u.%u.%u.%u'\n", DriverInfo->Info.DriverVersion & 0xff, (DriverInfo->Info.DriverVersion >> 8) & 0xff, (DriverInfo->Info.DriverVersion >> 16) & 0xff, (DriverInfo->Info.DriverVersion >> 24) & 0xff); + TRACE("InfPath : '%S'\n", DriverInfo->InfPath); + TRACE("InfSection : '%S'\n", DriverInfo->InfSection); + TRACE("InfSectionExt : '%S'\n", &SectionName[wcslen(DriverInfo->InfSection)]); /* FIXME */ + TRACE("MatchingDeviceId: '%S'\n", DriverInfo->MatchingId); + TRACE("ProviderName : '%S'\n", DriverInfo->Info.ProviderName); + swprintf(Buffer, L"%u-%u-%u", DriverDate.wMonth, DriverDate.wDay, DriverDate.wYear); + rc = RegSetValueEx(hKey, L"DriverDate", 0, REG_SZ, (const BYTE *)Buffer, (wcslen(Buffer) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"DriverDateData", 0, REG_BINARY, (const BYTE *)&DriverInfo->Info.DriverDate, sizeof(FILETIME)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"DriverDesc", 0, REG_SZ, (const BYTE *)DriverInfo->Info.Description, (wcslen(DriverInfo->Info.Description) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + { + swprintf(Buffer, L"%u.%u.%u.%u", DriverInfo->Info.DriverVersion & 0xff, (DriverInfo->Info.DriverVersion >> 8) & 0xff, (DriverInfo->Info.DriverVersion >> 16) & 0xff, (DriverInfo->Info.DriverVersion >> 24) & 0xff); + rc = RegSetValueEx(hKey, L"DriverVersion", 0, REG_SZ, (const BYTE *)Buffer, (wcslen(Buffer) + 1) * sizeof(WCHAR)); + } + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"InfPath", 0, REG_SZ, (const BYTE *)DriverInfo->InfPath, (wcslen(DriverInfo->InfPath) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"InfSection", 0, REG_SZ, (const BYTE *)DriverInfo->InfSection, (wcslen(DriverInfo->InfSection) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"InfSectionExt", 0, REG_SZ, (const BYTE *)&SectionName[wcslen(DriverInfo->InfSection)], (wcslen(SectionName) - wcslen(DriverInfo->InfSection) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"MatchingDeviceId", 0, REG_SZ, (const BYTE *)DriverInfo->MatchingId, (wcslen(DriverInfo->MatchingId) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"ProviderName", 0, REG_SZ, (const BYTE *)DriverInfo->Info.ProviderName, (wcslen(DriverInfo->Info.ProviderName) + 1) * sizeof(WCHAR)); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + RegCloseKey(hKey); + hKey = INVALID_HANDLE_VALUE; /* Install .Services section */ wcscpy(pSectionName, L".Services"); @@ -4579,18 +4766,23 @@ goto cleanup; /* Write information to enum key */ - FIXME("FIXME: Write information to enum key\n"); - FIXME("ParentIdPrefix : '%S'\n", L"0000"); /* FIXME */ + TRACE("Write information to enum key\n"); TRACE("Service : '%S'\n", AssociatedService); - FIXME("Class : '%S'\n", L"???"); /* FIXME: SetupDiGetINFClass */ - FIXME("ClassGUID : '%S'\n", L"???"); /* FIXME: SetupDiGetINFClass */ + TRACE("Class : '%S'\n", ClassName); + TRACE("ClassGUID : '%S'\n", lpFullGuidString); TRACE("DeviceDesc : '%S'\n", DriverInfo->Info.Description); - FIXME("Driver : '%S'\n", L"???"); /* FIXME: autogenerated key */ + TRACE("Driver : '%S'\n", DriverKey); TRACE("Mfg : '%S'\n", DriverInfo->Info.MfgName); rc = RegSetValueEx(hKey, L"Service", 0, REG_SZ, (const BYTE *)AssociatedService, (wcslen(AssociatedService) + 1) * sizeof(WCHAR)); if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"Class", 0, REG_SZ, (const BYTE *)ClassName, (wcslen(ClassName) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"ClassGUID", 0, REG_SZ, (const BYTE *)lpFullGuidString, (wcslen(lpFullGuidString) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) rc = RegSetValueEx(hKey, L"DeviceDesc", 0, REG_SZ, (const BYTE *)DriverInfo->Info.Description, (wcslen(DriverInfo->Info.Description) + 1) * sizeof(WCHAR)); if (rc == ERROR_SUCCESS) + rc = RegSetValueEx(hKey, L"Driver", 0, REG_SZ, (const BYTE *)DriverKey, (wcslen(DriverKey) + 1) * sizeof(WCHAR)); + if (rc == ERROR_SUCCESS) rc = RegSetValueEx(hKey, L"Mfg", 0, REG_SZ, (const BYTE *)DriverInfo->Info.MfgName, (wcslen(DriverInfo->Info.MfgName) + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { @@ -4609,10 +4801,17 @@ cleanup: /* End of installation */ + if (hClassKey != INVALID_HANDLE_VALUE) + RegCloseKey(hClassKey); if (hKey != INVALID_HANDLE_VALUE) RegCloseKey(hKey); + if (lpGuidString) + RpcStringFreeW(&lpGuidString); HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - if (hInf != NULL && hInf != INVALID_HANDLE_VALUE) + HeapFree(GetProcessHeap(), 0, DriverKey); + HeapFree(GetProcessHeap(), 0, ClassName); + HeapFree(GetProcessHeap(), 0, lpFullGuidString); + if (hInf != INVALID_HANDLE_VALUE) SetupCloseInfFile(hInf); TRACE("Returning %d\n", ret);
19 years, 2 months
1
0
0
0
[hpoussin] 18303: Implement SetupDiGetINFClassW
by hpoussin@svn.reactos.com
Implement SetupDiGetINFClassW Modified: trunk/reactos/lib/setupapi/parser.c Modified: trunk/reactos/lib/setupapi/setupapi.spec _____ Modified: trunk/reactos/lib/setupapi/parser.c --- trunk/reactos/lib/setupapi/parser.c 2005-10-06 21:39:18 UTC (rev 18302) +++ trunk/reactos/lib/setupapi/parser.c 2005-10-06 22:36:14 UTC (rev 18303) @@ -2,6 +2,7 @@ * INF file parsing * * Copyright 2002 Alexandre Julliard for CodeWeavers + * 2005 HervÚ Poussineau (hpoussin(a)reactos.org) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -35,6 +36,7 @@ #include "winreg.h" #include "winternl.h" #include "winerror.h" +#include "cfgmgr32.h" #include "setupapi.h" #include "setupapi_private.h" @@ -2071,3 +2073,83 @@ HeapFree(GetProcessHeap(), 0, pFileSpecification); return ret; } + +/********************************************************************** * + * SetupDiGetINFClassW (SETUPAPI.@) + */ +BOOL WINAPI +SetupDiGetINFClassW( + IN PCWSTR InfName, + OUT LPGUID ClassGuid, + OUT PWSTR ClassName, + IN DWORD ClassNameSize, + OUT PDWORD RequiredSize OPTIONAL) +{ + HINF hInf = INVALID_HANDLE_VALUE; + DWORD requiredSize; + WCHAR guidW[MAX_GUID_STRING_LEN + 1]; + BOOL ret = FALSE; + + TRACE("%S %p %p %ld %p\n", InfName, ClassGuid, + ClassName, ClassNameSize, RequiredSize); + + /* Open .inf file */ + hInf = SetupOpenInfFileW(InfName, NULL, INF_STYLE_WIN4, NULL); + if (hInf == INVALID_HANDLE_VALUE) + goto cleanup; + + /* Read class Guid */ + if (!SetupGetLineTextW(NULL, hInf, L"Version", L"ClassGUID", guidW, sizeof(guidW), NULL)) + goto cleanup; + guidW[37] = '\0'; /* Replace the } by a NULL character */ + if (UuidFromStringW(&guidW[1], ClassGuid) != RPC_S_OK) + goto cleanup; + + /* Read class name */ + ret = SetupGetLineTextW(NULL, hInf, L"Version", L"Class", ClassName, ClassNameSize, &requiredSize); + if (ret && ClassName == NULL && ClassNameSize == 0) + { + if (RequiredSize) + *RequiredSize = requiredSize; + SetLastError(ERROR_INSUFFICIENT_BUFFER); + ret = FALSE; + goto cleanup; + } + if (!ret) + { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + if (RequiredSize) + *RequiredSize = requiredSize; + goto cleanup; + } + else if (!SetupDiClassNameFromGuidW(ClassGuid, ClassName, ClassNameSize, &requiredSize)) + { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + if (RequiredSize) + *RequiredSize = requiredSize; + goto cleanup; + } + /* Return a NULL class name */ + if (RequiredSize) + *RequiredSize = 1; + if (ClassNameSize < 1) + { + SetLastError(ERROR_INSUFFICIENT_BUFFER); + goto cleanup; + } + memcpy(ClassGuid, &GUID_NULL, sizeof(GUID)); + *ClassName = UNICODE_NULL; + } + } + + ret = TRUE; + +cleanup: + if (hInf != INVALID_HANDLE_VALUE) + SetupCloseInfFile(hInf); + + TRACE("Returning %d\n", ret); + return ret; +} _____ Modified: trunk/reactos/lib/setupapi/setupapi.spec --- trunk/reactos/lib/setupapi/setupapi.spec 2005-10-06 21:39:18 UTC (rev 18302) +++ trunk/reactos/lib/setupapi/setupapi.spec 2005-10-06 22:36:14 UTC (rev 18303) @@ -342,7 +342,7 @@ @ stub SetupDiGetHwProfileListExA @ stub SetupDiGetHwProfileListExW @ stub SetupDiGetINFClassA -@ stub SetupDiGetINFClassW +@ stdcall SetupDiGetINFClassW(wstr ptr ptr long ptr) @ stub SetupDiGetSelectedDevice @ stub SetupDiGetSelectedDriverA @ stdcall SetupDiGetSelectedDriverW(ptr ptr ptr)
19 years, 2 months
1
0
0
0
[weiden] 18302: fixed warnings when compiled with -Wmissing-declarations
by weiden@svn.reactos.com
fixed warnings when compiled with -Wmissing-declarations Modified: trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c Modified: trunk/reactos/drivers/bus/acpi/executer/ammutex.c Modified: trunk/reactos/drivers/bus/acpi/executer/amresop.c Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c Modified: trunk/reactos/drivers/bus/isapnp/isapnp.h Modified: trunk/reactos/drivers/bus/pci/pci.c Modified: trunk/reactos/drivers/bus/pci/pci.h Modified: trunk/reactos/drivers/bus/pci/pdo.c Modified: trunk/reactos/drivers/bus/serenum/detect.c Modified: trunk/reactos/drivers/bus/serenum/fdo.c Modified: trunk/reactos/drivers/bus/serenum/misc.c Modified: trunk/reactos/drivers/bus/serenum/pdo.c Modified: trunk/reactos/drivers/bus/serenum/serenum.c Modified: trunk/reactos/drivers/bus/serenum/serenum.h Modified: trunk/reactos/drivers/dd/beep/beep.c Modified: trunk/reactos/drivers/dd/blue/blue.c Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c Modified: trunk/reactos/drivers/dd/bootvid/bootvid.h Modified: trunk/reactos/drivers/dd/debugout/debugout.c Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c Modified: trunk/reactos/drivers/dd/mpu401/mpu401.h Modified: trunk/reactos/drivers/dd/mpu401/settings.c Modified: trunk/reactos/drivers/dd/null/null.c Modified: trunk/reactos/drivers/dd/null/null.h Modified: trunk/reactos/drivers/dd/parallel/parallel.c Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.c Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.h Modified: trunk/reactos/drivers/dd/serial/devctrl.c Modified: trunk/reactos/drivers/dd/serial/misc.c Modified: trunk/reactos/drivers/dd/serial/serial.c Modified: trunk/reactos/drivers/dd/serial/serial.h Modified: trunk/reactos/drivers/dd/sndblst/dma.c Modified: trunk/reactos/drivers/dd/sndblst/irq.c Modified: trunk/reactos/drivers/dd/sndblst/settings.c Modified: trunk/reactos/drivers/dd/sndblst/sndblst.c Modified: trunk/reactos/drivers/dd/sound/sb16.c Modified: trunk/reactos/drivers/dd/sound/sb_waveout.c Modified: trunk/reactos/drivers/dd/sound/sound.c Modified: trunk/reactos/drivers/dd/sound/wave.c Modified: trunk/reactos/drivers/fs/cdfs/cdfs.h Modified: trunk/reactos/drivers/fs/fs_rec/fs_rec.c Modified: trunk/reactos/drivers/fs/fs_rec/fs_rec.h Modified: trunk/reactos/drivers/fs/ms/msfs.h Modified: trunk/reactos/drivers/fs/mup/mup.h Modified: trunk/reactos/drivers/fs/np/npfs.h Modified: trunk/reactos/drivers/fs/ntfs/attrib.c Modified: trunk/reactos/drivers/fs/ntfs/fcb.c Modified: trunk/reactos/drivers/fs/ntfs/mft.c Modified: trunk/reactos/drivers/fs/ntfs/ntfs.h Modified: trunk/reactos/drivers/fs/vfat/create.c Modified: trunk/reactos/drivers/fs/vfat/dir.c Modified: trunk/reactos/drivers/fs/vfat/direntry.c Modified: trunk/reactos/drivers/fs/vfat/dirwr.c Modified: trunk/reactos/drivers/fs/vfat/fastio.c Modified: trunk/reactos/drivers/fs/vfat/fat.c Modified: trunk/reactos/drivers/fs/vfat/fcb.c Modified: trunk/reactos/drivers/fs/vfat/finfo.c Modified: trunk/reactos/drivers/fs/vfat/flush.c Modified: trunk/reactos/drivers/fs/vfat/misc.c Modified: trunk/reactos/drivers/fs/vfat/rw.c Modified: trunk/reactos/drivers/fs/vfat/shutdown.c Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.h Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c Modified: trunk/reactos/drivers/input/i8042prt/mouse.c Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c Modified: trunk/reactos/drivers/input/mouclass/mouclass.c Modified: trunk/reactos/drivers/input/sermouse/sermouse.c Modified: trunk/reactos/drivers/lib/bzip2/dllmain.c Modified: trunk/reactos/drivers/net/afd/afd/connect.c Modified: trunk/reactos/drivers/net/afd/afd/listen.c Modified: trunk/reactos/drivers/net/afd/afd/main.c Modified: trunk/reactos/drivers/net/afd/afd/read.c Modified: trunk/reactos/drivers/net/afd/afd/select.c Modified: trunk/reactos/drivers/net/afd/afd/tdi.c Modified: trunk/reactos/drivers/net/afd/afd/tdiconn.c Modified: trunk/reactos/drivers/net/afd/afd/write.c Modified: trunk/reactos/drivers/net/afd/include/tdi_proto.h Modified: trunk/reactos/drivers/net/dd/ne2000/ne2000/8390.c Modified: trunk/reactos/drivers/net/dd/ne2000/ne2000/main.c Modified: trunk/reactos/drivers/net/dd/pcnet/pcnet.c Modified: trunk/reactos/lib/pseh/framebased.c Modified: trunk/reactos/ntoskrnl/ntoskrnl.def Modified: trunk/reactos/w32api/include/ddk/ntifs.h _____ Modified: trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c --- trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/acpi/dispatcher/dsutils.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -239,7 +239,7 @@ ACPI_OPERAND_OBJECT *obj_desc; ACPI_PARSE_OBJECT *parent_op; u16 opcode; - u32 flags; + u32 flags = 0; OPERATING_MODE interpreter_mode; _____ Modified: trunk/reactos/drivers/bus/acpi/executer/ammutex.c --- trunk/reactos/drivers/bus/acpi/executer/ammutex.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/acpi/executer/ammutex.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -74,7 +74,7 @@ * ************************************************************************ ******/ -void +static void acpi_aml_link_mutex ( ACPI_OPERAND_OBJECT *obj_desc, ACPI_OPERAND_OBJECT *list_head) _____ Modified: trunk/reactos/drivers/bus/acpi/executer/amresop.c --- trunk/reactos/drivers/bus/acpi/executer/amresop.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/acpi/executer/amresop.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -53,7 +53,7 @@ * ************************************************************************ ******/ -ACPI_STATUS +static ACPI_STATUS acpi_aml_check_object_type ( ACPI_OBJECT_TYPE type_needed, ACPI_OBJECT_TYPE this_type, _____ Modified: trunk/reactos/drivers/bus/isapnp/isapnp.c --- trunk/reactos/drivers/bus/isapnp/isapnp.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/isapnp/isapnp.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -108,13 +108,14 @@ return READ_PORT_UCHAR(IsaPnPReadPort); } -UCHAR ReadUchar(UCHAR Index) +static UCHAR ReadUchar(UCHAR Index) { WriteAddress(Index); return ReadData(); } -USHORT ReadUshort(UCHAR Index) +#if 0 +static USHORT ReadUshort(UCHAR Index) { USHORT Value; @@ -123,7 +124,7 @@ return Value; } -ULONG ReadUlong(UCHAR Index) +static ULONG ReadUlong(UCHAR Index) { ULONG Value; @@ -133,26 +134,29 @@ Value = (Value << 8) + ReadUchar(Index + 3); return Value; } +#endif -VOID WriteUchar(UCHAR Index, UCHAR Value) +static VOID WriteUchar(UCHAR Index, UCHAR Value) { WriteAddress(Index); WriteData(Value); } -VOID WriteUshort(UCHAR Index, USHORT Value) +#if 0 +static VOID WriteUshort(UCHAR Index, USHORT Value) { WriteUchar(Index, Value >> 8); WriteUchar(Index + 1, Value); } -VOID WriteUlong(UCHAR Index, ULONG Value) +static VOID WriteUlong(UCHAR Index, ULONG Value) { WriteUchar(Index, Value >> 24); WriteUchar(Index + 1, Value >> 16); WriteUchar(Index + 2, Value >> 8); WriteUchar(Index + 3, Value); } +#endif static inline VOID SetReadDataPort(ULONG Port) { @@ -187,29 +191,31 @@ WriteUchar(0x02, 0x02); } -VOID SendWake(UCHAR csn) +static VOID SendWake(UCHAR csn) { WriteUchar(ISAPNP_CARD_WAKECSN, csn); } -VOID SelectLogicalDevice(UCHAR LogicalDevice) +#if 0 +static VOID SelectLogicalDevice(UCHAR LogicalDevice) { WriteUchar(ISAPNP_CARD_LOG_DEVICE_NUM, LogicalDevice); } -VOID ActivateLogicalDevice(UCHAR LogicalDevice) +static VOID ActivateLogicalDevice(UCHAR LogicalDevice) { SelectLogicalDevice(LogicalDevice); WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x1); KeStallExecutionProcessor(250); } -VOID DeactivateLogicalDevice(UCHAR LogicalDevice) +static VOID DeactivateLogicalDevice(UCHAR LogicalDevice) { SelectLogicalDevice(LogicalDevice); WriteUchar(ISAPNP_CONTROL_ACTIVATE, 0x0); KeStallExecutionProcessor(500); } +#endif #define READ_DATA_PORT_STEP 32 /* Minimum is 4 */ @@ -357,7 +363,7 @@ } -VOID Peek(PUCHAR Data, ULONG Count) +static VOID Peek(PUCHAR Data, ULONG Count) { ULONG i, j; UCHAR d = 0; @@ -1414,7 +1420,7 @@ } -NTSTATUS +static NTSTATUS ISAPNPQueryBusRelations( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -1482,7 +1488,7 @@ } -NTSTATUS +static NTSTATUS ISAPNPQueryDeviceRelations( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -1511,7 +1517,7 @@ } -NTSTATUS +static NTSTATUS ISAPNPStartDevice( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -1550,7 +1556,7 @@ } -NTSTATUS +static NTSTATUS ISAPNPStopDevice( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, @@ -1571,7 +1577,7 @@ } -NTSTATUS +static NTSTATUS STDCALL ISAPNPDispatchOpenClose( IN PDEVICE_OBJECT DeviceObject, @@ -1587,7 +1593,7 @@ } -NTSTATUS +static NTSTATUS STDCALL ISAPNPDispatchReadWrite( IN PDEVICE_OBJECT PhysicalDeviceObject, @@ -1603,7 +1609,7 @@ } -NTSTATUS +static NTSTATUS STDCALL ISAPNPDispatchDeviceControl( IN PDEVICE_OBJECT DeviceObject, @@ -1635,7 +1641,7 @@ } -NTSTATUS +static NTSTATUS STDCALL ISAPNPControl( IN PDEVICE_OBJECT DeviceObject, @@ -1677,7 +1683,7 @@ } -NTSTATUS +static NTSTATUS STDCALL ISAPNPAddDevice( IN PDRIVER_OBJECT DriverObject, _____ Modified: trunk/reactos/drivers/bus/isapnp/isapnp.h --- trunk/reactos/drivers/bus/isapnp/isapnp.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/isapnp/isapnp.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -324,6 +324,12 @@ ISAPNP_DEVICE_STATE State; } ISAPNP_DEVICE_EXTENSION, *PISAPNP_DEVICE_EXTENSION; +NTSTATUS +STDCALL +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath); + #ifdef __cplusplus } #endif _____ Modified: trunk/reactos/drivers/bus/pci/pci.c --- trunk/reactos/drivers/bus/pci/pci.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/pci/pci.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -9,6 +9,7 @@ */ #include <ddk/ntddk.h> +#include <ddk/ntifs.h> #include <stdio.h> #include "pcidef.h" @@ -32,7 +33,7 @@ /*** PRIVATE *****************************************************************/ -NTSTATUS +static NTSTATUS STDCALL PciDispatchDeviceControl( IN PDEVICE_OBJECT DeviceObject, @@ -67,7 +68,7 @@ } -NTSTATUS +static NTSTATUS STDCALL PciPnpControl( IN PDEVICE_OBJECT DeviceObject, @@ -98,7 +99,7 @@ } -NTSTATUS +static NTSTATUS STDCALL PciPowerControl( IN PDEVICE_OBJECT DeviceObject, @@ -127,7 +128,7 @@ } -NTSTATUS +static NTSTATUS STDCALL PciAddDevice( IN PDRIVER_OBJECT DriverObject, @@ -185,65 +186,6 @@ BOOLEAN -PciCreateUnicodeString( - PUNICODE_STRING Destination, - PWSTR Source, - POOL_TYPE PoolType) -{ - ULONG Length; - - if (!Source) - { - RtlInitUnicodeString(Destination, NULL); - return TRUE; - } - - Length = (wcslen(Source) + 1) * sizeof(WCHAR); - - Destination->Buffer = ExAllocatePool(PoolType, Length); - - if (Destination->Buffer == NULL) - { - return FALSE; - } - - RtlCopyMemory(Destination->Buffer, Source, Length); - - Destination->MaximumLength = Length; - - Destination->Length = Length - sizeof(WCHAR); - - return TRUE; -} - - -NTSTATUS -PciDuplicateUnicodeString( - PUNICODE_STRING Destination, - PUNICODE_STRING Source, - POOL_TYPE PoolType) -{ - if (Source == NULL) - { - RtlInitUnicodeString(Destination, NULL); - return STATUS_SUCCESS; - } - - Destination->Buffer = ExAllocatePool(PoolType, Source->MaximumLength); - if (Destination->Buffer == NULL) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - - Destination->MaximumLength = Source->MaximumLength; - Destination->Length = Source->Length; - RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength); - - return STATUS_SUCCESS; -} - - -BOOLEAN PciCreateDeviceIDString(PUNICODE_STRING DeviceID, PPCI_DEVICE Device) { @@ -257,7 +199,7 @@ Device->PciConfig.u.type0.SubVendorID, Device->PciConfig.RevisionID); - if (!PciCreateUnicodeString(DeviceID, Buffer, PagedPool)) + if (!RtlCreateUnicodeString(DeviceID, Buffer)) { return FALSE; } @@ -311,12 +253,12 @@ { //DPRINT("xbox ohci controler found at bus 0x%lX, dev num %d, func num %d\n", Device->BusNumber, Device->SlotNumber.u.bits.DeviceNumber, Device->SlotNumber.u.bits.FunctionNumber); if (Device->SlotNumber.u.bits.DeviceNumber == 2) - return PciCreateUnicodeString(InstanceID, L"0000", PagedPool); + return RtlCreateUnicodeString(InstanceID, L"0000"); else - return PciCreateUnicodeString(InstanceID, L"0001", PagedPool); + return RtlCreateUnicodeString(InstanceID, L"0001"); } else - return PciCreateUnicodeString(InstanceID, L"0000", PagedPool); + return RtlCreateUnicodeString(InstanceID, L"0000"); } _____ Modified: trunk/reactos/drivers/bus/pci/pci.h --- trunk/reactos/drivers/bus/pci/pci.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/pci/pci.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -112,12 +112,6 @@ PWSTR Source, POOL_TYPE PoolType); -NTSTATUS -PciDuplicateUnicodeString( - PUNICODE_STRING Destination, - PUNICODE_STRING Source, - POOL_TYPE PoolType); - BOOLEAN PciCreateDeviceIDString( PUNICODE_STRING DeviceID, @@ -160,4 +154,10 @@ PDEVICE_OBJECT DeviceObject, PIRP Irp); +NTSTATUS +STDCALL +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath); + #endif /* __PCI_H */ _____ Modified: trunk/reactos/drivers/bus/pci/pdo.c --- trunk/reactos/drivers/bus/pci/pdo.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/pci/pdo.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -9,6 +9,7 @@ */ #include <ddk/ntddk.h> +#include <ddk/ntifs.h> #include <initguid.h> #include <ddk/wdmguid.h> #include "pcidef.h" @@ -77,10 +78,10 @@ switch (IrpSp->Parameters.QueryId.IdType) { case BusQueryDeviceID: - Status = PciDuplicateUnicodeString( - &String, + Status = RtlDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &DeviceExtension->DeviceID, - PagedPool); + &String); DPRINT("DeviceID: %S\n", String.Buffer); @@ -88,28 +89,28 @@ break; case BusQueryHardwareIDs: - Status = PciDuplicateUnicodeString( - &String, + Status = RtlDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &DeviceExtension->HardwareIDs, - PagedPool); + &String); Irp->IoStatus.Information = (ULONG_PTR)String.Buffer; break; case BusQueryCompatibleIDs: - Status = PciDuplicateUnicodeString( - &String, + Status = RtlDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &DeviceExtension->CompatibleIDs, - PagedPool); + &String); Irp->IoStatus.Information = (ULONG_PTR)String.Buffer; break; case BusQueryInstanceID: - Status = PciDuplicateUnicodeString( - &String, + Status = RtlDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, &DeviceExtension->InstanceID, - PagedPool); + &String); DPRINT("InstanceID: %S\n", String.Buffer); _____ Modified: trunk/reactos/drivers/bus/serenum/detect.c --- trunk/reactos/drivers/bus/serenum/detect.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/detect.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -167,15 +167,15 @@ FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION)); PdoDeviceExtension->Common.IsFDO = FALSE; - Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceDescription, DeviceDescription, PagedPool); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceDescription, &PdoDeviceExtension->DeviceDescription); if (!NT_SUCCESS(Status)) goto ByeBye; - Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->DeviceId, DeviceId, PagedPool); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, DeviceId, &PdoDeviceExtension->DeviceId); if (!NT_SUCCESS(Status)) goto ByeBye; - Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->InstanceId, InstanceId, PagedPool); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, InstanceId, &PdoDeviceExtension->InstanceId); if (!NT_SUCCESS(Status)) goto ByeBye; - Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->HardwareIds, HardwareIds, PagedPool); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, HardwareIds, &PdoDeviceExtension->HardwareIds); if (!NT_SUCCESS(Status)) goto ByeBye; - Status = SerenumDuplicateUnicodeString(&PdoDeviceExtension->CompatibleIds, CompatibleIds, PagedPool); + Status = RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, CompatibleIds, &PdoDeviceExtension->CompatibleIds); if (!NT_SUCCESS(Status)) goto ByeBye; /* Device attached to serial port (Pdo) may delegate work to _____ Modified: trunk/reactos/drivers/bus/serenum/fdo.c --- trunk/reactos/drivers/bus/serenum/fdo.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/fdo.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -68,7 +68,7 @@ return STATUS_SUCCESS; } -NTSTATUS STDCALL +static NTSTATUS STDCALL SerenumFdoStartDevice( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) @@ -93,7 +93,7 @@ return STATUS_SUCCESS; } -NTSTATUS +static NTSTATUS SerenumFdoQueryBusRelations( IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_RELATIONS* pDeviceRelations) _____ Modified: trunk/reactos/drivers/bus/serenum/misc.c --- trunk/reactos/drivers/bus/serenum/misc.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/misc.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -11,33 +11,6 @@ #include "serenum.h" #include <stdarg.h> -NTSTATUS -SerenumDuplicateUnicodeString( - OUT PUNICODE_STRING Destination, - IN PUNICODE_STRING Source, - IN POOL_TYPE PoolType) -{ - ASSERT(Destination); - - if (Source == NULL) - { - RtlInitUnicodeString(Destination, NULL); - return STATUS_SUCCESS; - } - - Destination->Buffer = ExAllocatePoolWithTag(PoolType, Source->MaximumLength, SERENUM_TAG); - if (Destination->Buffer == NULL) - { - return STATUS_INSUFFICIENT_RESOURCES; - } - - Destination->MaximumLength = Source->MaximumLength; - Destination->Length = Source->Length; - RtlCopyMemory(Destination->Buffer, Source->Buffer, Source->MaximumLength); - - return STATUS_SUCCESS; -} - /* I really want PCSZ strings as last arguments because * PnP ids are ANSI-encoded in PnP device string * identification */ @@ -113,7 +86,7 @@ return Status; } -NTSTATUS STDCALL +static NTSTATUS STDCALL ForwardIrpAndWaitCompletion( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, _____ Modified: trunk/reactos/drivers/bus/serenum/pdo.c --- trunk/reactos/drivers/bus/serenum/pdo.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/pdo.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -69,10 +69,10 @@ return STATUS_NOT_SUPPORTED; } - Status = SerenumDuplicateUnicodeString( - &String, + Status = RtlDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, SourceString, - PagedPool); + &String); *Information = (ULONG_PTR)String.Buffer; return Status; } _____ Modified: trunk/reactos/drivers/bus/serenum/serenum.c --- trunk/reactos/drivers/bus/serenum/serenum.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/serenum.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -11,7 +11,7 @@ #define INITGUID #include "serenum.h" -NTSTATUS STDCALL +static NTSTATUS STDCALL SerenumPnp( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) @@ -22,13 +22,13 @@ return SerenumPdoPnp(DeviceObject, Irp); } -VOID STDCALL +static VOID STDCALL DriverUnload(IN PDRIVER_OBJECT DriverObject) { // nothing to do here yet } -NTSTATUS STDCALL +static NTSTATUS STDCALL IrpStub( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) _____ Modified: trunk/reactos/drivers/bus/serenum/serenum.h --- trunk/reactos/drivers/bus/serenum/serenum.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/bus/serenum/serenum.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -8,6 +8,7 @@ */ #include <ntddk.h> +#include <ntifs.h> #include <ntddser.h> #include <stdio.h> @@ -107,12 +108,6 @@ /************************************ misc.c */ NTSTATUS -SerenumDuplicateUnicodeString( - OUT PUNICODE_STRING Destination, - IN PUNICODE_STRING Source, - IN POOL_TYPE PoolType); - -NTSTATUS SerenumInitMultiSzString( OUT PUNICODE_STRING Destination, ... /* list of PCSZ */); @@ -143,3 +138,10 @@ SerenumPdoPnp( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); + +/************************************ serenum.c */ + +NTSTATUS STDCALL +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegPath); _____ Modified: trunk/reactos/drivers/dd/beep/beep.c --- trunk/reactos/drivers/dd/beep/beep.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/beep/beep.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -18,6 +18,10 @@ #define NDEBUG #include <debug.h> +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath); + /* TYEPEDEFS ***************************************************************/ typedef struct _BEEP_DEVICE_EXTENSION _____ Modified: trunk/reactos/drivers/dd/blue/blue.c --- trunk/reactos/drivers/dd/blue/blue.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/blue/blue.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -67,6 +67,9 @@ /* FUNCTIONS **************************************************************/ NTSTATUS STDCALL +DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); + +static NTSTATUS STDCALL ScrCreate(PDEVICE_OBJECT DeviceObject, PIRP Irp) { @@ -156,7 +159,7 @@ } -NTSTATUS STDCALL +static NTSTATUS STDCALL ScrWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { @@ -298,7 +301,7 @@ } -NTSTATUS STDCALL +static NTSTATUS STDCALL ScrIoControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { @@ -626,7 +629,7 @@ } -NTSTATUS STDCALL +static NTSTATUS STDCALL ScrDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) { _____ Modified: trunk/reactos/drivers/dd/bootvid/bootvid.c --- trunk/reactos/drivers/dd/bootvid/bootvid.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/bootvid/bootvid.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -221,7 +221,7 @@ } -BOOL STDCALL +static BOOL STDCALL VidResetDisplay(VOID) { /* @@ -233,7 +233,7 @@ } -VOID STDCALL +static VOID STDCALL VidCleanUp(VOID) { InbvUnmapVideoMemory(); @@ -580,7 +580,7 @@ } -NTSTATUS STDCALL +static NTSTATUS STDCALL VidDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION IrpSp; _____ Modified: trunk/reactos/drivers/dd/bootvid/bootvid.h --- trunk/reactos/drivers/dd/bootvid/bootvid.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/bootvid/bootvid.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -121,4 +121,7 @@ extern VOID InbvPutPixels(int x, int y, unsigned long c); +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); + #endif /* _BOOTVID_H */ _____ Modified: trunk/reactos/drivers/dd/debugout/debugout.c --- trunk/reactos/drivers/dd/debugout/debugout.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/debugout/debugout.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -24,8 +24,11 @@ /* INCLUDES */ #include <ddk/ntddk.h> +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); + /* FUNCTIONS */ -NTSTATUS STDCALL +static NTSTATUS STDCALL DebugOutDispatch(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp); @@ -82,7 +85,7 @@ return nErrCode; } -VOID STDCALL +static VOID STDCALL DebugOutUnload(PDRIVER_OBJECT DriverObject) { } _____ Modified: trunk/reactos/drivers/dd/mpu401/mpu401.c --- trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/mpu401/mpu401.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -28,7 +28,7 @@ /* FUNCTIONS ***************************************************************/ -NTSTATUS InitDevice( +static NTSTATUS InitDevice( IN PUNICODE_STRING RegistryPath, IN PVOID Context) { _____ Modified: trunk/reactos/drivers/dd/mpu401/mpu401.h --- trunk/reactos/drivers/dd/mpu401/mpu401.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/mpu401/mpu401.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -148,4 +148,8 @@ IN PVOID Context, IN PVOID EntryContext); +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, + PUNICODE_STRING RegistryPath); + #endif _____ Modified: trunk/reactos/drivers/dd/mpu401/settings.c --- trunk/reactos/drivers/dd/mpu401/settings.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/mpu401/settings.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -17,8 +17,8 @@ #include <debug.h> #include "sbdebug.h" // our own debug helper - -NTSTATUS +#if 0 +static NTSTATUS OpenDevicesKey( IN PWSTR RegistryPath, OUT PHANDLE Key) @@ -67,9 +67,9 @@ return s; } +#endif - NTSTATUS STDCALL EnumDeviceKeys( IN PUNICODE_STRING RegistryPath, IN PWSTR SubKey, @@ -275,8 +275,8 @@ } - -NTSTATUS SaveSettings( +#if 0 +static NTSTATUS SaveSettings( IN PWSTR RegistryPath, IN ULONG Port, IN ULONG IRQ, @@ -303,3 +303,5 @@ return STATUS_SUCCESS; } +#endif + _____ Modified: trunk/reactos/drivers/dd/null/null.c --- trunk/reactos/drivers/dd/null/null.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/null/null.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -23,7 +23,7 @@ static const NULL_EXTENSION nxZero = NullZeroStream; /* FUNCTIONS */ -NTSTATUS STDCALL +static NTSTATUS STDCALL NullDispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION piosStack = IoGetCurrentIrpStackLocation(Irp); @@ -141,7 +141,7 @@ return (nErrCode); } -VOID STDCALL +static VOID STDCALL NullUnload(PDRIVER_OBJECT DriverObject) { } _____ Modified: trunk/reactos/drivers/dd/null/null.h --- trunk/reactos/drivers/dd/null/null.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/null/null.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -16,4 +16,7 @@ #define NULL_DEVICE_TYPE(__DEVICE__) (*((PNULL_EXTENSION)((__DEVICE__)->DeviceExtension))) +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); + /* EOF */ _____ Modified: trunk/reactos/drivers/dd/parallel/parallel.c --- trunk/reactos/drivers/dd/parallel/parallel.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/parallel/parallel.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -24,6 +24,9 @@ #define LP_S (READ_PORT_UCHAR((PUCHAR)(LP_B+1))) #define LP_C (LP_B+2) +NTSTATUS STDCALL +DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath); + static void Parallel_Reset(void) /* * FUNCTION: Resets the device attached to the parallel port @@ -68,7 +71,7 @@ WRITE_PORT_UCHAR((PUCHAR)LP_C, LP_PSELECP | LP_PINITP); } -NTSTATUS STDCALL +static NTSTATUS STDCALL Dispatch(PDEVICE_OBJECT DeviceObject, PIRP Irp) /* * FUNCTION: Handles user mode requests _____ Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.c --- trunk/reactos/drivers/dd/ramdrv/ramdrv.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/ramdrv/ramdrv.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -4,7 +4,7 @@ #include <debug.h> #include "../../lib/bzip2/bzlib.h" -NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject, +static NTSTATUS STDCALL RamdrvDispatchDeviceControl(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION IrpStack; @@ -45,7 +45,7 @@ return Status; } -NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject, +static NTSTATUS STDCALL RamdrvDispatchReadWrite(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PRAMDRV_DEVICE_EXTENSION devext = (PRAMDRV_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -74,7 +74,7 @@ return STATUS_SUCCESS; } -NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject, +static NTSTATUS STDCALL RamdrvDispatchOpenClose(PDEVICE_OBJECT DeviceObject, PIRP Irp) { DPRINT("RamdrvDispatchOpenClose\n"); _____ Modified: trunk/reactos/drivers/dd/ramdrv/ramdrv.h --- trunk/reactos/drivers/dd/ramdrv/ramdrv.h 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/ramdrv/ramdrv.h 2005-10-06 21:39:18 UTC (rev 18302) @@ -3,3 +3,6 @@ unsigned long Size; } RAMDRV_DEVICE_EXTENSION, *PRAMDRV_DEVICE_EXTENSION; +NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath); + _____ Modified: trunk/reactos/drivers/dd/serial/devctrl.c --- trunk/reactos/drivers/dd/serial/devctrl.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/serial/devctrl.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -154,7 +154,7 @@ return Status; } -BOOLEAN +static BOOLEAN SerialClearPerfStats( IN PSERIAL_DEVICE_EXTENSION DeviceExtension) { @@ -165,7 +165,7 @@ return TRUE; } -BOOLEAN +static BOOLEAN SerialGetPerfStats(IN PIRP pIrp) { PSERIAL_DEVICE_EXTENSION pDeviceExtension; @@ -186,7 +186,7 @@ return TRUE; } -NTSTATUS +static NTSTATUS SerialGetCommProp( OUT PSERIAL_COMMPROP pCommProp, IN PSERIAL_DEVICE_EXTENSION DeviceExtension) @@ -232,7 +232,7 @@ return STATUS_SUCCESS; } -NTSTATUS +static NTSTATUS SerialGetCommStatus( OUT PSERIAL_STATUS pSerialStatus, IN PSERIAL_DEVICE_EXTENSION DeviceExtension) _____ Modified: trunk/reactos/drivers/dd/serial/misc.c --- trunk/reactos/drivers/dd/serial/misc.c 2005-10-06 21:18:59 UTC (rev 18301) +++ trunk/reactos/drivers/dd/serial/misc.c 2005-10-06 21:39:18 UTC (rev 18302) @@ -11,7 +11,7 @@ #define NDEBUG #include "serial.h" -NTSTATUS STDCALL +static NTSTATUS STDCALL ForwardIrpAndWaitCompletion( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, _____ Modified: trunk/reactos/drivers/dd/serial/serial.c [truncated at 1000 lines; 2091 more skipped]
19 years, 2 months
1
0
0
0
[greatlrd] 18301: NtGdiDdGetAvailDriverMemory
by greatlrd@svn.reactos.com
NtGdiDdGetAvailDriverMemory - implement the code but the pointer is not set to DdGetAvailDriverMemory and it is undtested. Modified: trunk/reactos/subsys/win32k/include/intddraw.h Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c _____ Modified: trunk/reactos/subsys/win32k/include/intddraw.h --- trunk/reactos/subsys/win32k/include/intddraw.h 2005-10-06 20:34:20 UTC (rev 18300) +++ trunk/reactos/subsys/win32k/include/intddraw.h 2005-10-06 21:18:59 UTC (rev 18301) @@ -47,6 +47,10 @@ PDD_SURFCB_UPDATEOVERLAY DdUpdateOverlay; PDD_SURFCB_SETOVERLAYPOSITION DdSetOverlayPosition; PDD_SURFCB_SETPALETTE DdSetPalette; + // Miscellaneous Callback Function + PDD_GETAVAILDRIVERMEMORY DdGetAvailDriverMemory; + // NT callbacks + DD_FREEDRIVERMEMORYDATA DdFreeDriverMemory; // Palette callbacks PDD_PALCB_DESTROYPALETTE DdDestroyPalette; PDD_PALCB_SETENTRIES DdSetEntries; _____ Modified: trunk/reactos/subsys/win32k/ntddraw/ddraw.c --- trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-10-06 20:34:20 UTC (rev 18300) +++ trunk/reactos/subsys/win32k/ntddraw/ddraw.c 2005-10-06 21:18:59 UTC (rev 18301) @@ -302,8 +302,7 @@ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - ddRVal = pDirectDraw->DrvGetDirectDrawInfo( + ddRVal = pDirectDraw->DrvGetDirectDrawInfo( pDirectDraw->Global.dhpdev,(PDD_HALINFO) puGetDriverInfoData, &pdwNumHeaps, pvmList, &pdwNumFourCC, pdwFourCC); @@ -321,9 +320,7 @@ { DWORD ddRVal; PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - - puWaitForVerticalBlankData->lpDD = pDirectDraw->Local.lpGbl; - + ddRVal = pDirectDraw->DdWaitForVerticalBlank(puWaitForVerticalBlankData); GDIOBJ_UnlockObjByPtr(pDirectDraw); @@ -341,8 +338,6 @@ PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); - puCanCreateSurfaceData->lpDD = pDirectDraw->Local.lpGbl; - ddRVal = pDirectDraw->DdCanCreateSurface(puCanCreateSurfaceData); GDIOBJ_UnlockObjByPtr(pDirectDraw); @@ -373,8 +368,30 @@ return ddRVal; } + /* FIXME + this call is not implement yet + where to get the pointer DdGetAvailDriverMemory(puGetAvailDriverMemoryData + for the call in NtGdiDdCreateDirectDrawObject `?? + or some where else ?? + */ + +DWORD STDCALL NtGdiDdGetAvailDriverMemory( + HANDLE hDirectDrawLocal, + PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData +) +{ + DWORD ddRVal; + PDD_DIRECTDRAW pDirectDraw = GDIOBJ_LockObj(hDirectDrawLocal, GDI_OBJECT_TYPE_DIRECTDRAW); + ddRVal = pDirectDraw->DdGetAvailDriverMemory(puGetAvailDriverMemoryData); + + GDIOBJ_UnlockObjByPtr(pDirectDraw); + return ddRVal; +} + + + /* EOF */ _____ Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c --- trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-10-06 20:34:20 UTC (rev 18300) +++ trunk/reactos/subsys/win32k/ntddraw/stubs.c 2005-10-06 21:18:59 UTC (rev 18301) @@ -14,15 +14,7 @@ #include <debug.h> -DWORD STDCALL NtGdiDdGetAvailDriverMemory( - HANDLE hDirectDrawLocal, - PDD_GETAVAILDRIVERMEMORYDATA puGetAvailDriverMemoryData -) -{ - UNIMPLEMENTED - return 0; -} BOOL STDCALL NtGdiD3dContextCreate( HANDLE hDirectDrawLocal,
19 years, 2 months
1
0
0
0
[blight] 18300: Fix KiGetFpuState() - Thanks to Hartmut for finding this bug and testing the patch.
by blight@svn.reactos.com
Fix KiGetFpuState() - Thanks to Hartmut for finding this bug and testing the patch. Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c _____ Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c --- trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-10-06 20:07:24 UTC (rev 18299) +++ trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-10-06 20:34:20 UTC (rev 18300) @@ -326,6 +326,7 @@ { PFX_SAVE_AREA FxSaveArea = NULL; KIRQL OldIrql; + ULONG Cr0; KeRaiseIrql(DISPATCH_LEVEL, &OldIrql); if (Thread->NpxState & NPX_STATE_VALID) @@ -334,16 +335,19 @@ if (Thread->NpxState & NPX_STATE_DIRTY) { ASSERT(KeGetCurrentPrcb()->NpxThread == Thread); - ASSERT((Ke386GetCr0() & X86_CR0_TS) == 0); + Cr0 = Ke386GetCr0(); + asm volatile("clts"); if (FxsrSupport) asm volatile("fxsave %0" : : "m"(FxSaveArea->U.FxArea)); else { + asm volatile("fnsave %0" : : "m"(FxSaveArea->U.FnArea)); + /* FPU state has to be reloaded because fnsave changes it. */ + Cr0 |= X86_CR0_TS; KeGetCurrentPrcb()->NpxThread = NULL; - asm volatile("fnsave %0" : : "m"(FxSaveArea->U.FnArea)); - Ke386SetCr0(Ke386GetCr0() | X86_CR0_TS); /* FPU state has to be reloaded because fnsave changes it. */ } + Ke386SetCr0(Cr0); Thread->NpxState = NPX_STATE_VALID; } }
19 years, 2 months
1
0
0
0
[amunger] 18299: winver.exe by Christoph.AT.ApiViewer.de
by amunger@svn.reactos.com
winver.exe by Christoph.AT.ApiViewer.de Modified: trunk/reactos/bootdata/packages/reactos.dff Modified: trunk/reactos/subsys/system/directory.xml Added: trunk/reactos/subsys/system/winver/ Added: trunk/reactos/subsys/system/winver/winver.c Added: trunk/reactos/subsys/system/winver/winver.xml _____ Modified: trunk/reactos/bootdata/packages/reactos.dff --- trunk/reactos/bootdata/packages/reactos.dff 2005-10-06 19:24:15 UTC (rev 18298) +++ trunk/reactos/bootdata/packages/reactos.dff 2005-10-06 20:07:24 UTC (rev 18299) @@ -186,6 +186,7 @@ subsys\system\vmwinst\vmwinst.exe 1 subsys\system\winlogon\winlogon.exe 1 subsys\system\winefile\winefile.exe 1 +subsys\system\winver\winver.exe 1 subsys\system\dhcp\dhcp.exe 1 subsys\system\sm\sm.exe 1 subsys\system\expand\expand.exe 1 _____ Modified: trunk/reactos/subsys/system/directory.xml --- trunk/reactos/subsys/system/directory.xml 2005-10-06 19:24:15 UTC (rev 18298) +++ trunk/reactos/subsys/system/directory.xml 2005-10-06 20:07:24 UTC (rev 18299) @@ -20,6 +20,9 @@ <directory name="explorer"> <xi:include href="explorer/explorer.xml" /> </directory> +<directory name="hostname"> + <xi:include href="hostname/hostname.xml" /> +</directory> <directory name="ibrowser"> <xi:include href="ibrowser/ibrowser.xml" /> </directory> @@ -80,8 +83,8 @@ <directory name="winlogon"> <xi:include href="winlogon/winlogon.xml" /> </directory> -<directory name="hostname"> - <xi:include href="hostname/hostname.xml" /> +<directory name="winver"> + <xi:include href="winver/winver.xml" /> </directory> <directory name="welcome"> <xi:include href="welcome/welcome.xml" /> _____ Added: trunk/reactos/subsys/system/winver/winver.c --- trunk/reactos/subsys/system/winver/winver.c 2005-10-06 19:24:15 UTC (rev 18298) +++ trunk/reactos/subsys/system/winver/winver.c 2005-10-06 20:07:24 UTC (rev 18299) @@ -0,0 +1,8 @@ +#include <windows.h> +#include <tchar.h> + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { + static const WCHAR szROS[] = { 'R','e','a','c','t','O','S','\n',0 }; + ShellAbout(0, szROS, 0, 0); + return 1; +} _____ Added: trunk/reactos/subsys/system/winver/winver.xml --- trunk/reactos/subsys/system/winver/winver.xml 2005-10-06 19:24:15 UTC (rev 18298) +++ trunk/reactos/subsys/system/winver/winver.xml 2005-10-06 20:07:24 UTC (rev 18299) @@ -0,0 +1,9 @@ +<module name="winver" type="win32gui" installbase="system32" installname="winver.exe" usewrc="false"> + <include base="winver">.</include> + <define name="__USE_W32API" /> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="_WIN32_IE">0x501</define> + <define name="_WIN32_WINNT">0x0501</define> + <file>winver.c</file> +</module>
19 years, 2 months
1
0
0
0
← Newer
1
...
59
60
61
62
63
64
65
...
74
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200