Markus | 15 Jun 2012 11:22
Picon
Favicon

Driver uninstall process

Hi,

I suppose it's still true that "All libusbK related questions
and issues may be posted to the libusb-win32-devel mailing
list."

I'm running 3.0.5.13 on Windows 7.

When trying to uninstall a driver package (libusbK wizard) via 
the Windows software installation manager, I receive an error 
due to the fact that my driver package names have spaces. I.e. 
the uninstall script does not quote the path.

Is there any known method except using no spaces to prevent 
having to uninstall the packages manually?

Thanks in advance,
/Markus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Travis | 15 Jun 2012 19:00
Picon

Re: Driver uninstall process

On 6/15/2012 2:22 AM, Markus wrote:
> Hi,
>
> I suppose it's still true that "All libusbK related questions
> and issues may be posted to the libusb-win32-devel mailing
> list."

Certainly.

> I'm running 3.0.5.13 on Windows 7.
>
> When trying to uninstall a driver package (libusbK wizard) via
> the Windows software installation manager, I receive an error
> due to the fact that my driver package names have spaces. I.e.
> the uninstall script does not quote the path.

Spaces should be okay?
If you remove the package from the device manager first then it causes 
an error to occur when you try and uninstall it via add/remove programs. 
Do you think this is what's happening?

> Is there any known method except using no spaces to prevent
> having to uninstall the packages manually?
>

I'm not 100% sure we are on the same page. :)

Were are you putting these spaces?  IE: Maybe you give me a step-by-step 
to reproduce your problem.

(Continue reading)

Markus | 26 Jun 2012 08:58
Picon
Favicon

Re: Driver uninstall process

On Fri, 15  10:00 , Travis wrote:
> 
> Were are you putting these spaces?  IE: Maybe you give me a step-by-step 
> to reproduce your problem.

Apologies if my description has been not clear enough.

Well. I'm starting the driver wizard, select a driver, then
specify a name for it, say "Some Device (WinUSB)". Then I choose
to install this package immediately (still part of the wizard
dialog series).

At this point the driver is installed correctly and I can talk
with my device. Later on, I want to uninstall the package. Note
that I don't mean uninstalling the driver in the Windows Device
Manager.

I just select "Control Panel", "Programs and Features" and
consecutively the package name under which the driver has been
installed. Selecting "Uninstall" immediately gives me an error
dialog from which I deduce that spaces in the name are a
problem.

/Markus

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
(Continue reading)

Alberto Semenzato | 27 Jun 2012 19:43
Picon
Favicon

StmK_Stop

Hi Travis and everyone,
I've been working on other subsystems lately, so I'm not really up to 
date! What's going on? Time for a stable release?
Well, in the meanwhile I've got a question about StmK_Stop function.
Let's say that I've already started (successfully, without any kind of 
error) a streamed pipe and a very bad user detach my device without 
asking...
Of course, thanks to the great HotK stuff, I will handle the removal in 
my callback function, but the thing I've noticed is that StmK_Stop 
always reports me an ERROR_ACCESS_DENIED ("stream already stopped"). 
Maybe it's because libusbK is so smart enough to stop the streamed pipe 
automatically?
So, to clean up everything, I'm just supposed to call StmK_Free and 
UsbK_Free on my previous handles, right?

Best regards,

Alberto

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Alberto Semenzato | 28 Jun 2012 00:25
Picon
Favicon

_Free functions and handles...

Hi, I've got another question, this time it's about vaious _Free functions.
Actually I'm using UsbK_Free, HotK_Free and StmK_Free.
Documentation says that both UsbK_Free and StmK_Free return TRUE, I 
suppose that this means both functions can't produce errors of any kind, 
so it would be safe, after calling them, to "nullify" the handles, 
something like:

UsbK_Free(myUsbHandle);
myUsbHandle= 0;

What about StmK_Free, instead? By looking at sources I've seen an 
ERROR_NOT_FOUND ("The notifier window is not active."), maybe it has 
something to do with window handle that is automatically created by 
libusbK. Now, my question is, wich kind of condition can produce such an 
error? What can a client application do to get the system in a "safe" 
status, i.e. a status when it can safely assume that the resources that 
were bound to an hypothetical myStmKHandle are released and that 
myStmKHandle can be nullified?
I don't know if my question is clear enough, but I would like to avoid 
putting potentially unsafe code in my design.

Thanks a lot!

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
(Continue reading)

Travis | 29 Jun 2012 08:08
Picon

Re: _Free functions and handles...

On 6/27/2012 3:25 PM, Alberto Semenzato wrote:
> Hi, I've got another question, this time it's about vaious _Free functions.
> Actually I'm using UsbK_Free, HotK_Free and StmK_Free.
> Documentation says that both UsbK_Free and StmK_Free return TRUE, I
> suppose that this means both functions can't produce errors of any kind,
> so it would be safe, after calling them, to "nullify" the handles,
> something like:
>
> UsbK_Free(myUsbHandle);
> myUsbHandle= 0;

Yes.

> What about StmK_Free, instead? By looking at sources I've seen an
> ERROR_NOT_FOUND ("The notifier window is not active."), maybe it has
> something to do with window handle that is automatically created by
> libusbK.

That sounds like HotK_Free(). ;)  Hotplug creates a top-level window 
monitoring device notification events.

> Now, my question is, wich kind of condition can produce such an
> error? What can a client application do to get the system in a "safe"
> status, i.e. a status when it can safely assume that the resources that
> were bound to an hypothetical myStmKHandle are released and that
> myStmKHandle can be nullified?

Generally you can just call XxxK_Free and then free your own resources.

If it is imperative that your own resources are not freed until the 
(Continue reading)

Travis | 29 Jun 2012 02:28
Picon

Re: StmK_Stop

On 6/27/2012 10:43 AM, Alberto Semenzato wrote:
> Hi Travis and everyone,
> I've been working on other subsystems lately, so I'm not really up to
> date! What's going on? Time for a stable release?

We are still hashing things out in RC releases. ;)

> Well, in the meanwhile I've got a question about StmK_Stop function.
> Let's say that I've already started (successfully, without any kind of
> error) a streamed pipe and a very bad user detach my device without
> asking...

The stream will stop automatically, but calling StmK_Stop is still okay.

> Of course, thanks to the great HotK stuff, I will handle the removal in
> my callback function, but the thing I've noticed is that StmK_Stop
> always reports me an ERROR_ACCESS_DENIED ("stream already stopped").
> Maybe it's because libusbK is so smart enough to stop the streamed pipe
> automatically?

Yes.  Hotplug notifications will most likely come after pending IO 
operations fail.  By the time you have got a notification, the stream 
has already stopped itself.

> So, to clean up everything, I'm just supposed to call StmK_Free and
> UsbK_Free on my previous handles, right?

Right.  Start/Stop is not related to Init/Free.  For instance, you can 
still read and write the stream buffers while it is stopped.

(Continue reading)

Travis | 29 Jun 2012 18:32
Picon

Re: Driver uninstall process

On 6/25/2012 11:58 PM, Markus wrote:
> On Fri, 15  10:00 , Travis wrote:
>> Were are you putting these spaces?  IE: Maybe you give me a step-by-step
>> to reproduce your problem.
>
> Apologies if my description has been not clear enough.
>
> Well. I'm starting the driver wizard, select a driver, then
> specify a name for it, say "Some Device (WinUSB)". Then I choose
> to install this package immediately (still part of the wizard
> dialog series).
>
> At this point the driver is installed correctly and I can talk
> with my device. Later on, I want to uninstall the package. Note
> that I don't mean uninstalling the driver in the Windows Device
> Manager.
>
> I just select "Control Panel", "Programs and Features" and
> consecutively the package name under which the driver has been
> installed. Selecting "Uninstall" immediately gives me an error
> dialog from which I deduce that spaces in the name are a
> problem.
>

Ahh.. I see.  Yes you are right.

This is a bug in Microsoft dpinst.exe application and should be reported 
to Microsoft.

Right now, I think your only option is to ensure the .inf filename does 
(Continue reading)


Gmane