Commit graph

60 commits

Author SHA1 Message Date
Ged Murphy 4019caae75 This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes
svn path=/branches/shell32_new-bringup/; revision=51893
2011-05-24 18:40:34 +00:00
Eric Kohl a18c5a8711 [SETUPAPI]
Fix SetupDiCreateDevRegKeyW: When trying to open a devices driver key (DIREG_DRV) the function always created a new driver instance key. The fixed version checks for an existing driver value. If the driver value exists, it opens or creates the driver instance key. If the driver value does not exist, the function generates a new driver instance key and sets a new driver value for the device instance.

svn path=/trunk/; revision=51809
2011-05-17 13:32:12 +00:00
Eric Kohl 5bc8f84475 [SETUPAPI]
- SetupDiCreateDeviceInfoW: Really create a new device instance instead and return its device info data instead of returning the device info data for an existing device.
- Implement SetupDiDeleteDeviceInfo.

svn path=/trunk/; revision=51807
2011-05-17 10:06:36 +00:00
Eric Kohl 66feb11cfe [SETUPAPI]
Rename functions according to the new naming scheme:
  CaptureAndConvertAnsiArg --> pSetupCaptureAndConvertAnsiArg
  CenterWindowRelativeToParent --> pSetupCenterWindowRelativeToParent
  ConcatenatePaths --> pSetupConcatenatePaths
  DuplicateString --> pSetupDuplicateString
  EnablePrivilege --> pSetupEnablePrivilege
  GetVersionInfoFromImage --> pSetupGetVersionInfoFromImage
  IsUserAdmin --> pSetupIsUserAdmin
  MultiByteToUnicode --> pSetupMultiByteToUnicode
  MyGetFileTitle --> pSetupGetFileTitle
  OpenAndMapForRead --> pSetupOpenAndMapForRead
  RegistryDelnode --> pSetupRegistryDelnode
  UnicodeToMultiByte --> pSetupUnicodeToMultiByte
  UnmapAndCloseFile --> pSetupUnmapAndCloseFile

svn path=/trunk/; revision=50915
2011-02-26 21:40:17 +00:00
Roel Messiant 916ec376d6 [SETUPAPI]
- SetupDiClassNameFromGuidExW: Simplify interaction with registry.
- SetupDiCreateDeviceInfoW: Check for correct error value.
- SetupDiGetClassDescriptionExW: Rewrite to return the correct required size and prevent WCHAR sized buffer overflow.
- SetupDiGetClassDevsExW: Return INVALID_HANDLE_VALUE instead of NULL in failure case.

svn path=/trunk/; revision=50272
2011-01-03 00:45:34 +00:00
Roel Messiant 8e7e8f566f [ADVAPI32]
- ConvertStringSidToSidW: Stop writing 1 subauthority too much. Fixes a DWORD sized buffer overflow. Should fix bug #5764.
- ConvertStringSidToSidW: Don't leak an allocated SID in case of failure.
[SETUPAPI]
- SetupDiClassNameFromGuidExW: Rewrite to prevent a buffer overflow and pass additional winetests. Should fix bug #5474.
- SetupDiClassNameFromGuidExA: Return the required buffer size in failure cases.

svn path=/trunk/; revision=50066
2010-12-19 23:19:04 +00:00
Johannes Anderwald 0225179140 [SETUPAPI]
- Implement SetupDiOpenDeviceInterfaceW

svn path=/trunk/; revision=46609
2010-03-31 02:43:57 +00:00
Johannes Anderwald ebf3dfc568 [SETUPAPI]
- Open Device Class with desired access

svn path=/trunk/; revision=46603
2010-03-30 19:43:09 +00:00
Johannes Anderwald f814e48ad5 [SETUPAPI]
- Implement SetupDiInstallDeviceInterfaces, SetupDiCreateDeviceInterfaceRegKeyW which are required to store device specific information

svn path=/trunk/; revision=44644
2009-12-18 04:37:15 +00:00
Stefan Ginsberg 93109445ba - npapi.h: Correct definitions of function pointer prototypes.
- ntifs.h & cmdata.h : Don't use array size of 0. Fixes C4200.
- wdm.h: Correct definition of 64-bit SLIST_HEADER. Add explicit casts to avoid /W4 warnings in RtlEnlargedUnsignedDivide.
- winddk.h: Add MSVC intrinsic __readfsbyte for KeGetCurrentProcessorNumber. Misc fixes.
- Fix various msvc issues in cmd, setupapi, usetup, win32csr, winlogon, msafd, ws2_32 and ext2lib, most notably:
  - cmd & doskey: Don't use fishy gcc extension to allocate variable-sized arrays from the stack. Use the heap instead.
- Disable warning C4733 for mingw_main too (was only done for mingw_wmain previously).
- advapi32: Pass the correct handles to TRACE -- spotted by MSVC.
- Set the specified register in ecx in MSVC versions of Ke386Wrmsr and Ke386Rdmsr instead of reading from/writing to a random MSR. Yay /W4.

svn path=/trunk/; revision=42342
2009-08-02 17:38:27 +00:00
Dmitry Chapyshev 2794a2eba0 - Add SEH protection at memory copying. Fixes crash at "setupapi_winetest devinst"
svn path=/trunk/; revision=42064
2009-07-18 19:22:12 +00:00
Johannes Anderwald 2a1067133d - SetupDiOpenClassRegKeyExW should ERROR_INVALID_CLASS when it fails
- TODO: NtOpenKey should fail when acessMask == 0 and a registry path is passed

svn path=/trunk/; revision=41422
2009-06-16 08:04:08 +00:00
Sylvain Petreolle 758a04d9d9 Fix 2 setupapi:devclass tests
svn path=/trunk/; revision=41072
2009-05-23 12:58:12 +00:00
Sylvain Petreolle 89f8b1a58a Stub CMP_UnregisterNotification
Move SETUP_CreateDevicesList declaration to setupapi_private.h

svn path=/trunk/; revision=40758
2009-05-01 07:44:13 +00:00
Christoph von Wittich df9a63f55e import SetupEnumInfSectionsA/W from wine
fixes setupapi parser winetest crash

svn path=/trunk/; revision=40599
2009-04-19 23:08:05 +00:00
Hervé Poussineau ae4881eaf5 Don't directly call NtPlugPlayControl from setupapi, and replace it by RPC
As a bonus, setupapi is now (theorically) able to restart devices on remote machines
See issue #4400 for more details.

svn path=/trunk/; revision=40594
2009-04-19 21:36:59 +00:00
Christoph von Wittich 4c3c1deeda fix some setupapi winetests
svn path=/trunk/; revision=40535
2009-04-15 21:19:48 +00:00
Michael Martin e28ed99f1b - Implement SetupDiSetDeviceInstallParamsA.
svn path=/trunk/; revision=38494
2008-12-31 22:01:58 +00:00
Christoph von Wittich b13cfee486 return correct value in SETUPAPI_GetCurrentHwProfile
Fix for Coverity error CID: 782

svn path=/trunk/; revision=36434
2008-09-23 18:44:58 +00:00
Hervé Poussineau 8b072734a8 Simplify SetupDiSetDeviceRegistryPropertyW/SetupDiGetDeviceRegistryPropertyW
Misc cleanup

svn path=/trunk/; revision=32265
2008-02-10 14:37:19 +00:00
Hervé Poussineau 327cd0f9bc Shuffle functions to look more like in Wine.
Add a few stubs

svn path=/trunk/; revision=31860
2008-01-18 11:51:01 +00:00
Christoph von Wittich 563fc21e30 fix a typo
svn path=/trunk/; revision=31122
2007-12-10 12:21:51 +00:00
Hervé Poussineau 5800eb6a82 Rename variables
svn path=/trunk/; revision=30330
2007-11-10 15:47:01 +00:00
Hervé Poussineau 019b7e82cd Limit machine name size
Implement SetupDiGetDeviceInfoListDetailA
Rework SetupDiGetDeviceInfoListDetailW

svn path=/trunk/; revision=30329
2007-11-10 15:44:16 +00:00
Hervé Poussineau 6ec1d71d50 Rework SetupDiOpenDevRegKey
svn path=/trunk/; revision=30327
2007-11-10 15:11:56 +00:00
Hervé Poussineau 040332c006 Add a stub for SetupDiDeleteDevRegKey
svn path=/trunk/; revision=30325
2007-11-10 14:07:45 +00:00
Hervé Poussineau c39ceb22e6 Rename SETUP_DEV_INFO_SET_MAGIC to SETUP_DEVICE_INFO_SET_MAGIC
Rename struct DeviceInfoElement to struct DeviceInfo
Add a link to DeviceInfoSet in each DeviceInfo structure (not used yet)

svn path=/trunk/; revision=30324
2007-11-10 14:04:55 +00:00
Ged Murphy cc461f5920 preset in case of failure
svn path=/trunk/; revision=28858
2007-09-04 20:28:44 +00:00
Ged Murphy 8f7e520058 - read ClassGUID from the registry instead of sending GUID_NULL
- fixes part of SetupDiOpenDeviceInfo which now allows loading of icons in the devmgr.dll property sheets

svn path=/trunk/; revision=28855
2007-09-04 20:18:39 +00:00
Hervé Poussineau 1cda0af518 Merge SetupGetFileCompressionInfo[Ex]A/W, SetupDecompressOrCopyFileA/W, SetupGetSourceFileLocationA/W, SetupGetSourceInfoA/W, SetupGetTargetPathA/W, SetupQueryInfOriginalFileInformationA/W from Wine
Misc fixes by me and Wine team

svn path=/trunk/; revision=27896
2007-07-27 09:02:18 +00:00
Hervé Poussineau 8b7099f2cd Specify W suffix when possible
Don't allocate unneeded memory in SetupDiCreateDeviceInfoListExW
Replace strings by array of WCHARs

svn path=/trunk/; revision=26876
2007-05-23 21:40:46 +00:00
Dmitry Gorbachev 4b61211e6d - Do not write beyond the buffer.
svn path=/trunk/; revision=26553
2007-04-28 04:10:19 +00:00
Hervé Poussineau 29f298cd86 Add stubs for SetupDiGetClassInstallParamsA/W
Support SetupDiSetClassInstallParams(DIF_ADDPROPERTYPAGE_ADVANCED)

svn path=/trunk/; revision=26074
2007-03-14 12:29:18 +00:00
Hervé Poussineau 3dce4b0486 Read object security descriptors from .inf file. Apply them for registry keys and services and display a message for files
svn path=/trunk/; revision=24493
2006-10-12 09:01:16 +00:00
Hervé Poussineau 3f47783c54 Implement SetupDiGetDriverInstallParamsW
Add support for DI_FLAGSEX_INSTALLEDDRIVER

svn path=/trunk/; revision=24322
2006-09-30 20:42:47 +00:00
Hervé Poussineau 07f8340c15 Use Guid specified in device info set (if available) in SetupDiGetClassDevsExW.
Update some documentation (taken from Wine)

svn path=/trunk/; revision=23999
2006-09-09 17:10:51 +00:00
Hervé Poussineau 67950a1150 Handle MachineName parameter in SetupDiCreateDeviceInfoListExW
Eric, can you take care of the change in CM_Connect_MachineW?

svn path=/trunk/; revision=22449
2006-06-21 09:00:17 +00:00
Hervé Poussineau d5e40a314e Fix indentation in SetupDiCreateDeviceInfoListExW
Fix 2 architecture extension constants

svn path=/trunk/; revision=22446
2006-06-21 07:52:19 +00:00
Hervé Poussineau 7e07a60d3a Allocate buffer for system directory on heap instead of stack
svn path=/trunk/; revision=22273
2006-06-07 17:30:06 +00:00
Hervé Poussineau 7b66dbbc92 Extract some code from devinst.c to new files: devclass.c (device class functions), driver.c (Driver install/enumeration functions), interface.c (Interface install/enumeration functions)
devinst.c is now 123 Kb instead of 285 Kb.
No code change.

svn path=/trunk/; revision=22172
2006-06-02 09:06:05 +00:00
Hervé Poussineau 4123274547 If the section name contained a dot, sometimes the right section to install was not found
svn path=/trunk/; revision=22150
2006-06-01 17:08:28 +00:00
Hervé Poussineau e7b716926f Fix installation from default directory (%SYSTEMROOT%\Inf).
Thanks WaxDragon for reporting.

svn path=/trunk/; revision=22118
2006-05-30 16:05:27 +00:00
Hervé Poussineau 05875a2c6d - Implement SetupCopyOEMInfW
- Correctly sort drivers by rank and by date
- Fix memory corruption if %SYSTEMROOT% was longer than 128 chars

svn path=/trunk/; revision=22109
2006-05-29 13:32:51 +00:00
Hervé Poussineau 9d5ecbef5d SP_DRVINFO_DETAIL_DATA_W.InfFileName must contain the full file name
Add SetupDiSelectDevice stub

svn path=/trunk/; revision=22103
2006-05-29 11:03:24 +00:00
Hervé Poussineau e798908f7e Fix some whitespaces
Change swprintf by sprintfW

svn path=/trunk/; revision=22101
2006-05-29 08:55:08 +00:00
Hervé Poussineau 2a99309f16 Keep minimal amount of differences with Wine code
Remove useless files

svn path=/trunk/; revision=22091
2006-05-28 19:20:19 +00:00
Hervé Poussineau 3b00b0a2fe Rewrite SetupDiGetActualSectionToInstallExW:
- Do less lookups in section names list
- Take care of possible ProductType and SuiteMask fields in section names 

svn path=/trunk/; revision=22087
2006-05-28 16:44:52 +00:00
Hervé Poussineau ed2b9d396c Search driver files in the same directory as the .inf file
svn path=/trunk/; revision=22086
2006-05-28 12:35:20 +00:00
Hervé Poussineau 919b2cb62d - Fix installation of INF sections including a section of the same name in another INF file
- Remove some tests to NULL before HeapFree calls

svn path=/trunk/; revision=21888
2006-05-11 16:56:00 +00:00
Hervé Poussineau fac26bda0c Patch by Thomas Weidermueller (w3seek at reactos dot com)
- Fix some parameter names and IN/OUT/OPTIONAL

svn path=/trunk/; revision=21859
2006-05-08 21:32:36 +00:00