how to create a simple usb filter driver

Hi,
   Does anyone know how to create a simple usb filter driver, all it
does is when it receives a specific DeviceIoControl command from my
application it will send a RESET command to the usb port for a
particular usb device so that it will effectively power cycle that
device ?
   I am not too familiar with filter drivers, how do i create one and
how to install it so that its filtering all usb devices ?

0
elman
2/12/2010 8:24:34 PM
development.device.drivers 941 articles. 0 followers. Follow

4 Replies
1508 Views

Similar Articles

[PageSpeed] 57

elman <elmanlopez@gmail.com> wrote:
>
>   Does anyone know how to create a simple usb filter driver, all it
>does is when it receives a specific DeviceIoControl command from my
>application it will send a RESET command to the usb port for a
>particular usb device so that it will effectively power cycle that
>device ?
>   I am not too familiar with filter drivers, how do i create one and
>how to install it so that its filtering all usb devices ?

Filter drivers are not hard -- there are several samples in the WDK.
However, you do not need a filter driver for this.  You can send
IOCTL_USB_HUB_CYCLE_PORT to the hub to force a disconnect and reconnect.
-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
2/13/2010 8:16:04 PM
Hi Tim,

thats a good idea, but AFAIK this is
not available on Vista and 7 anymore,...

Maybe a DICS_PROPCHANGE from Usermode
to the particular Device Intance can do the
job too, by using DIF_PROPERTYCHANGE
and class params "SP_PROPCHANGE_PARAMS::
StateChange" set to DICS_PROPCHANGE. This
will restart the device,...just maybe!

Regards

Kerem

-- 
 -----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------

"Tim Roberts" <timr@probo.com> schrieb im Newsbeitrag 
news:pq1en5h3ll217661r5o70at7u8e1du117p@4ax.com...
> elman <elmanlopez@gmail.com> wrote:
>>
>>   Does anyone know how to create a simple usb filter driver, all it
>>does is when it receives a specific DeviceIoControl command from my
>>application it will send a RESET command to the usb port for a
>>particular usb device so that it will effectively power cycle that
>>device ?
>>   I am not too familiar with filter drivers, how do i create one and
>>how to install it so that its filtering all usb devices ?
>
> Filter drivers are not hard -- there are several samples in the WDK.
> However, you do not need a filter driver for this.  You can send
> IOCTL_USB_HUB_CYCLE_PORT to the hub to force a disconnect and reconnect.
> -- 
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc. 

0
iso
2/13/2010 8:32:41 PM
@Tim,
   Yes Kerem is right, IOCTL_USB_HUB_CYCLE_PORT is no longer available
on windows 7 according to the msdn docs, maybe there is something
else ?
 I am just downloading the WDK, btw which example has a filter driver
on it ? also how do I install a filter driver so that its for all usb
devices and does it auto add itself as a filter to any new usb devices
that will be installed in the future ? or do I need to run the
installer again to add the filter to those new usb devices ?

@Kerem, I am already using DICS_PROPCHANGE but it only works if the
device is not being used or hung.
0
elman
2/15/2010 5:56:30 PM
Ok,

what about this:

[WinUsb_ResetPipe]
http://msdn.microsoft.com/en-us/library/aa476447.aspx

I am not really sure if this
will work for you, since it
is not really clear to me what
exactly will be reseted here.
Maybe someone can explain,...

There are WMI classes but they say, that they
have not been implemented so far:

http://msdn.microsoft.com/en-us/library/aa388644%28VS.85%29.aspx#methods
http://msdn.microsoft.com/en-us/library/aa394504%28VS.85%29.aspx#methods

Regards

Kerem

-- 
 -----------------------
Beste Gr�sse / Best regards / Votre bien devoue
Kerem G�mr�kc�
Latest Project: http://www.pro-it-education.de/software/deviceremover
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------

"elman" <elmanlopez@gmail.com> schrieb im Newsbeitrag 
news:68fe846f-91bf-4bfe-85fc-d54a811fc5e8@s36g2000prh.googlegroups.com...
> @Tim,
>   Yes Kerem is right, IOCTL_USB_HUB_CYCLE_PORT is no longer available
> on windows 7 according to the msdn docs, maybe there is something
> else ?
> I am just downloading the WDK, btw which example has a filter driver
> on it ? also how do I install a filter driver so that its for all usb
> devices and does it auto add itself as a filter to any new usb devices
> that will be installed in the future ? or do I need to run the
> installer again to add the filter to those new usb devices ?
>
> @Kerem, I am already using DICS_PROPCHANGE but it only works if the
> device is not being used or hung. 

0
iso
2/16/2010 6:05:17 AM
Reply:

Similar Artilces:

Word 2008 created files not fully readable by PC Word (2007 or 2003) users
When I created word files on my mac using Word 2008, pc users that I send the file to are only able to view the first two pages upon opening. I get the same result when trying to open the files on my word 2007 version through my Mac using the Parrallel program to access the windows OS. Is there an update that I am missing to correct this issue? Well, it's impossible to answer your question since you haven't given any indication of what your present update level is � or what version of OS X you're using. What I can tell you is that 12.2.3 is the latest available, so if t...

Inventory Transaction Created through RMA not Posting Through
We are having problems with the inventory transactions created from RMA's not posting through all the way. When we review the Edit List on the batches, the serial information is missing, and that is why the batches will not post. Normally, inventory trans created from RMA's pick up the serial information from the RMA and then post all the way through. I have confirmed this against the documentation I have from MS that this is correct/expected result. We have tested and does not appear to be specific to RMA type, customer, date, item, etc. We have confirmed that the serial informati...

How do I create a Work Breakdown Structure (WBS)?
I want to create a WBS using Excel and roll up the effort points. Whoever helped you post this question, have them help you do a google search on "WBS Excel" "Brian 76" wrote: > I want to create a WBS using Excel and roll up the effort points. On Dec 4, 10:26=A0am, Brian 76 <Brian 7...@discussions.microsoft.com> wrote: > I want to create a WBS using Excel and roll up the effort points. Be sure you are using the WBS correctly! I cover using excel for this in my WBS Training at http://WBSCoach.com Josh Nankivel ...

How do I stop rounding in simple addition formula in Excel, 1 cen.
I am using Excel 2002, and created a workbook where dollars and cents are used. When I write the formula =sum(#,#,#) it calculates the result one cent off the actual total. Like $2623.27 is shown and it should be $2628.28. Can this be fixed? Check out John's web page on the subject: http://www.mcgimpsey.com/excel/pennyoff.html -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "bjm1010" &l...

Access 2007-Create Custom Menu
Hello, I've been searching all day and is still unable to find what I'm looking for. I was upgraded to 2007 and have converted my Access 2003 database. I figured out how to customize (using XML, go me) the Ribbon to only display the tools I want the users to use, but for the life of me, I can't seem to figure out how to add a menu to it. For example, I want to have a menu that lists a bunch of reports. This is the code for my Ribbon: <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"> <ribbon startFromScratch="tru...

Create new text file for export
I have minimal knowledge of VBA. I have been surching google all day yesterday to solve this problem and found no solutions that work. I am trying to create a new FDF file to export data to a PDF form and launch the file on a button click. I am having trouble with creating the new file. The code I am using (and is not working) is the following: Private Sub FDF_Click() Dim stPDFdata As String Dim chkName As String 'I want to check to see if the fdf file exists and if not make a new one. I know this works for directories but it does not check for the file. Need h...

Creating Cross-Project Links
Hi 1). What is the usage of Creating Cross-Project Links ? As I understand, "Cross-project links are useful when two or more projects have only a few tasks that affect one another. For example, a milestone within a development project might trigger a task in an advertising campaign project." 2). How it is implemented in Project 2007 ? When I copied the task from the source project into my project ( target project ) using "Paste Special", the new task I created become another task in my target project. My observation is both task ( ie. task in the source...

Default value for a field in the create form
Hi all, It's possible to define a default value for a field, in the create form ? Thanks, Hugo You can default a picklist value with out of the box customization but that's it. >-----Original Message----- >Hi all, > >It's possible to define a default value for a field, in the create form ? > >Thanks, >Hugo > > >. > ...

Is it possible to create a crm user without a domain login name?
Is it possible to create a crm user without a domain login name? Isn't domain logon name a required field? I heard somewhere that this was possible? We need to change some account's owners to future domain users. Domainlogname is required field in CRM Like --- (Microsoft\ba) and it means you need to create a user in CRM .Account always has an owner , which is CRM user. would like to hear if someone has some tricks to bypass the domainlogname :=) ------ Aamir Blog = http://mscrmsupport.wordpress.com/ IT is required when you create the user, but once you have created the user, ...

How do I stop Excel from changing simple numbers to their 1/100th.
I'm working with the latest service pack of Excel 2000. Every number I enter into any blank cell becomes that number's 100th decimal value. For example, typing "2" in a cell results in "0.02" when I leave the cell. This did not used to happen, but I don't know what I did to make it happen, nor what to do to stop it from happening. CC hi goto 'Tools - Options - Edit' and uncheck 'Fixed decimals' -- Regards Frank Kabel Frankfurt, Germany Chris C wrote: > I'm working with the latest service pack of Excel 2000. > Every number I ente...

How to create and set values for newly created attributes in active directory
Hi, I need to add a new string attribute in the properties of users in the active directory. I have changed the schema and added the attribute. Then, it gets listed in the attributes list. But, I could not set this attribute value for users. Please help me in setting this new attribute value for each and every user of users in AD. Thanks, - mv. -- m v ramana ------------------------------------------------------------------------ m v ramana's Profile: http://forums.techarena.in/members/181470.htm View this thread: http://forums.techarena.in/active-directory/129...

Helpdesk to create mailboxes
Hi, I would like to have the users in the helpdesk group create user mailboxes, but not have permission to edit the quota of the mailboxes in Exchange 2003 Sp2. I thought I did this on Exchange 2003 without a service pack without a problem. Now when I create a helpdesk user or group they always have an ability to modify the quotas of that mailbox. Is there still a way to do this? Thank You Cos1 ...

message filtering with header tagging
I have a company that can provide email header tagging of SPAM email before it gets to my exchange server. All I need to do is be able to put the tagged emails in a quarantine folder on exchange server. Does anyone know if this is possible to filter out the emails by email headers that have been tagged as SPAM? I have exchange 5.5 and exchange 2003 severs. Will it work on either one ? Any info is greatly appreciated. Thanks in advanced, Morley Take a look at SpamMover for Exchange 2000/2003 application here: http://www.ivasoft.biz/spammover.html -- Regards, Victor Ivanidze, software...

Charting Filtered Data
I have an excel sheet that has a bunch of data imported to it from SQL Server 2k. I need to either pull all the relevant data from a date typed in by the user which that data returned will be used to build my charts, or find a way to build the chart from filtered data where the entire table is imported, but the user selects the data to filter on. (this idea is probably not a good idea as the table is already at 11k records and grows by roughly 20 records a day). -- BCullenward ------------------------------------------------------------------------ BCullenward's Profile: http://www....

stumped on creating dependent data validation lists
I created 2 Data Validation lists with Indirect functions. On trying to use them in conjunction with a 3rd list, i realized my logic in trying to accomplish what i need had been flawed. The problem is that the 3rd list, which should be dependent on the 1st 2, changes location. That is, i have a very busy worksheet. In the main body of the worksheet, there are no empty rows and columns. But almost every cell needs to have dependent validation lists to select items from. The main body is from A13 to AW131. In the area E14 to Q131, I have the potential to need a dependent dropdown list i...

Failed to create client pane/view for frame
My MDI application gave the following warnings in the output pane in debug mode and would not create any more windows after it successfully created 8 or 9 similar windows: - Failed to create client pane/view for frame - Warning: CDocTemplate couldn't create a frame. I derived my class from CFormView to create the window since the window is dialog base with lots of controls in it (around 500 to 600 bitmaps and static text for displaying purpose). I read the discussion on article 166132 (http://support.microsoft.com/kb/q166132/), it talked about initializing the richedit control, but...

Remove sort and filters programmatically on form
I have a form based on a 2 table query. User will use shortcut menu to filter records down to what they want to work on and sort accordingly. I have a button to remove all filters but I also want to remove any sorts that were applied and I can't seem to get that part to work. I use the following to remove all the filters. I just need help with the code to get the form back to the original underlying query sort. On_Click event of button control Me.Filter = "" FilterOn = False Like I said, this brings back all records but the sort stays. I am using Access 200...

Simple OWA problen that I can't figure out.
I'm running OWA on an Exchange 2003 server, behind a firewall. It all works okay internally, but for some reason when accessing OWA form the internet instead of links showing https://mydomain.com/exchange it shows http://<my.ip.address/exchange. I'm sure it's something really simple, and I've searched google, and the kb, but I guess I'm using the wrong search phrases. A point in the right direction would be really handy. cheers, Box "Boxington Headmaker >.org>" <the_boxhead@alt<<two_thousand_six_hundred <- convert that to numerals...

CListBox::create problem
Hello, My application crashes when calling this method in OnInitDialog() . Could you tell me what is the problem? Here what i do: BOOL CPCM_ViewDlg::OnInitDialog() { [generated code...] // TODO: Add extra initialization here m_DeviceList.Create ( WS_VISIBLE | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, CRect(7,10,241,168), this, IDC_LIST1 ); } m_DeviceList is a member of CPCM_ViewDlg. Thanking you in advance Are you calling it after the call to base class CDialog::OnInitDialog(); ? It should be something like BOOL YourDi...

Advanced Filter Causes Crash #2
I tried both of the ideas that were offered and got great results.. thanks so much -- flipnell ----------------------------------------------------------------------- flipnello's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1491 View this thread: http://www.excelforum.com/showthread.php?threadid=26552 Great! Thanks for letting us know. flipnello wrote: > I tried both of the ideas that were offered and got great results... > thanks so much! > > -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

How do I create a Kano graph/model in excel?
I want to generate a Kano Model. Is this possible using excel? What's it look like? Got a link? - Jon ------- Jon Peltier, Microsoft Excel MVP Peltier Technical Services Tutorials and Custom Solutions http://PeltierTech.com/ _______ "Jerby" <Jerby@discussions.microsoft.com> wrote in message news:D1F8455D-54DE-4A54-B2AD-3A724CC043A6@microsoft.com... >I want to generate a Kano Model. Is this possible using excel? ...

Create Activity Mail in Incident from C#
Hello, There is a case: When someone sends e-mail to specific address it is retrieved by our soft, preprocessed (search for some stuff and other), then it is supposed to be put in CRM. I know how to create incident (case) but don't know how I'm supposed to add some activities to it. I have not found any fields indicating case id. And when I add this activity (I want to create e-mail) will it be put in history or somewhere else? I would like to put it in some kind of inbox or something - I'v seen that there is queue object but don't know if it will be suitable for this t...

Problems creating Workbook Connection programatically
Why do I get a "Runtime error 5. Invalid procedure call or argument" error with the code below? We're trying to create our connections programatically. This is called in the Workbook_Open event. Sub CreateNewConnection() Dim objConn As WorkbookConnection Dim connstr As String Dim cmdText As String connstr = "ODBC;DRIVER={Advantage StreamlineSQL ODBC};DataDirectory=C:\GC\JOSH;SERVER=OurDBServer; _ CharSet=ANSI;DefaultType=Advantage;Rows=False;AdvantageLocking=ON;Locking=Record; _ MemoBlockSize=64;MaxTableCloseCache=5;ServerTypes=6...

Creating a taskbar toolbar (like media player)
Hi, Can anyone point me to a project / sample code to enable me to minimize my project to a toolbar on the taskbar, as Windows Media Player does. My application is MDI based and not dialog based. TIA Tony Here you go: http://msdn2.microsoft.com/en-us/library/bb776819.aspx http://www.microsoft.com/msj/1199/bandobj/bandobj.aspx AliR. "Tony" <lazy.herbert@homeandresting.com> wrote in message news:OjbpMAsNIHA.4752@TK2MSFTNGP05.phx.gbl... > Hi, > > Can anyone point me to a project / sample code to enable me to minimize my > project to a toolbar on the tas...

Is there a way to create a pictogram w/ office?
Hi, Take a look at Jon's explanation http://peltiertech.com/Excel/ChartsHowTo/CustomStacks.html Cheers Andy Laurie wrote: -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info ...