libusb: error [op_open] getcap failed in C++ on Linux [closed] - c++

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I am running into trouble calling libusb_open in C++ on Linux (running on Raspberry Pi but virtualized to x86 using Exagear).
I can find a device using libusb_get_device_list but it appears translating a device to a device handler using libusb_open is causing problems, even though it returns a 0 (success), however no further commands work. It is giving me the error:
libusb: error [op_open] getcap failed (22)
UPDATE
A little bit of digging has revealed that the following command is producing the error (within libusb):
r = ioctl(hpriv->fd, IOCTL_USBFS_GET_CAPABILITIES, &hpriv->caps);
where IOCTL_USBFS_GET_CAPABILITIES is _IOR('U', 26, __u32). Digging has revealed that error 22 from ioctl is an invalid argument. I'm still trying to unpick this, but any help here is greatly appreciated.

Related

Calling IOleWindow::GetWindow() from IExplorerCommand::Invoke() is giving error 8001010d (RPC_E_CANTCALLOUT_ININPUTSYNCCALL) [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 23 days ago.
Improve this question
I am writing a Windows File Explorer shell extension using the IExplorerCommand interface.
To do this, I am using the PhotoStoreContextMenu sample from here:
https://github.com/microsoft/AppModelSamples/tree/master/Samples/SparsePackages/PhotoStoreContextMenu
The problem I have is that when I try to get the parent HWND by calling IOleWindow::GetWindow(), I get COM error 8001010d (RPC_E_CANTCALLOUT_ININPUTSYNCCALL). The IOleWindow is obtained by the shell extension object also being derived from IObjectWithSite, the same as in the sample code.
This only happens for the derived IExplorerCommands that are instantiated in the code run in the plug-in, which are the ones that are in a sub-menu. The top level IExplorerCommands instantiated from the configuration in the APPX file work fine.
There is one change I made to the PhotoStoreContextMenu sample code, which is to change the RuntimeClassFlags from ClassicCom to WinRtClassicComMix. I had to do this to work around a bug with Invoke() not being called (see Why is IExplorerCommand::Invoke() no longer being called?). That problem also only affects IExplorerCommands instantiated in the plug-in. Also note: that problem only happens with the new tabbed File Explorer on Windows 11.
Is it the case that a COM object created using Microsoft::WRL::Make could be in a different apartment to the thread running when it is created? If so, is there a way to create a COM object so that it is in the same apartment as the one that is being executed? That would hopefully fix both these problems.

Failed Open Snapshot VirtualBox 6 VERR_SSM_DATA_UNIT_FORMAT_CHANGED [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
Anybody else failing to open snapshots once they upgraded their VirtualBox from v5 to v6? Snapshots that were opening just fine are now failing for me with this error ...
HGCM#0: Bad auto mount point size: 0x5
[ver=3 pass=final] (VERR_SSM_DATA_UNIT_FORMAT_CHANGED).
Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Some very old snapshots are able to open; but most new ones and ALL the ones I save now using VirtualBox 6 are failing to open. Same error above.
My host is Windows10 and the saved VMs are Ubuntu18 guests.
Disclaimer: It should not be an excepted solution as your saved state will be lost.
As I don't have any sensitive data in the saved state. I have discarded the saved state and it works fine for my case.
EDIT: in some cases it looks like if you take a snapshot using the saved state, and then discard the saved state you might be able to recover back to where your saved state was
Steps
Right Click on the OS
Select Discard Saved State... in the context menu.
Screenshot
Host OS: Windows 10, Guest OS: Ubuntu 18.04, on Virtual Box 6.0.0
I have resolved this problem by installing Oracle_VM_VirtualBox_Extension_Pack-6.0.4.vbox-extpack for my VirtualBox-6.0.4-128413-Win

Error when building a C++ program for the second time [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 5 years ago.
Improve this question
After some time I've got this problem with my C++ compiler.
When I write the code and I compile if for the first time, there's no problem and I can execute it normally. But then, after the program is finished in the terminal, if I make any change in the code and try to compile it again, I get this problem:
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot open output file C:\Users\gabri\Codes/test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
And I get access denied when trying to run the .exe file after that.
I have no idea how to solve it. I try to compile usually in Sublime but even in an IDE like Codeblocks I get the same problem.
I don't know if it might help, but this is an image of my PC's Path, just in case.
Seems like you are trying to compile even when the previous process is still running. You must track it from task manager and kill the process before you compile it again.
Looking into your comment,seems like a permission issue may be,check if you are running the command prompt or the IDE with admin privilege or not,if no,try running it with administrator privilege.

'avrdude: verification error; content mismatch' error with Arduino hardware [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm pretty sure this is a hardware issue. Just to prove my point, I loaded up the Blink script and the default startup file, both resulting in the same error. I'm worried I may of fried something or done something similar. I'm fine if the only solution is to buy a new Arduino, I'd just like to know what happened.
Here are is error message from both scripts:
Startup File
Blink Script
No errors occur when compiling, but when the code is sent to the Arduino, that happens. Any ideas on what the problem is?
It's hard to tell you what happened without knowing what you were doing with your board before it stopped working.
This error may have many causes, one possibility is that you downloaded the .org IDE, which has a higher version number. In this case it should be sufficient to uninstall the Arduino IDE, then download the latest .cc IDE from here and install it. Be sure to make a backup of your sketches first.
Your problem may also be a corrupt bootloader, in which case burning the bootloader may help.
If u have another functioning arduino with same processer(atmega328 in my case) than burn bootloader on ur malfunctioning arduino using ur function arduino
here-https://youtu.be/oce7D72Mdwo

Vmware Install Error - vmwarer mcisocket64.msi failed [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
The following error is achieved on Vmware Installation when installing on an x64 Windows 7:
vmware
mcisocket64.msi failed
I don't know why... but in looking at the vmsetup.20120104134836.log within %TEMP% I noted:
20120104134909:INFO CPackageManager::GetFile: VMwareVmciSockets64.msi
20120104134909:INFO CMSIHelper::InitMsiParameters: MSI Parameters:
20120104134909:INFO CMSIHelper::InitMsiLogging: Successfully enabled logging to file C:\Users\dan\AppData\Local\Temp\vmsetup.20120104134836.vmwarevmcisockets64.msi.install.log, with mode 7967
20120104134909:INFO CInstallMSIOperation::Execute: Preparing to install VMwareVmciSockets64.msi, options: uninstall_on_rollback: 1, use_internal_ui: 0, parameters:
20120104134916:INFO CInstallMSIOperation::Execute: Finished installing msi [0]
20120104134916:INFO CBootstrapCmd::RunOperation: Operation 'InstallMSI' completed successfully with return code 65537
There is no user "dan" on my machine, so the above path would not work. I do not know why Vmware was looking for Dan... as far as I know Dan has never used my machine, and there is no reference in the registry to a "Dan".
However, creating the directory where it was trying to create the file allowed the installation to finish without an issue.
Hopefully this ends up helping someone else out as well.