Questions tagged [setupapi]

SetupAPI is a Win32API that is used for installing device drivers and in enumerating existing devices on a Windows computer.

SetupAPI is a Win32API that is used for installing device drivers and in enumerating existing devices on a Windows computer.

116 questions
0
votes
1 answer

Get the currently "Active" driver for a device in C++

I have used SetupAPI to enumerate all the drivers, build a list of its properties etc etc. But what i want is to enumerate only the "Active" drivers for any device. Eg. For a Intel HD 5500, There are a couple of drivers installed in the System with…
Suraj S
  • 1,019
  • 7
  • 18
0
votes
0 answers

Error code 122 using SetupDiGetDeviceRegistryPropertyW to get the required size

I want to get the Device ID of a USB stick by using the Setup API, but first I am trying to understand some of the functions I have to use. The SetupDiGetDeviceRegistryProperty documentation says I can send NULL to the buffer and buffer size to get…
Sergio Calderon
  • 837
  • 1
  • 13
  • 32
0
votes
0 answers

Error in DiInstallDevice, InstallSelectedDriver - ERROR_NO_CATALOG_FOR_OEM_INF

Okay, So I am getting this weird error stating "ERROR_NO_CATALOG_FOR_OEM_INF" whenever I call DiInstallDevice, InstallSelectedDriver. The error code returned is 3758096943. When I look it up in err.exe, it says # for decimal -536870353 / hex…
Suraj S
  • 1,019
  • 7
  • 18
0
votes
2 answers

Converting DriverVersion to Human readable format

I have searched high and low for it, could not find any documentation, I am able to get the DriverVersion as described Here. Creating and enumerating the device drives is working so there is no need to look there. The DriverVersion is a type of…
Suraj S
  • 1,019
  • 7
  • 18
0
votes
1 answer

How enumerate all device objects?

Sorry for my English. I want to enumerate all pointers to the DEVICE_OBJECT's in the system. I know that this can be done from the user mode, but I forgot. May be with helping of ZwQueryDirectiryObject or SetupAPI..?
sxm
  • 1
0
votes
0 answers

How to determine the right inf file for installation of printer driver

I'm writing a C++ Code to automate printer driver installation. I use the following functions to achieve installation from the inf file. UploadPrinterDriverPackageA(NULL,infPath.c_str(),"Windows NT…
itzuvid
  • 81
  • 1
  • 7
0
votes
1 answer

Using Setup Api to enumerate monitors pnp device ids

For my program I need to get detailed information about the current displays. In my research I came across this post with talks about linking the System.Windows.Forms.Screen class and its EDID information. At first I tried copying and pasting the…
0
votes
1 answer

How to Retrieve the Rollback driver node strong name?

I want to retrieve the Rollback driver node strong name device property from device manager . Attached image for reference . How can i do that programmatically ?
0
votes
1 answer

Win32 API to modify network interface properties

I was unable to find a Win32 API to modify network interface properties. By "network interface properties" I mean properties, which can be set using the "network connections" panel in the System control panel manually or using "netsh interface" from…
Cybran
  • 2,203
  • 2
  • 17
  • 34
0
votes
0 answers

Distinguish smart card readers of the same type

I have an app that uses a smart card reader. A user may have several identical readers, and their system names, as returned by SCardListReaders, differ in number suffix, for instance "OMNIKEY CardMan 5x21 0" and "OMNIKEY CardMan 5x21 1". User can…
Dialecticus
  • 16,400
  • 7
  • 43
  • 103
0
votes
1 answer

Enabling / Disabling a Hardware Device in Windows using C#

I am working on a project that requires me to check for a disabled device in Windows and if that device is found disabled, the program should enable it. I have been using the following solution from a previous answer.. How do I disable a system…
tastydew
  • 677
  • 8
  • 21
0
votes
0 answers

c#-Call SetupDiGetDriverInfoDetail API to get driver info but pop up error

I'm using setup.api in c#. There are all work successfully but SetupDiGetDriverInfoDetail. When the program execute this line, it will pop up the exception message SetupDiGetDriverInfoDetail' has unbalanced the stack. This is likely because the…
David Shen
  • 75
  • 1
  • 5
0
votes
0 answers

How to get com ports of usb device using setupapi?

I need to determine number of modems com ports. Modem is usb device. To accomplish this I need Detect attached modem GUID usbGuid = { 0xA5DCBF10L, 0x6530, 0x11D2, { 0x90, 0x1F, 0x00, 0xC0, 0x4F, 0xB9, 0x51, 0xED } }; HDEVINFO hDevInfo =…
FunctorPrototype
  • 1,173
  • 2
  • 12
  • 24
0
votes
1 answer

SetupAPI.DLL to HID.DLL

Using SetupAPI I execute the function SetupDiGetClassDevs and get a pointer or a handle. Then I start a loop and run: Return = SetupDiEnumDeviceInterfaces(); with SP_DEVICE_INTERFACE_DATA.cbSize = 0 to get the size that SP_DEVICE_INTERFACE_DATA…
lexdean
  • 151
  • 1
  • 2
  • 13
0
votes
1 answer

How to retrieve the vendor and product ID's using the SetupDiGetDeviceInterfaceDetail API

I'm trying to find the vendor id and the product id of a USB card. For this purpose, I use setupapi.dll. In my code, I use the SetupDiGetDeviceInterfaceDetail call twice and on the second time, the function returns true with no error, but I don't…
boboch
  • 63
  • 2
  • 7