I noticed a memory leak after updating to libusb 1.0.16 which added hotplug
support, the leak is also present in the current git version. Basically I see
libusb_device object leaking and tracked this down an unhandled hotplug left
event that was created between my last call to
The default case in windows_transfer_callback() calls windows_error_str(0)
which will convert the error code returned by GetLastError() to a string.
This currently works because windows_transfer_callback() is either called
with io_result set to NO_ERROR or io_result set to GetLastError().
If
cb_response_in was called. But
as you don't neither of this the transfer_response_in object leaks.
--
Matthias Bolte
http://photron.blogspot.com
--
October Webinars: Code for Performance
Free Intel webinars can help you
it.
--
Matthias Bolte
http://photron.blogspot.com
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get
You could use GetClassInfoExA to check if the window class already exist any
only register it if it's not existing yet.
---
Reply to this email directly or view it on GitHub:
Well, using UnregisterClassA is dangerous because it requires that the hotplug
thread always exits correctly and that you are not starting a new hotplug
thread before the old one has ended. And this is where the problems are:
In the error path of windows_init you're just terminated the hotplug
The sessionID value is 64-bit, so print it as 64-bit value and don#39;t
truncate it to 32-bit.
You can merge this Pull Request by running:
git pull https://github.com/photron/libusbx darwin-fix-1
Or you can view, comment on it, or merge it online at:
I also noticed that the 64-bit sessionID gets stored in the unsigned long
session_data parameter of the libusb_device struct. First I thought this would
be a problem because the 64-bit value could get truncated, but as recent Macs
are all 64-bit and LP64 is in place there, unsigned long is also
Yes, these two patches fix the problem, thanks.
---
Reply to this email directly or view it on GitHub:
https://github.com/libusbx/libusbx/issues/150#issuecomment-26495583--
October Webinars: Code for Performance
Free
The [Guidelines for Using
SetupAPI](http://msdn.microsoft.com/en-us/library/windows/hardware/ff545011.aspx)
state that if a SetupAPI function fails then the return value of
GetLastError() must be converted to a HRESULT value with the
HRESULT_FROM_SETUPAPI macro before passing it to
I already had a
poll based event loop in my application.
--
Matthias Bolte
http://photron.blogspot.com
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture
description.
--
Matthias Bolte
http://photron.blogspot.com
--
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects
?
--
Matthias Bolte
http://photron.blogspot.com
--
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps
,
desc.idProduct);
if( desc.idVendor == VENDOR_ID
(desc.idProduct == PRODUCT_ID)
{
//printf(device found: class=0x%x\n, desc.bDeviceClass);
return 1;
}
return 0;
}
On Thu, Jul 31, 2014 at 3:42 AM, Matthias Bolte
matthias.bo...@googlemail.com wrote:
2014-07-29 23:28 GMT+02
14 matches
Mail list logo