-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QueryDevice fails with error code 1167 (0x48F, ERROR_DEVICE_NOT_CONNECTED) #284
Comments
Error code 1167 (0x48F) is Are the devices you are querying connected to the system? Regardless, the SDK shouldn't throw an error code if an unconnected device is queried, so that is most definitely strange. |
They are not, I've only got the emulator currently, I was just testing the
method functionality.
…On Sat, Feb 27, 2021, 9:35 PM Adam Hellberg ***@***.***> wrote:
Error code 1167 (0x48F) is ERROR_DEVICE_NOT_CONNECTED (reference
<https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--1000-1299->
).
Are the devices you are querying connected to the system?
Regardless, the SDK shouldn't throw an error code if an unconnected device
is queried, so that is most definitely strange.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMO4NATKCVYUQCGLUET44DTBG2X5ANCNFSM4YKSTQ2A>
.
|
I get the same results on my machine. A query on Blackwidow which I have connected works fine. A query on Blade Stealth which I do not have fails with the 1167 error. This at least confirms the suspicion about it failing on devices that are not connected, but it's not the behaviour I'd expect from the SDK. I don't have an official channel to Razer for questions at the moment, but I'll see if I can get a response from the community Discord (which has some Razer staff on it). |
Ok, thanks. As long as I can "do something" to validate device
connectivity, that will work. In a perfect world, the chroma emulator would
be detectable as well...
…On Sat, Feb 27, 2021, 10:09 PM Adam Hellberg ***@***.***> wrote:
I get the same results on my machine.
A query on Blackwidow which I have connected works fine. A query on Blade
Stealth which I do not have fails with the 1167 error. This at least
confirms the suspicion about it failing on devices that are not connected,
but it's not the behaviour I'd expect from the SDK.
I don't have an official channel to Razer for questions at the moment, but
I'll see if I can get a response from the community Discord (which has some
Razer staff on it).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#284 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMO4NH4UHSSDYHZWAFJ3KDTBG6YFANCNFSM4YKSTQ2A>
.
|
Also, FWIW, if the SDK wasn't throwing an exception on a disconnected device (or you ignore the exception), the attached code can be used to enumerate all device GUIDs from Devices and check for connectivity, possibly to implement #145 |
If they come back and say that the error is intended, I'll update the library to detect that and return the struct with |
Looking at the SDK reference, I think this is the designed behavior... |
They did at some point change the |
If the SDK returns the ERROR_DEVICE_NOT_CONNECTED error when calling the QueryDevice API, do not throw a NativeCallException but instead detect this error and return a device info struct where the connected count is set to zero. A new enum member "Unknown" is added to the DeviceType enumeration to cover this use case. Fixes #284.
Trying to loop through all the various GUIDS and see if anything is connected, and I get this error with every query to the API.
Here's the code I'm running:
And here's the log output:
Instead, I'd obviously expect to get deviceinfo and the option to check if they're connected.
Any suggestions?
I'm checking that the Chroma SDK is installed before, and those checks return fine as well:
The text was updated successfully, but these errors were encountered: