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
November 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
27 participants
875 discussions
Start a n
N
ew thread
[chorns] 19652: Update with missing symbols
by chorns@svn.reactos.com
Update with missing symbols Modified: trunk/reactos/subsys/win32k/tests/stubs.xml _____ Modified: trunk/reactos/subsys/win32k/tests/stubs.xml --- trunk/reactos/subsys/win32k/tests/stubs.xml 2005-11-26 18:45:06 UTC (rev 19651) +++ trunk/reactos/subsys/win32k/tests/stubs.xml 2005-11-26 18:53:26 UTC (rev 19652) @@ -151,6 +151,8 @@ <symbol>PsSetThreadWin32Thread@8</symbol> <symbol>ProbeForRead@12</symbol> <symbol>ProbeForWrite@12</symbol> + <symbol>@ExEnterCriticalRegionAndAcquireFastMutexUnsafe@4</symbol> + <symbol>@ExReleaseFastMutexUnsafeAndLeaveCriticalRegion@4</symbol> </component> <component name="freetype.dll"> <symbol>FT_Init_FreeType</symbol>
19 years
1
0
0
0
[chorns] 19651: Register shdocvw.dll during second stage setup
by chorns@svn.reactos.com
Register shdocvw.dll during second stage setup Modified: trunk/reactos/lib/shdocvw/shdocvw.xml _____ Modified: trunk/reactos/lib/shdocvw/shdocvw.xml --- trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-26 18:43:46 UTC (rev 19650) +++ trunk/reactos/lib/shdocvw/shdocvw.xml 2005-11-26 18:45:06 UTC (rev 19651) @@ -1,4 +1,5 @@ <module name="shdocvw" type="win32dll" baseaddress="${BASEADDRESS_SHDOCVW}" installbase="system32" installname="shdocvw.dll" usewrc="false" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="Both" /> <importlibrary definition="shdocvw.spec.def" /> <include base="shdocvw">.</include> <include base="ReactOS">include/wine</include>
19 years
1
0
0
0
[chorns] 19650: * Implement <autoregister>
by chorns@svn.reactos.com
* Implement <autoregister> * Autogenerate syssetup.inf Deleted: trunk/reactos/media/inf/syssetup.inf Added: trunk/reactos/media/inf/syssetup.inf.tpl Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.h Modified: trunk/reactos/tools/rbuild/doc/rbuild.txt Modified: trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/rbuild.h Modified: trunk/reactos/tools/rbuild/rbuild.mak Added: trunk/reactos/tools/rbuild/syssetupgenerator.cpp _____ Deleted: trunk/reactos/media/inf/syssetup.inf --- trunk/reactos/media/inf/syssetup.inf 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/media/inf/syssetup.inf 2005-11-26 18:43:46 UTC (rev 19650) @@ -1,26 +0,0 @@ -; -; For Windows, this file controls various aspects of the Installation and -; Upgrade process. If you know a good documentation about this file, -; please add a link here. -; -; -[Version] -Signature = "$Windows NT$" -;Signature = "$ReactOS$" -ClassGUID={00000000-0000-0000-0000-000000000000} - - -; These .INFs install the device classes -[DeviceInfsToInstall] -; MS uses netnovel.inf as class-installer INF for NICs -; we use a separate one to keep things clean -cdrom.inf -display.inf -hdc.inf -keyboard.inf -machine.inf -mouse.inf -NET_NIC.inf -ports.inf -scsi.inf -usbport.inf \ No newline at end of file _____ Copied: trunk/reactos/media/inf/syssetup.inf.tpl (from rev 19573, trunk/reactos/media/inf/syssetup.inf) _____ Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp --- trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.cpp 2005-11-26 18:43:46 UTC (rev 19650) @@ -237,6 +237,7 @@ UnpackWineResources (); GenerateTestSupportCode (); GenerateCompilationUnitSupportCode (); + GenerateSysSetup (); GenerateProxyMakefiles (); CheckAutomaticDependencies (); CloseMakefile (); @@ -578,6 +579,15 @@ } } +void +MingwBackend::GenerateSysSetup () +{ + printf ( "Generating syssetup.inf..." ); + SysSetupGenerator sysSetupGenerator ( ProjectNode ); + sysSetupGenerator.Generate (); + printf ( "done\n" ); +} + string MingwBackend::GetProxyMakefileTree () const { _____ Modified: trunk/reactos/tools/rbuild/backend/mingw/mingw.h --- trunk/reactos/tools/rbuild/backend/mingw/mingw.h 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/backend/mingw/mingw.h 2005-11-26 18:43:46 UTC (rev 19650) @@ -78,6 +78,7 @@ void UnpackWineResources (); void GenerateTestSupportCode (); void GenerateCompilationUnitSupportCode (); + void GenerateSysSetup (); std::string GetProxyMakefileTree () const; void GenerateProxyMakefiles (); void CheckAutomaticDependencies (); _____ Modified: trunk/reactos/tools/rbuild/doc/rbuild.txt --- trunk/reactos/tools/rbuild/doc/rbuild.txt 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/doc/rbuild.txt 2005-11-26 18:43:46 UTC (rev 19650) @@ -129,7 +129,7 @@ None. Elements: - bootstrap, component, compilationunit, define, dependency, directory, file, if, importlibrary, include, invoke, library, linkerscript, property. + autoregister, bootstrap, component, compilationunit, define, dependency, directory, file, if, importlibrary, include, invoke, library, linkerscript, property. Module types @@ -154,6 +154,24 @@ alias - Module is an alias for another module. This module type is the only module type for which the aliasof attribute is applicable. Only the module install functionality is aliased. +Autoregister element +-------------------- +An autoregister element specifies that the generated executable should be registered in the registry during second stage setup. + +Syntax: + <autoregister infsection="OleControlDlls" type="Both" /> + +Attributes: + infsection - Name of section in syssetup.inf. + type - Type of registration. Can be either DllRegisterServer, DllInstall, or Both. + +Value: + None. + +Elements: + None. + + Bootstrap element ----------------- A bootstrap element specifies that the generated file should be put on the bootable CD as a bootstrap file. _____ Modified: trunk/reactos/tools/rbuild/module.cpp --- trunk/reactos/tools/rbuild/module.cpp 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/module.cpp 2005-11-26 18:43:46 UTC (rev 19650) @@ -187,6 +187,14 @@ return false; } +string +ToLower ( string filename ) +{ + for ( size_t i = 1; i < filename.length (); i++ ) + filename[i] = tolower ( filename[i] ); + return filename; +} + IfableData::~IfableData() { size_t i; @@ -232,6 +240,7 @@ node (moduleNode), importLibrary (NULL), bootstrap (NULL), + autoRegister(NULL), linkerScript (NULL), pch (NULL), cplusplus (false), @@ -440,6 +449,8 @@ linkerScript->ProcessXML(); if ( pch ) pch->ProcessXML(); + if ( autoRegister ) + autoRegister->ProcessXML(); } void @@ -647,6 +658,17 @@ } subs_invalid = false; } + else if ( e.name == "autoregister" ) + { + if ( autoRegister != NULL) + { + throw InvalidBuildFileException ( e.location, + "there can be only one <%s> element for a module", + e.name.c_str() ); + } + autoRegister = new AutoRegister ( project, this, e ); + subs_invalid = true; + } if ( subs_invalid && e.subElements.size() > 0 ) throw InvalidBuildFileException ( e.location, @@ -1260,3 +1282,85 @@ PchFile::ProcessXML() { } + + +AutoRegister::AutoRegister ( const Project& project_, + const Module* module_, + const XMLElement& node_ ) + : project(project_), + module(module_), + node(node_) +{ + Initialize(); +} + +AutoRegister::~AutoRegister () +{ +} + +bool +AutoRegister::IsSupportedModuleType ( ModuleType type ) +{ + switch ( type ) + { + case Win32DLL: + return true; + case Kernel: + case KernelModeDLL: + case NativeDLL: + case NativeCUI: + case Win32CUI: + case Win32GUI: + case KernelModeDriver: + case BootSector: + case BootLoader: + case BuildTool: + case StaticLibrary: + case ObjectLibrary: + case Iso: + case LiveIso: + case Test: + case RpcServer: + case RpcClient: + case Alias: + return false; + } + throw InvalidOperationException ( __FILE__, + __LINE__ ); +} + +AutoRegisterType +AutoRegister::GetAutoRegisterType( string type ) +{ + if ( type == "DllRegisterServer" ) + return DllRegisterServer; + if ( type == "DllInstall" ) + return DllInstall; + if ( type == "Both" ) + return Both; + throw InvalidBuildFileException ( + node.location, + "<autoregister> type attribute must be DllRegisterServer, DllInstall or Both." ); +} + +void +AutoRegister::Initialize () +{ + if ( !IsSupportedModuleType ( module->type ) ) + { + throw InvalidBuildFileException ( + node.location, + "<autoregister> is not applicable for this module type." ); + } + + const XMLAttribute* att = node.GetAttribute ( "infsection", true ); + infSection = att->value; + + att = node.GetAttribute ( "type", true ); + type = GetAutoRegisterType ( att->value ); +} + +void +AutoRegister::ProcessXML() +{ +} _____ Modified: trunk/reactos/tools/rbuild/rbuild.h --- trunk/reactos/tools/rbuild/rbuild.h 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/rbuild.h 2005-11-26 18:43:46 UTC (rev 19650) @@ -38,6 +38,7 @@ #include "ssprintf.h" #include "exception.h" #include "XML.h" +#include <infhost.h> typedef std::vector<std::string> string_list; @@ -94,6 +95,7 @@ class StubbedSymbol; class CompilationUnit; class FileLocation; +class AutoRegister; class SourceFileTest; @@ -276,6 +278,7 @@ bool mangledSymbols; bool isUnicode; Bootstrap* bootstrap; + AutoRegister* autoRegister; IfableData non_if_data; std::vector<Invoke*> invocations; std::vector<Dependency*> dependencies; @@ -866,6 +869,48 @@ }; +enum AutoRegisterType +{ + DllRegisterServer, + DllInstall, + Both +}; + +class AutoRegister +{ +public: + const Project& project; + const Module* module; + const XMLElement& node; + std::string infSection; + AutoRegisterType type; + AutoRegister ( const Project& project_, + const Module* module_, + const XMLElement& node_ ); + ~AutoRegister (); + void ProcessXML(); +private: + bool IsSupportedModuleType ( ModuleType type ); + AutoRegisterType GetAutoRegisterType( std::string type ); + void Initialize (); +}; + + +class SysSetupGenerator +{ +public: + const Project& project; + SysSetupGenerator ( const Project& project ); + ~SysSetupGenerator (); + void Generate (); +private: + std::string GetDirectoryId ( const Module& module ); + std::string GetFlags ( const Module& module ); + void Generate ( HINF inf, + const Module& module ); +}; + + extern void InitializeEnvironment (); @@ -912,4 +957,7 @@ extern std::string NormalizeFilename ( const std::string& filename ); +extern std::string +ToLower ( std::string filename ); + #endif /* __RBUILD_H */ _____ Modified: trunk/reactos/tools/rbuild/rbuild.mak --- trunk/reactos/tools/rbuild/rbuild.mak 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/rbuild.mak 2005-11-26 18:43:46 UTC (rev 19650) @@ -172,6 +172,7 @@ project.cpp \ ssprintf.cpp \ stubbedcomponent.cpp \ + syssetupgenerator.cpp \ testsupportcode.cpp \ wineresource.cpp \ XML.cpp \ @@ -250,16 +251,16 @@ $(RBUILD_COMMON_OBJECTS) \ $(RBUILD_TEST_SPECIAL_OBJECTS) -RBUILD_HOST_CXXFLAGS = -I$(RBUILD_BASE) $(TOOLS_CPPFLAGS) +RBUILD_HOST_CXXFLAGS = -I$(RBUILD_BASE) -I$(INFLIB_BASE) $(TOOLS_CPPFLAGS) RBUILD_HOST_LFLAGS = $(TOOLS_LFLAGS) .PHONY: rbuild rbuild: $(RBUILD_TARGET) -$(RBUILD_TARGET): $(RBUILD_OBJECTS) | $(RBUILD_OUT) +$(RBUILD_TARGET): $(RBUILD_OBJECTS) $(INFLIB_HOST_TARGET) | $(RBUILD_OUT) $(ECHO_LD) - ${host_gpp} $(RBUILD_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@ + ${host_gpp} $(RBUILD_OBJECTS) $(INFLIB_HOST_TARGET) $(RBUILD_HOST_LFLAGS) -o $@ $(RBUILD_INT_)global.o: $(RBUILD_BASE_)global.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) $(ECHO_CC) @@ -345,6 +346,10 @@ $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ +$(RBUILD_INT_)syssetupgenerator.o: $(RBUILD_BASE_)syssetupgenerator.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) + $(ECHO_CC) + ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ + $(RBUILD_INT_)wineresource.o: $(RBUILD_BASE_)wineresource.cpp $(RBUILD_HEADERS) | $(RBUILD_INT) $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ @@ -379,7 +384,7 @@ $(RBUILD_MSVC_INT_)genguid.o: $(RBUILD_MSVC_BASE_)genguid.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) $(ECHO_CC) - ${host_gpp} $(RBUILD_HOST_CFLAGS) -c $< -o $@ + ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ $(RBUILD_MSVC_INT_)msvc.o: $(RBUILD_MSVC_BASE_)msvc.cpp $(RBUILD_HEADERS) | $(RBUILD_MSVC_INT) $(ECHO_CC) @@ -393,9 +398,9 @@ $(ECHO_CC) ${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@ -$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(RBUILD_HEADERS) | $(RBUILD_OUT) +$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(INFLIB_HOST_TARGET) $(RBUILD_HEADERS) | $(RBUILD_OUT) $(ECHO_LD) - ${host_gpp} $(RBUILD_TEST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@ + ${host_gpp} $(RBUILD_TEST_OBJECTS) $(INFLIB_HOST_TARGET) $(RBUILD_HOST_LFLAGS) -o $@ $(RBUILD_TESTS_INT_)cdfiletest.o: $(RBUILD_TESTS_BASE_)cdfiletest.cpp $(RBUILD_HEADERS) | $(RBUILD_TESTS_INT) $(ECHO_CC) _____ Added: trunk/reactos/tools/rbuild/syssetupgenerator.cpp --- trunk/reactos/tools/rbuild/syssetupgenerator.cpp 2005-11-26 18:24:43 UTC (rev 19649) +++ trunk/reactos/tools/rbuild/syssetupgenerator.cpp 2005-11-26 18:43:46 UTC (rev 19650) @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2005 Casper S. Hornstrup + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include "pch.h" +#include <assert.h> + +#include "rbuild.h" + +using std::string; +using std::vector; + +SysSetupGenerator::SysSetupGenerator ( const Project& project ) + : project ( project ) +{ +} + +SysSetupGenerator::~SysSetupGenerator () +{ +} + +void +SysSetupGenerator::Generate () +{ + HINF inf; + unsigned long errorLine; + + string syssetupTemplate = "media" + sSep + "inf" + sSep + "syssetup.inf.tpl"; + string syssetup = "media" + sSep + "inf" + sSep + "syssetup.inf"; + + if ( 0 != InfHostOpenFile ( &inf, syssetupTemplate.c_str (), &errorLine ) ) + throw new FileNotFoundException ( syssetupTemplate ); + + for ( size_t i = 0; i < project.modules.size (); i++ ) + { + const Module& module = *project.modules[i]; + if ( module.autoRegister != NULL ) + Generate ( inf, module ); + } + + if ( 0 != InfHostWriteFile ( inf, syssetup.c_str (), "" ) ) + { + InfHostCloseFile ( inf ); + throw new AccessDeniedException ( syssetup ); + } + + InfHostCloseFile ( inf ); +} + +#define DIRECTORYID_SYSTEM32 "11" + +string +SysSetupGenerator::GetDirectoryId ( const Module& module ) +{ + if ( ToLower ( module.installBase ) == "system32" ) + return DIRECTORYID_SYSTEM32; + throw InvalidOperationException ( __FILE__, + __LINE__ ); +} + +#define FLG_REGSVR_DLLREGISTER "1" +#define FLG_REGSVR_DLLINSTALL "2" +#define FLG_REGSVR_BOTH "3" + +string +SysSetupGenerator::GetFlags ( const Module& module ) +{ + if ( module.autoRegister->type == DllRegisterServer ) + return FLG_REGSVR_DLLREGISTER; + if ( module.autoRegister->type == DllInstall ) + return FLG_REGSVR_DLLINSTALL; + if ( module.autoRegister->type == Both ) + return FLG_REGSVR_BOTH; + throw InvalidOperationException ( __FILE__, + __LINE__ ); +} + +void +SysSetupGenerator::Generate ( HINF inf, + const Module& module ) +{ + PINFCONTEXT context; + + string infSection = module.autoRegister->infSection; + if ( 0 != InfHostFindOrAddSection ( inf, infSection.c_str (), &context ) ) + { + throw new Exception ( ".inf section '%s' not found", infSection.c_str () ); + InfHostCloseFile ( inf ); + } + + if ( 0 != InfHostAddLine ( context, NULL ) || + 0 != InfHostAddField ( context, GetDirectoryId ( module ).c_str () ) || + 0 != InfHostAddField ( context, "" ) || + 0 != InfHostAddField ( context, module.installName.c_str () ) || + 0 != InfHostAddField ( context, GetFlags ( module ).c_str () ) ) + { + InfHostFreeContext ( context ); + InfHostCloseFile ( inf ); + throw InvalidOperationException ( __FILE__, + __LINE__ ); + } + + InfHostFreeContext ( context ); +} Property changes on: trunk/reactos/tools/rbuild/syssetupgenerator.cpp ___________________________________________________________________ Name: svn:eol-style + native
19 years
1
0
0
0
[weiden] 19649: fixed wrong comment
by weiden@svn.reactos.com
fixed wrong comment Modified: trunk/reactos/lib/devmgr/En.rc Modified: trunk/reactos/lib/devmgr/advprop.c _____ Modified: trunk/reactos/lib/devmgr/En.rc --- trunk/reactos/lib/devmgr/En.rc 2005-11-26 17:43:06 UTC (rev 19648) +++ trunk/reactos/lib/devmgr/En.rc 2005-11-26 18:24:43 UTC (rev 19649) @@ -47,5 +47,5 @@ EDITTEXT IDC_DEVSTATUS, 14, 96, 224, 61, NOT WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL PUSHBUTTON "&Troubleshoot...", IDC_TROUBLESHOOT, 148, 163, 90, 15 LTEXT "&Device usage:", -1, 7, 188, 222, 8 - COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWN | WS_VSCROLL + COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL END _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-11-26 17:43:06 UTC (rev 19648) +++ trunk/reactos/lib/devmgr/advprop.c 2005-11-26 18:24:43 UTC (rev 19649) @@ -399,8 +399,6 @@ 0, &DevInfoData)) { - - /* create the image list */ Ret = DisplayDeviceAdvancedProperties(hWndParent, hDevInfo, &DevInfoData,
19 years, 1 month
1
0
0
0
[weiden] 19648: Revert Filip's last 4 changes on his request as they break booting
by weiden@svn.reactos.com
Revert Filip's last 4 changes on his request as they break booting Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c Modified: trunk/reactos/ntoskrnl/cm/regfile.c Modified: trunk/reactos/tools/mkhive/binhive.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c --- trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c 2005-11-26 17:07:54 UTC (rev 19647) +++ trunk/reactos/boot/freeldr/freeldr/reactos/binhive.c 2005-11-26 17:43:06 UTC (rev 19648) @@ -809,7 +809,6 @@ { NewBlock = (PCELL_HEADER) ((ULONG)NewBlock + CellSize); NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize; - ((PCELL_HEADER) (*Block))->CellSize = CellSize; CmiAddFree (RegistryHive, NewBlock, *pBlockOffset + CellSize, @@ -821,7 +820,7 @@ } memset(*Block, 0, CellSize); - ((PCELL_HEADER)(*Block))->CellSize *= -1; + ((PCELL_HEADER)(*Block))->CellSize = -CellSize; return TRUE; } _____ Modified: trunk/reactos/ntoskrnl/cm/regfile.c --- trunk/reactos/ntoskrnl/cm/regfile.c 2005-11-26 17:07:54 UTC (rev 19647) +++ trunk/reactos/ntoskrnl/cm/regfile.c 2005-11-26 17:43:06 UTC (rev 19648) @@ -3417,7 +3417,6 @@ { NewCell = (PCELL_HEADER) ((ULONG_PTR) NewCell + CellSize); NewCell->CellSize = ((PCELL_HEADER) (*Cell))->CellSize - CellSize; - ((PCELL_HEADER) (*Cell))->CellSize = CellSize; CmiAddFree(RegistryHive, NewCell, *CellOffset + CellSize, @@ -3432,7 +3431,7 @@ RtlZeroMemory(*Cell, CellSize); - ((PCELL_HEADER) (*Cell))->CellSize *= -1; + ((PCELL_HEADER) (*Cell))->CellSize = -CellSize; } return STATUS_SUCCESS; _____ Modified: trunk/reactos/tools/mkhive/binhive.c --- trunk/reactos/tools/mkhive/binhive.c 2005-11-26 17:07:54 UTC (rev 19647) +++ trunk/reactos/tools/mkhive/binhive.c 2005-11-26 17:43:06 UTC (rev 19648) @@ -829,7 +829,6 @@ { NewBlock = (PCELL_HEADER) ((ULONG_PTR) NewBlock + CellSize); NewBlock->CellSize = ((PCELL_HEADER) (*Block))->CellSize - CellSize; - ((PCELL_HEADER) (*Block))->CellSize = CellSize; CmiAddFree (RegistryHive, NewBlock, *pBlockOffset + CellSize, @@ -841,7 +840,7 @@ } memset(*Block, 0, CellSize); - ((PCELL_HEADER)(*Block))->CellSize *= -1; + ((PCELL_HEADER)(*Block))->CellSize = -CellSize; return TRUE; }
19 years, 1 month
1
0
0
0
[weiden] 19647: display the device properties when double-clicking a device
by weiden@svn.reactos.com
display the device properties when double-clicking a device Modified: trunk/reactos/lib/devmgr/hwpage.c _____ Modified: trunk/reactos/lib/devmgr/hwpage.c --- trunk/reactos/lib/devmgr/hwpage.c 2005-11-26 16:54:56 UTC (rev 19646) +++ trunk/reactos/lib/devmgr/hwpage.c 2005-11-26 17:07:54 UTC (rev 19647) @@ -701,6 +701,12 @@ } break; } + + case NM_DBLCLK: + { + DisplaySelectedDeviceProperties(hpd); + break; + } } } break;
19 years, 1 month
1
0
0
0
[weiden] 19646: implemented the general device information page
by weiden@svn.reactos.com
implemented the general device information page Modified: trunk/reactos/lib/devmgr/En.rc Modified: trunk/reactos/lib/devmgr/advprop.c Modified: trunk/reactos/lib/devmgr/hwpage.c Modified: trunk/reactos/lib/devmgr/misc.c Modified: trunk/reactos/lib/devmgr/precomp.h Modified: trunk/reactos/lib/devmgr/resource.h _____ Modified: trunk/reactos/lib/devmgr/En.rc --- trunk/reactos/lib/devmgr/En.rc 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/En.rc 2005-11-26 16:54:56 UTC (rev 19646) @@ -29,3 +29,23 @@ BS_PUSHBUTTON | WS_CHILD | WS_DISABLED | WS_TABSTOP PUSHBUTTON "P&roperties",IDC_PROPERTIES,146,140,50,14 END + +IDD_DEVICEGENERAL DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "General" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Device type:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DEVTYPE, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Manufacturer:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DEVMANUFACTURER, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Location:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DEVLOCATION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + GROUPBOX "Device status", IDC_DEVSTATUSGROUP, 7, 83, 238, 100 + EDITTEXT IDC_DEVSTATUS, 14, 96, 224, 61, NOT WS_TABSTOP | ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL + PUSHBUTTON "&Troubleshoot...", IDC_TROUBLESHOOT, 148, 163, 90, 15 + LTEXT "&Device usage:", -1, 7, 188, 222, 8 + COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWN | WS_VSCROLL +END _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/advprop.c 2005-11-26 16:54:56 UTC (rev 19646) @@ -31,41 +31,205 @@ #include <debug.h> typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW); +typedef HPROPSHEETPAGE (WINAPI *PCREATEPROPERTYSHEETPAGEW)(LPCPROPSHEETPAGEW); +typedef BOOL (WINAPI *PDESTROYPROPERTYSHEETPAGE)(HPROPSHEETPAGE); +typedef struct _DEVADVPROP_INFO +{ + HDEVINFO DeviceInfoSet; + PSP_DEVINFO_DATA DeviceInfoData; + HINSTANCE hComCtl32; + WCHAR szDevName[255]; + WCHAR szTemp[255]; +} DEVADVPROP_INFO, *PDEVADVPROP_INFO; + + +static INT_PTR +CALLBACK +AdvPropGeneralDlgProc(IN HWND hwndDlg, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam) +{ + PDEVADVPROP_INFO dap; + + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, + DWL_USER); + + if (dap != NULL || uMsg == WM_INITDIALOG) + { + switch (uMsg) + { + case WM_INITDIALOG: + { + dap = (PDEVADVPROP_INFO)((LPPROPSHEETPAGE)lParam)->lParam; + if (dap != NULL) + { + HICON hIcon; + + SetWindowLongPtr(hwndDlg, + DWL_USER, + (DWORD_PTR)dap); + + /* set the device image */ + if (SetupDiLoadClassIcon(&dap->DeviceInfoData->ClassGuid, + &hIcon, + NULL)) + { + SendDlgItemMessage(hwndDlg, + IDC_DEVICON, + STM_SETICON, + (WPARAM)hIcon, + 0); + } + + /* set the device name edit control text */ + SetDlgItemText(hwndDlg, + IDC_DEVNAME, + dap->szDevName); + + /* set the device type edit control text */ + if (GetDeviceTypeString(dap->DeviceInfoData, + dap->szTemp, + sizeof(dap->szTemp) / sizeof(dap->szTemp[0]))) + { + SetDlgItemText(hwndDlg, + IDC_DEVTYPE, + dap->szTemp); + } + + /* set the device manufacturer edit control text */ + if (GetDeviceManufacturerString(dap->DeviceInfoSet, + dap->DeviceInfoData, + dap->szTemp, + sizeof(dap->szTemp) / sizeof(dap->szTemp[0]))) + { + SetDlgItemText(hwndDlg, + IDC_DEVMANUFACTURER, + dap->szTemp); + } + + /* set the device location edit control text */ + if (GetDeviceLocationString(dap->DeviceInfoData->DevInst, + dap->szTemp, + sizeof(dap->szTemp) / sizeof(dap->szTemp[0]))) + { + SetDlgItemText(hwndDlg, + IDC_DEVLOCATION, + dap->szTemp); + } + + /* set the device status edit control text */ + if (GetDeviceStatusString(dap->DeviceInfoSet, + dap->DeviceInfoData, + dap->szTemp, + sizeof(dap->szTemp) / sizeof(dap->szTemp[0]))) + { + SetDlgItemText(hwndDlg, + IDC_DEVSTATUS, + dap->szTemp); + } + } + break; + } + + case WM_DESTROY: + { + HICON hDevIcon; + + /* destroy the device icon */ + hDevIcon = (HICON)SendDlgItemMessage(hwndDlg, + IDC_DEVICON, + STM_GETICON, + 0, + 0); + if (hDevIcon != NULL) + { + DestroyIcon(hDevIcon); + } + break; + } + } + } + + return FALSE; +} + + INT_PTR DisplayDeviceAdvancedProperties(IN HWND hWndParent, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN HINSTANCE hComCtl32) { - WCHAR szDevName[255]; DWORD RegDataType; PROPSHEETHEADER psh = {0}; + PROPSHEETPAGE pspGeneral = {0}; DWORD nPropSheets = 0; + DWORD nDevSheetsStart = 0; PPROPERTYSHEETW pPropertySheetW; + PCREATEPROPERTYSHEETPAGEW pCreatePropertySheetPageW; + PDESTROYPROPERTYSHEETPAGE pDestroyPropertySheetPage; + PDEVADVPROP_INFO DevAdvPropInfo; + UINT nPages = 0; + union + { + ULONG Mask; + struct + { + ULONG General : 1; + ULONG Device : 1; + } Page; + } DelPropSheets = {0}; INT_PTR Ret = -1; - pPropertySheetW = (PPROPERTYSHEETW)GetProcAddress(hComCtl32, - "PropertySheetW"); - if (pPropertySheetW == NULL) + /* we don't want to statically link against comctl32, so find the + functions we need dynamically */ + pPropertySheetW = + (PPROPERTYSHEETW)GetProcAddress(hComCtl32, + "PropertySheetW"); + pCreatePropertySheetPageW = + (PCREATEPROPERTYSHEETPAGEW)GetProcAddress(hComCtl32, + "CreatePropertySheetPageW"); + pDestroyPropertySheetPage = + (PDESTROYPROPERTYSHEETPAGE)GetProcAddress(hComCtl32, + "DestroyPropertySheetPage"); + if (pPropertySheetW == NULL || + pCreatePropertySheetPageW == NULL || + pDestroyPropertySheetPage == NULL) { return -1; } + /* create the internal structure associated with the "General", + "Driver", ... pages */ + DevAdvPropInfo = HeapAlloc(GetProcessHeap(), + 0, + sizeof(DEVADVPROP_INFO)); + if (DevAdvPropInfo == NULL) + { + return -1; + } + + DevAdvPropInfo->DeviceInfoSet = DeviceInfoSet; + DevAdvPropInfo->DeviceInfoData = DeviceInfoData; + DevAdvPropInfo->hComCtl32 = hComCtl32; + DevAdvPropInfo->szDevName[0] = L'\0'; + /* get the device name */ if ((SetupDiGetDeviceRegistryProperty(DeviceInfoSet, DeviceInfoData, SPDRP_FRIENDLYNAME, &RegDataType, - (PBYTE)szDevName, - sizeof(szDevName), + (PBYTE)DevAdvPropInfo->szDevName, + sizeof(DevAdvPropInfo->szDevName), NULL) || SetupDiGetDeviceRegistryProperty(DeviceInfoSet, DeviceInfoData, SPDRP_DEVICEDESC, &RegDataType, - (PBYTE)szDevName, - sizeof(szDevName), + (PBYTE)DevAdvPropInfo->szDevName, + sizeof(DevAdvPropInfo->szDevName), NULL)) && RegDataType == REG_SZ) { @@ -74,7 +238,7 @@ psh.dwSize = sizeof(PROPSHEETHEADER); psh.dwFlags = PSH_PROPTITLE; psh.hwndParent = hWndParent; - psh.pszCaption = szDevName; + psh.pszCaption = DevAdvPropInfo->szDevName; /* find out how many property sheets we need */ if (SetupDiGetClassDevPropertySheets(DeviceInfoSet, @@ -89,42 +253,100 @@ goto Cleanup; } - if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) + if (nPropSheets != 0 && GetLastError() != ERROR_INSUFFICIENT_BUFFER) { goto Cleanup; } psh.phpage = HeapAlloc(GetProcessHeap(), - 0, - nPropSheets * sizeof(HPROPSHEETPAGE)); + HEAP_ZERO_MEMORY, + (nPropSheets + 1) * sizeof(HPROPSHEETPAGE)); if (psh.phpage == NULL) { goto Cleanup; } - /* FIXME - add the "General" and "Driver" pages */ + /* add the "General" property sheet */ + pspGeneral.dwSize = sizeof(PROPSHEETPAGE); + pspGeneral.dwFlags = PSP_DEFAULT; + pspGeneral.hInstance = hDllInstance; + pspGeneral.pszTemplate = (LPCWSTR)MAKEINTRESOURCE(IDD_DEVICEGENERAL); + pspGeneral.pfnDlgProc = AdvPropGeneralDlgProc; + pspGeneral.lParam = (LPARAM)DevAdvPropInfo; + psh.phpage[0] = pCreatePropertySheetPageW(&pspGeneral); + if (psh.phpage[0] != NULL) + { + DelPropSheets.Page.General = TRUE; + nDevSheetsStart++; + nPages++; + } - if (!SetupDiGetClassDevPropertySheets(DeviceInfoSet, - DeviceInfoData, - &psh, - nPropSheets, - NULL, - DIGCDP_FLAG_ADVANCED)) + if (nPropSheets != 0) { - goto Cleanup; + /* create the device property sheets but don't overwrite + the "General" property sheet handle */ + psh.phpage += nDevSheetsStart; + if (!SetupDiGetClassDevPropertySheets(DeviceInfoSet, + DeviceInfoData, + &psh, + nPropSheets, + NULL, + DIGCDP_FLAG_ADVANCED)) + { + goto Cleanup; + } + psh.phpage -= nDevSheetsStart; + + DelPropSheets.Page.Device = TRUE; + nPages += nPropSheets; } + psh.nPages = nPages; + + /* FIXME - add the "Driver" property sheet if necessary */ + Ret = pPropertySheetW(&psh); + /* no need to destroy the property sheets anymore */ + DelPropSheets.Mask = 0; + Cleanup: + /* in case of failure the property sheets must be destroyed */ + if (DelPropSheets.Mask != 0) + { + if (DelPropSheets.Page.General && psh.phpage[0] != NULL) + { + pDestroyPropertySheetPage(psh.phpage[0]); + } + + if (DelPropSheets.Page.Device) + { + UINT i; + for (i = 0; + i < nPropSheets; + i++) + { + if (psh.phpage[i + 1] != NULL) + { + pDestroyPropertySheetPage(psh.phpage[i + 1]); + } + } + } + } + HeapFree(GetProcessHeap(), 0, psh.phpage); } + HeapFree(GetProcessHeap(), + 0, + DevAdvPropInfo); + return Ret; } + /*********************************************************************** **** * NAME EXPORTED * DeviceAdvancedPropertiesW @@ -177,6 +399,8 @@ 0, &DevInfoData)) { + + /* create the image list */ Ret = DisplayDeviceAdvancedProperties(hWndParent, hDevInfo, &DevInfoData, @@ -185,12 +409,14 @@ SetupDiDestroyDeviceInfoList(hDevInfo); } + FreeLibrary(hComCtl32); } return Ret; } + /*********************************************************************** **** * NAME EXPORTED * DeviceAdvancedPropertiesA _____ Modified: trunk/reactos/lib/devmgr/hwpage.c --- trunk/reactos/lib/devmgr/hwpage.c 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/hwpage.c 2005-11-26 16:54:56 UTC (rev 19646) @@ -158,30 +158,15 @@ if (HwDevInfo != NULL) { /* update static controls */ - CONFIGRET cRet; - DWORD RegDataType; - ULONG DataSize; WCHAR szBuffer[256]; LPWSTR szFormatted = NULL; /* get the manufacturer string */ - if (!SetupDiGetDeviceRegistryProperty(HwDevInfo->ClassDevInfo->hDevInfo, - &HwDevInfo->DevInfoData, - SPDRP_MFG, - &RegDataType, - (PBYTE)szBuffer, - sizeof(szBuffer), - NULL) || - RegDataType != REG_SZ) - { - szBuffer[0] = L'\0'; - LoadString(hDllInstance, - IDS_UNKNOWN, - szBuffer, - sizeof(szBuffer) / sizeof(szBuffer[0])); - } - /* FIXME - check string for NULL termination! */ - if (LoadAndFormatString(hDllInstance, + if (GetDeviceManufacturerString(HwDevInfo->ClassDevInfo->hDevInfo, + &HwDevInfo->DevInfoData, + szBuffer, + sizeof(szBuffer) / sizeof(szBuffer[0])) && + LoadAndFormatString(hDllInstance, IDS_MANUFACTURER, &szFormatted, szBuffer) != 0) @@ -193,46 +178,10 @@ } /* get the location string */ - DataSize = sizeof(szBuffer); - cRet = CM_Get_DevNode_Registry_Property(HwDevInfo->DevInfoData.DevInst, - CM_DRP_LOCATION_INFORMATION, - &RegDataType, - szBuffer, - &DataSize, - 0); - if (cRet != CR_SUCCESS || - RegDataType != REG_SZ) - { - szBuffer[0] = L'\0'; - LoadString(hDllInstance, - IDS_UNKNOWN, - szBuffer, - sizeof(szBuffer) / sizeof(szBuffer[0])); - } - /* FIXME - check string for NULL termination! */ - - if (szBuffer[0] >= L'0' && szBuffer[0] <= L'9') - { - /* convert the string to an integer value and create a - formatted string */ - ULONG ulLocation = (ULONG)wcstoul(szBuffer, - NULL, - 10); - if (LoadAndFormatString(hDllInstance, - IDS_LOCATIONSTR, - &szFormatted, - ulLocation, - szBuffer) != 0) - { - wcsncpy(szBuffer, - szFormatted, - (sizeof(szBuffer) / sizeof(szBuffer[0])) - 1); - szBuffer[(sizeof(szBuffer) / sizeof(szBuffer[0])) - 1] = L'\0'; - LocalFree((HLOCAL)szFormatted); - } - } - - if (LoadAndFormatString(hDllInstance, + if (GetDeviceLocationString(HwDevInfo->DevInfoData.DevInst, + szBuffer, + sizeof(szBuffer) / sizeof(szBuffer[0])) && + LoadAndFormatString(hDllInstance, IDS_LOCATION, &szFormatted, szBuffer) != 0) @@ -243,13 +192,11 @@ LocalFree((HLOCAL)szFormatted); } - /* FIXME - get the device status text */ - LoadString(hDllInstance, - IDS_UNKNOWN, - szBuffer, - sizeof(szBuffer) / sizeof(szBuffer[0])); - - if (LoadAndFormatString(hDllInstance, + if (GetDeviceStatusString(HwDevInfo->ClassDevInfo->hDevInfo, + &HwDevInfo->DevInfoData, + szBuffer, + sizeof(szBuffer) / sizeof(szBuffer[0])) && + LoadAndFormatString(hDllInstance, IDS_STATUS, &szFormatted, szBuffer) != 0) @@ -449,10 +396,9 @@ ItemCount++; /* get the device type for the second column */ - if (SetupDiGetClassDescription(&ClassDevInfo->Guid, - szBuffer, - sizeof(szBuffer) / sizeof(szBuffer[0]), - NULL)) + if (GetDeviceTypeString(&HwDevInfo->DevInfoData, + szBuffer, + sizeof(szBuffer) / sizeof(szBuffer[0]))) { li.mask = LVIF_TEXT; li.iItem = iItem; _____ Modified: trunk/reactos/lib/devmgr/misc.c --- trunk/reactos/lib/devmgr/misc.c 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/misc.c 2005-11-26 16:54:56 UTC (rev 19646) @@ -29,6 +29,7 @@ HINSTANCE hDllInstance = NULL; + static INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID) @@ -65,6 +66,7 @@ return -1; } + static INT AllocAndLoadString(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, @@ -91,6 +93,7 @@ return 0; } + DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, @@ -123,6 +126,7 @@ return Ret; } + LPARAM ListViewGetSelectedItemData(IN HWND hwnd) { @@ -149,6 +153,7 @@ return 0; } + LPWSTR ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr, IN UINT uCodePage) @@ -187,6 +192,151 @@ return lpUnicodeStr; } + +BOOL +GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize) +{ + DWORD RegDataType; + BOOL Ret = FALSE; + + if (!SetupDiGetDeviceRegistryProperty(DeviceInfoSet, + DeviceInfoData, + SPDRP_MFG, + &RegDataType, + (PBYTE)szBuffer, + BufferSize * sizeof(WCHAR), + NULL) || + RegDataType != REG_SZ) + { + szBuffer[0] = L'\0'; + if (LoadString(hDllInstance, + IDS_UNKNOWN, + szBuffer, + BufferSize)) + { + Ret = TRUE; + } + } + else + { + /* FIXME - check string for NULL termination! */ + Ret = TRUE; + } + + return Ret; +} + + +BOOL +GetDeviceLocationString(IN DEVINST dnDevInst, + OUT LPWSTR szBuffer, + IN DWORD BufferSize) +{ + DWORD RegDataType; + ULONG DataSize; + CONFIGRET cRet; + BOOL Ret = FALSE; + + DataSize = BufferSize * sizeof(WCHAR); + cRet = CM_Get_DevNode_Registry_Property(dnDevInst, + CM_DRP_LOCATION_INFORMATION, + &RegDataType, + szBuffer, + &DataSize, + 0); + if (cRet != CR_SUCCESS || + RegDataType != REG_SZ) + { + szBuffer[0] = L'\0'; + if (LoadString(hDllInstance, + IDS_UNKNOWN, + szBuffer, + BufferSize)) + { + Ret = TRUE; + } + } + else + { + /* FIXME - check string for NULL termination! */ + Ret = TRUE; + } + + if (szBuffer[0] >= L'0' && szBuffer[0] <= L'9') + { + /* convert the string to an integer value and create a + formatted string */ + LPWSTR szFormatted; + ULONG ulLocation = (ULONG)wcstoul(szBuffer, + NULL, + 10); + if (LoadAndFormatString(hDllInstance, + IDS_LOCATIONSTR, + &szFormatted, + ulLocation, + szBuffer) != 0) + { + wcsncpy(szBuffer, + szFormatted, + BufferSize - 1); + szBuffer[BufferSize - 1] = L'\0'; + LocalFree((HLOCAL)szFormatted); + } + else + Ret = FALSE; + } + + return Ret; +} + + +BOOL +GetDeviceStatusString(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize) +{ + return LoadString(hDllInstance, + IDS_UNKNOWN, + szBuffer, + BufferSize) != 0; +} + + +BOOL +GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize) +{ + BOOL Ret = FALSE; + + if (!SetupDiGetClassDescription(&DeviceInfoData->ClassGuid, + szBuffer, + BufferSize, + NULL)) + { + szBuffer[0] = L'\0'; + if (LoadString(hDllInstance, + IDS_UNKNOWN, + szBuffer, + BufferSize)) + { + Ret = TRUE; + } + } + else + { + /* FIXME - check string for NULL termination! */ + Ret = TRUE; + } + + return Ret; +} + + HINSTANCE LoadAndInitComctl32(VOID) { @@ -212,6 +362,7 @@ return hComCtl32; } + BOOL STDCALL DllMain(IN HINSTANCE hinstDLL, _____ Modified: trunk/reactos/lib/devmgr/precomp.h --- trunk/reactos/lib/devmgr/precomp.h 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/precomp.h 2005-11-26 16:54:56 UTC (rev 19646) @@ -206,6 +206,28 @@ HINSTANCE LoadAndInitComctl32(VOID); +BOOL +GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize); + +BOOL +GetDeviceLocationString(IN DEVINST dnDevInst, + OUT LPWSTR szBuffer, + IN DWORD BufferSize); + +BOOL +GetDeviceStatusString(IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize); + +BOOL +GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData, + OUT LPWSTR szBuffer, + IN DWORD BufferSize); + #endif /* __DEVMGR_H */ /* EOF */ _____ Modified: trunk/reactos/lib/devmgr/resource.h --- trunk/reactos/lib/devmgr/resource.h 2005-11-26 16:54:15 UTC (rev 19645) +++ trunk/reactos/lib/devmgr/resource.h 2005-11-26 16:54:56 UTC (rev 19646) @@ -2,10 +2,18 @@ #define __DEVMGR_RESOURCE_H #define IDI_DEVMGR 100 + #define IDD_HARDWARE 100 +#define IDD_DEVICEGENERAL 101 -/* control IDs *must* match, some windows components - seem to use them... */ +#define IDC_DEVICON 0x57B +#define IDC_DEVNAME 0x57C +#define IDC_DEVTYPE 0x57D +#define IDC_DEVMANUFACTURER 0x57E +#define IDC_DEVLOCATION 0x57F +#define IDC_DEVSTATUSGROUP 0x580 +#define IDC_DEVSTATUS 0x581 +#define IDC_DEVUSAGE 0x582 #define IDC_DEVICES 0x583 #define IDC_LV_DEVICES 0x584 #define IDC_PROPERTIESGROUP 0x585
19 years, 1 month
1
0
0
0
[weiden] 19645: add stub for SetupDiLoadClassIcon
by weiden@svn.reactos.com
add stub for SetupDiLoadClassIcon Modified: trunk/reactos/lib/setupapi/setupapi.spec Modified: trunk/reactos/lib/setupapi/stubs.c _____ Modified: trunk/reactos/lib/setupapi/setupapi.spec --- trunk/reactos/lib/setupapi/setupapi.spec 2005-11-26 16:46:53 UTC (rev 19644) +++ trunk/reactos/lib/setupapi/setupapi.spec 2005-11-26 16:54:15 UTC (rev 19645) @@ -354,7 +354,7 @@ @ stdcall SetupDiInstallDevice(ptr ptr) @ stdcall SetupDiInstallDeviceInterfaces(ptr ptr) @ stdcall SetupDiInstallDriverFiles(ptr ptr) -@ stub SetupDiLoadClassIcon +@ stdcall SetupDiLoadClassIcon(ptr ptr ptr) @ stub SetupDiMoveDuplicateDevice @ stdcall SetupDiOpenClassRegKey(ptr long) @ stdcall SetupDiOpenClassRegKeyExA(ptr long long str ptr) _____ Modified: trunk/reactos/lib/setupapi/stubs.c --- trunk/reactos/lib/setupapi/stubs.c 2005-11-26 16:46:53 UTC (rev 19644) +++ trunk/reactos/lib/setupapi/stubs.c 2005-11-26 16:54:15 UTC (rev 19645) @@ -255,3 +255,13 @@ SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +/********************************************************************** * + * SetupDiLoadClassIcon(SETUPAPI.@) + */ +BOOL WINAPI SetupDiLoadClassIcon(CONST GUID *ClassGuid, HICON *LargeIcon, PINT MiniIconIndex) +{ + FIXME ("Stub %p %p %p\n", ClassGuid, LargeIcon, MiniIconIndex); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +}
19 years, 1 month
1
0
0
0
[sgasiorek] 19644: fixed changing registry value after name
by sgasiorek@svn.reactos.com
fixed changing registry value after name Modified: trunk/reactos/subsys/system/regedit/listview.c _____ Modified: trunk/reactos/subsys/system/regedit/listview.c --- trunk/reactos/subsys/system/regedit/listview.c 2005-11-26 16:39:27 UTC (rev 19643) +++ trunk/reactos/subsys/system/regedit/listview.c 2005-11-26 16:46:53 UTC (rev 19644) @@ -456,6 +456,9 @@ LONG lResult; keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); lResult = RegRenameValue(hKeyRoot, keyPath, Info->item.pszText, lineinfo->name); + if (lineinfo->name) + LocalFree(lineinfo->name); + lineinfo->name = _tcsdup(Info->item.pszText); *Result = TRUE; return (lResult == ERROR_SUCCESS); }
19 years, 1 month
1
0
0
0
[hbirr] 19643: Fix a typo in my last commit.
by hbirr@svn.reactos.com
Fix a typo in my last commit. Modified: trunk/reactos/ntoskrnl/ex/fmutex.c _____ Modified: trunk/reactos/ntoskrnl/ex/fmutex.c --- trunk/reactos/ntoskrnl/ex/fmutex.c 2005-11-26 16:36:18 UTC (rev 19642) +++ trunk/reactos/ntoskrnl/ex/fmutex.c 2005-11-26 16:39:27 UTC (rev 19643) @@ -106,7 +106,7 @@ FASTCALL ExReleaseFastMutex (PFAST_MUTEX FastMutex) { - KIRQL oldIrql; + KIRQL OldIrql; ASSERT_IRQL(APC_LEVEL); /* Erase the owner */
19 years, 1 month
1
0
0
0
← Newer
1
...
12
13
14
15
16
17
18
...
88
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200