Hi, I don’t know what I’m doing wrong. As far as I know I have all the prerequisites. I will try reinstalling/repairing them all, but I get this error message:
Error Calling SetupDiGetDeviceRegistryPropertyW: 122
This is for GTA 5, I have tried both the X86 and x64, this is on x64, which I believe the game to be.
Is there anything I’m missing? Please help 
I’ve also tested administrator privelege and compatability.
The exception text seems to be related to the program, but I’m unsure of what it means.
Details:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.Exception: Error calling SetupDiGetDeviceRegistryPropertyW: 122
at JocysCom.ClassLibrary.IO.DeviceDetector.GetStringPropertyForDevice(IntPtr deviceInfoSet, SP_DEVINFO_DATA deviceInfoData, SPDRP propId)
at JocysCom.ClassLibrary.IO.DeviceDetector.GetVidPidRev(IntPtr deviceInfoSet, SP_DEVINFO_DATA deviceInfoData, UInt32& vid, UInt32& pid, UInt32& rev)
at JocysCom.ClassLibrary.IO.DeviceDetector.GetDeviceInfo(IntPtr deviceInfoSet, SP_DEVINFO_DATA deviceInfoData, String deviceId)
at JocysCom.ClassLibrary.IO.DeviceDetector.GetDevices(Guid classGuid, DIGCF flags, String deviceId, Int32 vid, Int32 pid, Int32 rev)
at x360ce.App.MainForm.RefreshCurrentInstances(Boolean forceReload)
at x360ce.App.MainForm.UpdateForm3()
at x360ce.App.MainForm.UpdateTimer_Elapsed(Object sender, ElapsedEventArgs e)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2600.0 built by: NET471REL1LAST
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
x360ce
Assembly Version: 3.2.10.82
Win32 Version: 3.2.10.82
CodeBase: file:///D:/Games/Steam/steamapps/common/Grand%20Theft%20Auto%20V/x360ce_x64.exe
----------------------------------------
System.Configuration.Install
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration.Install/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.Install.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2600.0 built by: NET471REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
SharpDX.DirectInput
Assembly Version: 2.6.3.0
Win32 Version: 3.2.10.82
CodeBase: file:///D:/Games/Steam/steamapps/common/Grand%20Theft%20Auto%20V/x360ce_x64.exe
----------------------------------------
SharpDX
Assembly Version: 2.6.3.0
Win32 Version: 3.2.10.82
CodeBase: file:///D:/Games/Steam/steamapps/common/Grand%20Theft%20Auto%20V/x360ce_x64.exe
----------------------------------------
x360ce.Engine
Assembly Version: 1.0.0.0
Win32 Version: 3.2.10.82
CodeBase: file:///D:/Games/Steam/steamapps/common/Grand%20Theft%20Auto%20V/x360ce_x64.exe
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data.Entity
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Data.Entity/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Entity.dll
----------------------------------------
System.Runtime.Serialization
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.ComponentModel.DataAnnotations
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_64/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Microsoft.GeneratedCode
Assembly Version: 1.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
vJoyInterfaceWrap
Assembly Version: 0.2.0.5
Win32 Version: 3.2.10.82
CodeBase: file:///D:/Games/Steam/steamapps/common/Grand%20Theft%20Auto%20V/x360ce_x64.exe
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2556.0 built by: NET471REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Содержание
- Error SetupDiGetDeviceRegistryPropertyW: 122 #830
- Comments
- 4.9.0 — Mouse and keyboard stopped responding #940
- Comments
- Footer
- Код ошибки 122 с использованием SetupDiGetDeviceRegistryPropertyW для получения требуемого размера
- SetupDiGetDeviceRegistryPropertyA function (setupapi.h)
- Syntax
- Parameters
- SPDRP_ADDRESS
- SPDRP_BUSNUMBER
- SPDRP_BUSTYPEGUID
- SPDRP_CAPABILITIES
- SPDRP_CHARACTERISTICS
- SPDRP_CLASS
- SPDRP_CLASSGUID
- SPDRP_COMPATIBLEIDS
- SPDRP_CONFIGFLAGS
- SPDRP_DEVICE_POWER_DATA
- SPDRP_DEVICEDESC
- SPDRP_DEVTYPE
- SPDRP_DRIVER
- SPDRP_ENUMERATOR_NAME
- SPDRP_EXCLUSIVE
- SPDRP_FRIENDLYNAME
- SPDRP_HARDWAREID
- SPDRP_INSTALL_STATE
- SPDRP_LEGACYBUSTYPE
- SPDRP_LOCATION_INFORMATION
- SPDRP_LOCATION_PATHS
- SPDRP_LOWERFILTERS
- SPDRP_MFG
- SPDRP_PHYSICAL_DEVICE_OBJECT_NAME
- SPDRP_REMOVAL_POLICY
- SPDRP_REMOVAL_POLICY_HW_DEFAULT
- SPDRP_REMOVAL_POLICY_OVERRIDE
- SPDRP_SECURITY
- SPDRP_SECURITY_SDS
- SPDRP_SERVICE
- SPDRP_UI_NUMBER
- SPDRP_UI_NUMBER_DESC_FORMAT
- SPDRP_UPPERFILTERS
- Return value
- Remarks
Error SetupDiGetDeviceRegistryPropertyW: 122 #830
Hi, I don’t know what I’m doing wrong. As far as I know I have all the prerequisites. I will try reinstalling/repairing them all, but I get this error message:
Error Calling SetupDiGetDeviceRegistryPropertyW: 122
This is for GTA 5, I have tried both the X86 and x64, this is on x64, which I believe the game to be.
Is there anything I’m missing? Please help 🙂 I tried looking this up and haven’t found anything similar, but I might have not looked hard enough and if so I’m sorry for asking again.
I’ve also tested administrator privelege and compatability.
The exception text seems to be related to the program, but I’m unsure of what it means.
Details:
The text was updated successfully, but these errors were encountered:
Try new version from here: #818
Thank you for fixing my comment, and thank you for your help. It seems the new version has fixed my issue. It doesn’t like being open on one of my monitors but that’s okay. You’re awesome 🙂
Still not working brother. before somedays it was working well and goo. please help
I have the same problem then I downloaded the older version (more stable) of x360ce from here check this out! https://steamcommunity.com/sharedfiles/filedetails/?id=859052855
@EJocys
This seems to be problem in in this function:
private static string GetStringPropertyForDevice ( IntPtr deviceInfoSet , SP_DEVINFO_DATA deviceInfoData , SPDRP propId )
Error 122 is ERROR_INSUFFICIENT_BUFFER, so it seems buffer is too small . try to add sizeof current char type.
An older version of x360ce, 4.10.0.0 solved Error SetupDiGetDeviceRegistryPropertyW: 122 for me:
@EJocys
Cela semble être un problème dans cette fonction:
private static string GetStringPropertyForDevice ( IntPtr deviceInfoSet , SP_DEVINFO_DATA deviceInfoData , SPDRP propId )
L’erreur 122 est ERROR_INSUFFICIENT_BUFFER, il semble donc que la mémoire tampon est trop petite . essayez d’ajouter la taille du type de caractère actuel.
Bonjour, comment faire donc pour libérer la mémoire tampon?
@EJocys
if (outsize > 0) should be before var buffer = new byte[outsize]; because is outsize is 0 there .
It was fixed in v4.13.41.0 (2020-09-10) i.e. code returns empty string if no description:
Try XOutput. It’ll save you the stress.
It was fixed in v4.13.41.0 (2020-09-10) i.e. code returns empty string if no description:
@EJocys , Its an old topic, but can you also make the fix for version 3.2 ?
latest version 4 works correct on my Pinball Cabinet, but my front end doesn’t want to work with it.
Version 3.2 always worked, but properly with a Windows update it screwed something and not able to use the xinput1_x.dll anymore.
I tried to completly reinstall my cabinet with W11 and add all your dependencies, but after pluging in my pinscape controller I directly get the error «system.Exception: Error calling SetupDiGetDeviceRegistryPropertyW: 122»
Or is this something I can check/fix in registry as well ?
I hope you can fix this, or point me to the regkey where I can make a manual fix
122 is ERROR_INSUFFICIENT_BUFFER — this can happen, and this is normal operation — SetupDiGetDeviceRegistryPropertyW will return then required buffer size in RequiredSize argument.
In most cases apps will call this 2 times — one to get the size and secund one to data.
I think i see a problem:
var buffer = new byte[requiredSize];
buffer is to smal as it is WCHAR, you need to multiply it by char type size @EJocys
Источник
4.9.0 — Mouse and keyboard stopped responding #940
Nice work with the software, thanks.
I don’t know if it’s a coincidence or not, but I’ve just downloaded 4.9.0 and, shortly after I’ve opened it (and, I don’t know if it’s relevant, tried to move it to another monitor), my mouse and keyboard stopped answering completely. My mouse light even turned off. I thought the PC had frozen and I restarted it without messing with the USB connections or anything, as soon as it started rebooting the mouse’s light and the keyboard was working again.
I’m now downloading the 3.x version, I might try 4.X again later and post here if it happens again.
Just to let you know.
The text was updated successfully, but these errors were encountered:
Also not sure if it’s relevant, but this popped up as soon as I opened 3.x:
Connected on USB:
- Mouse Razer Abyssus
- Keyboard and Mouse Wireless Kit Logitech K270
- Steering Wheel Logitech Driving Force EX
Yes, it happened again. Just opened 4.x to test and same thing happened.
It starts out alright, but shortly after the inputs become readonly , the mouse/keyboard freezes, left me with a reboot as only option.
In 3.X, even though that exception pops up (which doesn’t happen on 4.x), mouse and keyboard does not freeze.
Hey buddy, I can do a TeamViewer session if would like, just let me know.
Same for me. 3.x versions still works with old games, though.
Mouse — Steelseries Sensei [RAW]
Logitech K220 (keyboard and mouse with one radio)
Pads — some noname chinese twin joysticks. two pads with one radio.
Seems like something wrong with logitech devices. With only steelseries mouse and joysticks works fine
After having configured joystick I connected logitech kb and everything worked fine
@sniper02z I use a Logitech K270 keyboard and a Razer Abyssus mouse
So, have you tried to run the program with uplugged logitech keyboard?
User error / has masked the wrong devices with hid guardian.
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Код ошибки 122 с использованием SetupDiGetDeviceRegistryPropertyW для получения требуемого размера
Я хочу получить идентификатор устройства USB-накопителя с помощью Setup API, но сначала я пытаюсь понять некоторые функции, которые мне нужно использовать. В документации SetupDiGetDeviceRegistryProperty сказано, что я могу отправить NULL в буфер и размер буфера, чтобы получить требуемый размер, но я получаю код ошибки 122 , что означает:
The data area passed to a system call is too small
Кто-нибудь может сказать мне, что я делаю не так?
Предполагается, что с этой ошибкой произойдет сбой. Теперь вы знаете requiredSize, поэтому вы выделяете буфер, достаточно большой, чтобы вызвать его снова, теперь передавая значение, отличное от NULL, для 5-го аргумента. Особенность, а не ошибка.
Чтобы добавить к тому, что сказал @HansPassant, это довольно распространенный шаблон Windows API. Предположим, что вместо передачи NULL и нуля вы передали действительный указатель и длину 200 но запрошенным данным требовали 400 байтов. Вы получите ту же ошибку «слишком малая», а для requiredSize будет установлено значение 400. Передача NULL и нуля — это просто простой способ вызвать эту ошибку, поэтому вы получите набор переменных requiredSize .
Ох, я понял. Я думал, что получу другой код ошибки в результате, когда он будет вызван с NULL и 0 . Большое спасибо, тогда никаких ошибок.
Возможно, вы слишком поздно звоните в GetLastError . Вам нужно вызвать его сразу после входа в состояние, в котором он возвращает значимое значение, и не позже.
@IInspectable, не могли бы вы показать мне, куда мне положить GetLastError ?
Сделайте это единым заявлением и переместите его за пределы ваших вызовов fwprintf .
Источник
SetupDiGetDeviceRegistryPropertyA function (setupapi.h)
The SetupDiGetDeviceRegistryProperty function retrieves a specified Plug and Play device property.
Syntax
Parameters
A handle to a device information set that contains a device information element that represents the device for which to retrieve a Plug and Play property.
A pointer to an SP_DEVINFO_DATA structure that specifies the device information element in DeviceInfoSet.
One of the following values that specifies the property to be retrieved:
SPDRP_ADDRESS
The function retrieves the device’s address.
SPDRP_BUSNUMBER
The function retrieves the device’s bus number.
SPDRP_BUSTYPEGUID
The function retrieves the GUID for the device’s bus type.
SPDRP_CAPABILITIES
The function retrieves a bitwise OR of the following CM_DEVCAP_Xxx flags in a DWORD. The device capabilities that are represented by these flags correspond to the device capabilities that are represented by the members of the DEVICE_CAPABILITIES structure. The CM_DEVCAP_Xxx constants are defined in Cfgmgr32.h.
| CM_DEVCAP_Xxx flag | Corresponding DEVICE_CAPABILITIES structure member |
|---|---|
| CM_DEVCAP_LOCKSUPPORTED | LockSupported |
| CM_DEVCAP_EJECTSUPPORTED | EjectSupported |
| CM_DEVCAP_REMOVABLE | Removable |
| CM_DEVCAP_DOCKDEVICE | DockDevice |
| CM_DEVCAP_UNIQUEID | UniqueID |
| CM_DEVCAP_SILENTINSTALL | SilentInstall |
| CM_DEVCAP_RAWDEVICEOK | RawDeviceOK |
| CM_DEVCAP_SURPRISEREMOVALOK | SurpriseRemovalOK |
| CM_DEVCAP_HARDWAREDISABLED | HardwareDisabled |
| CM_DEVCAP_NONDYNAMIC | NonDynamic |
В
SPDRP_CHARACTERISTICS
The function retrieves a bitwise OR of a device’s characteristics flags in a DWORD. For a description of these flags, which are defined in Wdm.h and Ntddk.h, see the DeviceCharacteristics parameter of the IoCreateDevice function.
SPDRP_CLASS
The function retrieves a REG_SZ string that contains the device setup class of a device.
SPDRP_CLASSGUID
The function retrieves a REG_SZ string that contains the GUID that represents the device setup class of a device.
SPDRP_COMPATIBLEIDS
The function retrieves a REG_MULTI_SZ string that contains the list of compatible IDs for a device. For information about compatible IDs, see Device Identification Strings.
SPDRP_CONFIGFLAGS
The function retrieves a bitwise OR of a device’s configuration flags in a DWORD value. The configuration flags are represented by the CONFIGFLAG_Xxx bitmasks that are defined in Regstr.h.
SPDRP_DEVICE_POWER_DATA
(Windows XP and later) The function retrieves a CM_POWER_DATA structure that contains the device’s power management information.
SPDRP_DEVICEDESC
The function retrieves a REG_SZ string that contains the description of a device.
SPDRP_DEVTYPE
The function retrieves a DWORD value that represents the device’s type. For more information, see Specifying Device Types.
SPDRP_DRIVER
The function retrieves a string that identifies the device’s software key (sometimes called the driver key). For more information about driver keys, see Registry Trees and Keys for Devices and Drivers.
SPDRP_ENUMERATOR_NAME
The function retrieves a REG_SZ string that contains the name of the device’s enumerator.
SPDRP_EXCLUSIVE
The function retrieves a DWORD value that indicates whether a user can obtain exclusive use of the device. The returned value is one if exclusive use is allowed, or zero otherwise. For more information, see IoCreateDevice.
SPDRP_FRIENDLYNAME
The function retrieves a REG_SZ string that contains the friendly name of a device.
SPDRP_HARDWAREID
The function retrieves a REG_MULTI_SZ string that contains the list of hardware IDs for a device. For information about hardware IDs, see Device Identification Strings.
SPDRP_INSTALL_STATE
(Windows XP and later) The function retrieves a DWORD value that indicates the installation state of a device. The installation state is represented by one of the CM_INSTALL_STATE_Xxx values that are defined in Cfgmgr32.h. The CM_INSTALL_STATE_Xxx values correspond to the DEVICE_INSTALL_STATE enumeration values.
SPDRP_LEGACYBUSTYPE
The function retrieves the device’s legacy bus type as an INTERFACE_TYPE value (defined in Wdm.h and Ntddk.h).
SPDRP_LOCATION_INFORMATION
The function retrieves a REG_SZ string that contains the hardware location of a device.
SPDRP_LOCATION_PATHS
(Windows Server 2003 and later) The function retrieves a REG_MULTI_SZ string that represents the location of the device in the device tree.
SPDRP_LOWERFILTERS
The function retrieves a REG_MULTI_SZ string that contains the names of a device’s lower-filter drivers.
SPDRP_MFG
The function retrieves a REG_SZ string that contains the name of the device manufacturer.
SPDRP_PHYSICAL_DEVICE_OBJECT_NAME
The function retrieves a REG_SZ string that contains the name that is associated with the device’s PDO. For more information, see IoCreateDevice.
SPDRP_REMOVAL_POLICY
(Windows XP and later) The function retrieves the device’s current removal policy as a DWORD that contains one of the CM_REMOVAL_POLICY_Xxx values that are defined in Cfgmgr32.h.
SPDRP_REMOVAL_POLICY_HW_DEFAULT
(Windows XP and later) The function retrieves the device’s hardware-specified default removal policy as a DWORD that contains one of the CM_REMOVAL_POLICY_Xxx values that are defined in Cfgmgr32.h.
SPDRP_REMOVAL_POLICY_OVERRIDE
(Windows XP and later) The function retrieves the device’s override removal policy (if it exists) from the registry, as a DWORD that contains one of the CM_REMOVAL_POLICY_Xxx values that are defined in Cfgmgr32.h.
SPDRP_SECURITY
The function retrieves a SECURITY_DESCRIPTOR structure for a device.
SPDRP_SECURITY_SDS
The function retrieves a REG_SZ string that contains the device’s security descriptor. For information about security descriptor strings, see Security Descriptor Definition Language (Windows). For information about the format of security descriptor strings, see Security Descriptor Definition Language (Windows).
SPDRP_SERVICE
The function retrieves a REG_SZ string that contains the service name for a device.
SPDRP_UI_NUMBER
The function retrieves a DWORD value set to the value of the UINumber member of the device’s DEVICE_CAPABILITIES structure.
SPDRP_UI_NUMBER_DESC_FORMAT
The function retrieves a format string (REG_SZ) used to display the UINumber value.
SPDRP_UPPERFILTERS
The function retrieves a REG_MULTI_SZ string that contains the names of a device’s upper filter drivers.
[out, optional] PropertyRegDataType
A pointer to a variable that receives the data type of the property that is being retrieved. This is one of the standard registry data types. This parameter is optional and can be NULL.
[out, optional] PropertyBuffer
A pointer to a buffer that receives the property that is being retrieved. If this parameter is set to NULL, and PropertyBufferSize is also set to zero, the function returns the required size for the buffer in RequiredSize.
The size, in bytes, of the PropertyBuffer buffer.
[out, optional] RequiredSize
A pointer to a variable of type DWORD that receives the required size, in bytes, of the PropertyBuffer buffer that is required to hold the data for the requested property. This parameter is optional and can be NULL.
Return value
SetupDiGetDeviceRegistryProperty returns TRUE if the call was successful. Otherwise, it returns FALSE and the logged error can be retrieved by making a call to GetLastError. SetupDiGetDeviceRegistryProperty returns the ERROR_INVALID_DATA error code if the requested property does not exist for a device or if the property data is not valid.
The setupapi.h header defines SetupDiGetDeviceRegistryProperty as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Источник
Error SetupDiGetDeviceRegistryPropertyW: 122 #830
Comments
Psychophage commented Jul 17, 2018 •
Hi, I don’t know what I’m doing wrong. As far as I know I have all the prerequisites. I will try reinstalling/repairing them all, but I get this error message:
Error Calling SetupDiGetDeviceRegistryPropertyW: 122
This is for GTA 5, I have tried both the X86 and x64, this is on x64, which I believe the game to be.
Is there anything I’m missing? Please help 🙂 I tried looking this up and haven’t found anything similar, but I might have not looked hard enough and if so I’m sorry for asking again.
I’ve also tested administrator privelege and compatability.
The exception text seems to be related to the program, but I’m unsure of what it means.
Details:
The text was updated successfully, but these errors were encountered:
Nucleoprotein commented Jul 17, 2018
Try new version from here: #818
Psychophage commented Jul 18, 2018
Thank you for fixing my comment, and thank you for your help. It seems the new version has fixed my issue. It doesn’t like being open on one of my monitors but that’s okay. You’re awesome 🙂
tushup commented Nov 17, 2018
Still not working brother. before somedays it was working well and goo. please help
Redigo21 commented Mar 11, 2019 •
I have the same problem then I downloaded the older version (more stable) of x360ce from here check this out! https://steamcommunity.com/sharedfiles/filedetails/?id=859052855
Nucleoprotein commented Mar 11, 2019
@EJocys
This seems to be problem in in this function:
private static string GetStringPropertyForDevice ( IntPtr deviceInfoSet , SP_DEVINFO_DATA deviceInfoData , SPDRP propId )
Error 122 is ERROR_INSUFFICIENT_BUFFER, so it seems buffer is too small . try to add sizeof current char type.
gamerpoweredup commented Jun 15, 2020
An older version of x360ce, 4.10.0.0 solved Error SetupDiGetDeviceRegistryPropertyW: 122 for me:
lamedvedevaise commented Oct 31, 2020
@EJocys
Cela semble être un problème dans cette fonction:
private static string GetStringPropertyForDevice ( IntPtr deviceInfoSet , SP_DEVINFO_DATA deviceInfoData , SPDRP propId )
L’erreur 122 est ERROR_INSUFFICIENT_BUFFER, il semble donc que la mémoire tampon est trop petite . essayez d’ajouter la taille du type de caractère actuel.
Bonjour, comment faire donc pour libérer la mémoire tampon?
Nucleoprotein commented Oct 31, 2020
@EJocys
if (outsize > 0) should be before var buffer = new byte[outsize]; because is outsize is 0 there .
EJocys commented Oct 31, 2020
It was fixed in v4.13.41.0 (2020-09-10) i.e. code returns empty string if no description:
olusegvn commented Apr 13, 2022
Try XOutput. It’ll save you the stress.
MikedaSpike commented Nov 20, 2022
It was fixed in v4.13.41.0 (2020-09-10) i.e. code returns empty string if no description:
@EJocys , Its an old topic, but can you also make the fix for version 3.2 ?
latest version 4 works correct on my Pinball Cabinet, but my front end doesn’t want to work with it.
Version 3.2 always worked, but properly with a Windows update it screwed something and not able to use the xinput1_x.dll anymore.
I tried to completly reinstall my cabinet with W11 and add all your dependencies, but after pluging in my pinscape controller I directly get the error «system.Exception: Error calling SetupDiGetDeviceRegistryPropertyW: 122»
Or is this something I can check/fix in registry as well ?
I hope you can fix this, or point me to the regkey where I can make a manual fix
Nucleoprotein commented Nov 20, 2022
122 is ERROR_INSUFFICIENT_BUFFER — this can happen, and this is normal operation — SetupDiGetDeviceRegistryPropertyW will return then required buffer size in RequiredSize argument.
In most cases apps will call this 2 times — one to get the size and secund one to data.
I think i see a problem:
var buffer = new byte[requiredSize];
buffer is to smal as it is WCHAR, you need to multiply it by char type size @EJocys
Источник
4.9.0 — Mouse and keyboard stopped responding #940
Comments
Luc45 commented May 5, 2019
Nice work with the software, thanks.
I don’t know if it’s a coincidence or not, but I’ve just downloaded 4.9.0 and, shortly after I’ve opened it (and, I don’t know if it’s relevant, tried to move it to another monitor), my mouse and keyboard stopped answering completely. My mouse light even turned off. I thought the PC had frozen and I restarted it without messing with the USB connections or anything, as soon as it started rebooting the mouse’s light and the keyboard was working again.
I’m now downloading the 3.x version, I might try 4.X again later and post here if it happens again.
Just to let you know.
The text was updated successfully, but these errors were encountered:
Luc45 commented May 5, 2019
Also not sure if it’s relevant, but this popped up as soon as I opened 3.x:
Connected on USB:
- Mouse Razer Abyssus
- Keyboard and Mouse Wireless Kit Logitech K270
- Steering Wheel Logitech Driving Force EX
Luc45 commented May 5, 2019 •
Yes, it happened again. Just opened 4.x to test and same thing happened.
It starts out alright, but shortly after the inputs become readonly , the mouse/keyboard freezes, left me with a reboot as only option.
In 3.X, even though that exception pops up (which doesn’t happen on 4.x), mouse and keyboard does not freeze.
Luc45 commented May 11, 2019
Hey buddy, I can do a TeamViewer session if would like, just let me know.
sniper02z commented Sep 6, 2019
Same for me. 3.x versions still works with old games, though.
Mouse — Steelseries Sensei [RAW]
Logitech K220 (keyboard and mouse with one radio)
Pads — some noname chinese twin joysticks. two pads with one radio.
sniper02z commented Sep 6, 2019
Seems like something wrong with logitech devices. With only steelseries mouse and joysticks works fine
sniper02z commented Sep 6, 2019 •
After having configured joystick I connected logitech kb and everything worked fine
Luc45 commented Sep 6, 2019
@sniper02z I use a Logitech K270 keyboard and a Razer Abyssus mouse
sniper02z commented Sep 6, 2019
So, have you tried to run the program with uplugged logitech keyboard?
Squall-Leonhart commented Sep 8, 2019
User error / has masked the wrong devices with hid guardian.
Footer
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Error calling setupdigetdeviceregistrypropertyw 122 x360ce как исправить
I downloaded the latest version of x360ce. But when I try to run I’m facing with this error message:
This doesn’t happen with the older versions (but these old versions didn’t work with the Ancestors game). I have also installed the latest .NET Framework. How can I get this to work? Or are there any other alternatives? This is on Windows 10.
An older version of the x360 emulator would do it. Search for x360 v 4.10 and the System.Exception: Error calling SetupDiGetDeviceRegistryPropertyW: 122 will be solved
Suggested Topics
detect -712 58 -1887 air 0 setblock -729 56 -1884 minecraft:redstone_block and it worked. It only returned that message if there was already a redstone block there. Did you check if there was one or just check the command block? BTW it worked when I used minecraft:air instead of air as well.
100k damage range. Just to add, I crafted 3 and got a ring of royal grandeur, so I now have the 4 piece set bonus. I timed it and did multiple experiments. The duration of summoned followers is 30 seconds. The proc rate was significantly higher on AOE packs, almost guaranteed within the first couple of multishot casts, where it was somewhat lower on small packs and elite packs, but they still came out pretty reliably even after a few hits. I’d say you have a good chance of these guys being out 2/3 to 3/4 of the time, so it’s a good set to get, especially if you can get your followers some good weapons, and get them the tokens that unlock all abilities
Источник
Джойстик (контроллер) не определяется в игре — x360 CE
Доброго времени суток, дорогие друзья, знакомые, читатели, почитатели и прочие личности.
Рады снова приветствовать Вас на страницах нашего портала. Сегодня небольшой материал для тех, кто любит поигрывать в игры время от времени, но периодически сталкивается с проблемами, которые озвучены в заголовке этой статьи.
Лично я, тобишь автор статьи, последнее время частенько замечаю, что многие современные игры не определяют контроллер (джойстик) самостоятельно, т.е никак не реагируют на него вообще.
Может, конечно, это как-то связано с тем, что девайс староват (хотя моя версия Logitech ‘а еще есть в продаже и на сайте производителя даже заявлена поддержка Windows 10), но судя по информации с форумов, проблема актуальна повсеместно и носит достаточно частый характер.
Сегодня мы поговорим о возможном решении этой ситуации.
Давайте приступим.
Xbox 360 Controller Emulator — для эмуляции любого контроллера и решения проблемы с его определением
Чаще всего проблема связана с библиотекой xinput1_3.dll и в интернете предлагают самые разные решения, вроде переустановки DirectX, скачивания и регистрации библиотеки насильно и много чего еще. Мы всем этим заниматься не будем, т.к нам необходимо решить вполне конкретную проблему и делать мы это будем вполне определенным инструментом.
Само собой, что в рамках этой статьи мы предполагаем, что драйвера для джойстика (контроллера) у Вас скачены и установлены с сайта производителя или с диска, который шел в комплекте.. Либо установлены системой автоматически.
Нам потребуется такое чудо программисткой мысли Xbox 360 Controller Emulator . Кстати эта программа (бесплатная, к слову) не только поможет решить нашу проблему, но и зачастую поможет поиграть с джойстиком там, где поддерживается только контроллер от xbox 360 (а такие игры есть, в частности это касается эмуляторов консоли).
Скачать программу можно с сайта разработчика. Выберите версию для разрядности своей системы (x32 или x64) и скачайте соответствующий дистрибутив как показано на скриншоте выше (во всяком случае он был актуален на момент написания статьи).
Распакуйте архив, допустим, используя 7-zip, в удобное для Вас место. В архиве окажется всего один файл программы. Прежде чем его запустить лучше все отключить джойстик от компьютера, а так же, если не установлен, то установить пакет .NET Framework.
Возможно, что Вы столкнетесь с ошибкой, которая представлена на скриншоте выше (он кликабелен). В нашем случае это нормально и необходимо просто нажать в кнопку » Greate «.
Теперь в папке, куда Вы распаковали программу, у Вас будет три файла, а именно, x360ce.ini , x360ce_x64.exe и xinput1_3.dll . Возможно, что Вы еще раз столкнетесь с ошибкой следующего вида:
Просто проигнорируйте её, нажав в кнопочку » ОК » (чаще всего она не возникает повторно, но мало ли). На этом этапе самое время подключить джойстик в USB -порт (при этом программа-эмулятор Xbox 360 Controller Emulator всё еще должна быть запущена).
Если ничего не происходит, то возможно потребуется понажимать кнопки контроллера и перевоткнуть его еще раз в порт, после чего Вы должны увидеть окно, которое на скриншоте выше.
Рекомендуется оставить всё как есть и нажать в кнопку » Next «, обычно необходимые настройки будут подгружены автоматически о чем будет свидетельствовать соответствующее окно.

После чего нажать в кнопочку » Finish «. Если Вы увидите ошибку как на скриншоте ниже, то нажмите в кнопку » Продолжить «.
Если Вы всё сделали правильно (или наоборот никаких окон автоматически не появлялось и Вы ничего не поняли), то в первой вкладке у Вас должна определится некая раскладка (все эти Button 1, Button 2 и тп):
А по нажатию на кнопку Game Controller (скриншот выше кликабелен) открываться список игровых устройств, где, собственно должен быть джостик в состоянии ОК (он кстати может называться не так как в реальности, но не это главное).
Далее Вам необходимо либо:
- Оставить всё как есть (что часто срабатывает) и нажать кнопку » Save «, после чего закрыть программу;
- Либо настроить раскладку, что делается методом изменения значения кнопок.
Во втором случае назначение кнопок, чтобы потом выставить их соответствующим образом, можно узнать, нажимая их на вкладке с названием определившегося джойстика и наблюдая в соответствующие обозначения.
Например на скриншоте выше я зажал одну из клавиш и увидел, что ей назначен седьмой номер, потом перешел на первую вкладку и поставил Button 7 там, где я хочу, чтобы была, скажем, кнопка правого «курка».
Завершив все настройки и нажав в » Save » программу необходимо закрыть, после чего все три полученных файла в папку с игрой, а именно:
- Либо в то место, где лежит её exe -файл для запуска;
- Либо в то (это особенно актуально для Steam и игр-портов) место (это может быть папка bin или data в папке с игрой) где уже есть xinput1_3.dll (или его аналог), заменив его новосозданным (старый файл, перед заменой, можете предварительно куда-либо сохранить, на всякий случай).
Возможные вариации файла:
- xinput1_4.dll;
- xinput1_3.dll;
- xinput1_2.dll;
- xinput1_1.dll;
- xinput9_1_0.dll.
Т.е, иногда, перед заменой, полученный с помощью эмулятора Xbox 360 Controller Emulator , файл, необходимо (если потребуется замена) переименовать в то имя, которое Вы найдете в папке с игрой (если же не найдете, то положите как есть, т.е просто рядом с exe-шником).
На сим всё, можно запускать и играть.
А мы переходим к послесловию.
Послесловие
Вот такой вот инструмент, который, будем надеяться поможет Вам разобраться с проблемой или эмулировать контроллер, чтобы поиграть на нём в любимую игру.
Как и всегда, если есть какие-то вопросы, мысли, дополнения и всё такое прочее, то добро пожаловать в комментарии к этой записи.
Источник
-
Home -
Game Testing -
x360ce emulator error message: Error calling SetupDiGetDeviceRegistryPropertyW: 122
This topic has been deleted. Only users with topic management privileges can see it.
-
I downloaded the latest version of x360ce. But when I try to run I’m facing with this error message:
This doesn’t happen with the older versions (but these old versions didn’t work with the Ancestors game). I have also installed the latest .NET Framework. How can I get this to work? Or are there any other alternatives? This is on Windows 10.
-
An older version of the x360 emulator would do it. Search for x360 v 4.10 and the System.Exception: Error calling SetupDiGetDeviceRegistryPropertyW: 122 will be solved
Suggested Topics
-
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts1
Views -
2
0
Votes2
Posts0
Views -
2
0
Votes2
Posts0
Views














