WriteFile access error on UMDF USB driver

I am creating a driver based on the UMDF FX2_driver sample.  My device 
differs in that it has one input and one output interrupt endpoint.  Also am 
providing a symbolic name.  I have a test application I would like to use 
with this driver/device that uses WriteFile to send data to the driver.  I am 
able to verify thru tracing and a line trace that the data from the WriteFile 
is being received by the driver and passed on to the usb device.  However, 
the WriteFile fails with a GetLastError() of 1117 (ERROR_IO_DEVICE).  Need to 
determine why I am getting this error.
0
Utf
2/19/2010 4:50:04 PM
development.device.drivers 941 articles. 0 followers. Follow

8 Replies
988 Views

Similar Articles

[PageSpeed] 17

ricobandito <ricobandito@discussions.microsoft.com> wrote:
>
>I am creating a driver based on the UMDF FX2_driver sample.  My device 
>differs in that it has one input and one output interrupt endpoint.

This is a side trip, but why use an interrupt out pipe?  I've never seen
the point -- you can do the same thing with bulk and get better
performance.

Have you changed CreateUsbIoTargets to look for interrupt pipes instead of
bulk?

>Also am 
>providing a symbolic name.  I have a test application I would like to use 
>with this driver/device that uses WriteFile to send data to the driver.  I am 
>able to verify thru tracing and a line trace that the data from the WriteFile 
>is being received by the driver and passed on to the usb device.  However, 
>the WriteFile fails with a GetLastError() of 1117 (ERROR_IO_DEVICE).  Need to 
>determine why I am getting this error.

How are you "passing on" the request?  Are you calling
FormatRequestForWrite and ForwardFormattedRequest in your OnWrite handler,
like in the sample?  Are you seeing an error in your OnCompletion handler?
Which error?
-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
2/21/2010 12:40:14 AM

"Tim Roberts" wrote:

> ricobandito <ricobandito@discussions.microsoft.com> wrote:
> >
> >I am creating a driver based on the UMDF FX2_driver sample.  My device 
> >differs in that it has one input and one output interrupt endpoint.
> 
> This is a side trip, but why use an interrupt out pipe?  I've never seen
> the point -- you can do the same thing with bulk and get better
> performance.
> 

This is what the hardware provides.  Not my decision.

> Have you changed CreateUsbIoTargets to look for interrupt pipes instead of
> bulk?

Yes, modified my code to look for interrupt pipes instead of bulk pipe.  
Tracing shows this is working fine.
> 
> >Also am 
> >providing a symbolic name.  I have a test application I would like to use 
> >with this driver/device that uses WriteFile to send data to the driver.  I am 
> >able to verify thru tracing and a line trace that the data from the WriteFile 
> >is being received by the driver and passed on to the usb device.  However, 
> >the WriteFile fails with a GetLastError() of 1117 (ERROR_IO_DEVICE).  Need to 
> >determine why I am getting this error.
> 
> How are you "passing on" the request?  Are you calling
> FormatRequestForWrite and ForwardFormattedRequest in your OnWrite handler,
> like in the sample?  Are you seeing an error in your OnCompletion handler?
> Which error?

Just as you say,  error code is some odd value.  Does not match any 
meaningful error code.
> -- 
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
> .
> 
0
Utf
2/22/2010 4:28:01 PM
ricobandito <ricobandito@discussions.microsoft.com> wrote:
>"Tim Roberts" wrote:
>> 
>> This is a side trip, but why use an interrupt out pipe?  I've never seen
>> the point -- you can do the same thing with bulk and get better
>> performance.
>
>This is what the hardware provides.  Not my decision.

And you can't ask why this decision was made?

>> How are you "passing on" the request?  Are you calling
>> FormatRequestForWrite and ForwardFormattedRequest in your OnWrite handler,
>> like in the sample?  Are you seeing an error in your OnCompletion handler?
>> Which error?
>
>Just as you say,  error code is some odd value.  Does not match any 
>meaningful error code.

You didn't answer any of my questions.
-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
2/23/2010 4:56:20 AM

"Tim Roberts" wrote:

> ricobandito <ricobandito@discussions.microsoft.com> wrote:
> >"Tim Roberts" wrote:
> >> 
> >> This is a side trip, but why use an interrupt out pipe?  I've never seen
> >> the point -- you can do the same thing with bulk and get better
> >> performance.
> >
> >This is what the hardware provides.  Not my decision.
> 
> And you can't ask why this decision was made?
> 

The answer I received was that all packet sizes a small (<= 64 bytes) and 
latency for these messages is better than in bulk.

> >> How are you "passing on" the request?  Are you calling
> >> FormatRequestForWrite and ForwardFormattedRequest in your OnWrite handler,
> >> like in the sample?  Are you seeing an error in your OnCompletion handler?
> >> Which error?
> >
> >Just as you say,  error code is some odd value.  Does not match any 
> >meaningful error code.
> 
> You didn't answer any of my questions.
> -- 

Yes, using FormatRequestForWrite just as in the sample, including call to 
ForwardFormattedRequest.  OnWrite and OnRead are just as in sample.  
Everything I am finding does not appear to point out any differences in this 
method, interrupt or bulk.    Driver trace is showing OnCompletion being 
called with good parameter data, but that does not make it back to the app.
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
> .
> 
0
Utf
2/24/2010 5:21:02 PM

"Tim Roberts" wrote:

> ricobandito <ricobandito@discussions.microsoft.com> wrote:
> >"Tim Roberts" wrote:
> >> 
> >> This is a side trip, but why use an interrupt out pipe?  I've never seen
> >> the point -- you can do the same thing with bulk and get better
> >> performance.
> >
> >This is what the hardware provides.  Not my decision.
> 
> And you can't ask why this decision was made?
> 
> >> How are you "passing on" the request?  Are you calling
> >> FormatRequestForWrite and ForwardFormattedRequest in your OnWrite handler,
> >> like in the sample?  Are you seeing an error in your OnCompletion handler?
> >> Which error?
> >
> >Just as you say,  error code is some odd value.  Does not match any 
> >meaningful error code.
> 
> You didn't answer any of my questions.
> -- 
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
> .
> 

Oh, and I am using a symbolic line name as well.
0
Utf
2/24/2010 5:45:01 PM

I mean "symbolic link"
0
Utf
2/24/2010 5:47:02 PM
ricobandito <ricobandito@discussions.microsoft.com> wrote:
>
>The answer I received was that all packet sizes a small (<= 64 bytes) and 
>latency for these messages is better than in bulk.

That's completely wrong.  The CONSISTENCY is better with interrupt, but the
LATENCY (and bandwidth) is provably better with bulk.  A bulk packet will
go out instantly.  An interrupt packet must wait for the pipe's interval.

>Yes, using FormatRequestForWrite just as in the sample, including call to 
>ForwardFormattedRequest.  OnWrite and OnRead are just as in sample.  
>Everything I am finding does not appear to point out any differences in this 
>method, interrupt or bulk.    Driver trace is showing OnCompletion being 
>called with good parameter data, but that does not make it back to the app.

That's interesting.  So, if you print GetCompletionStatus() and
GetInformation() in OnCompletion, the numbers look OK, and don't match the
application's result?
-- 
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
0
Tim
2/25/2010 5:26:25 AM

"Tim Roberts" wrote:

> ricobandito <ricobandito@discussions.microsoft.com> wrote:
> >
> >The answer I received was that all packet sizes a small (<= 64 bytes) and 
> >latency for these messages is better than in bulk.
> 
> That's completely wrong.  The CONSISTENCY is better with interrupt, but the
> LATENCY (and bandwidth) is provably better with bulk.  A bulk packet will
> go out instantly.  An interrupt packet must wait for the pipe's interval.
> 

Perhaps I misunderstand then, but the hardware developers are convinced the 
interrupt is a better option in this case than bulk.  I have a basic 
understanding of USB, so I can't make a strong argument to go with one over 
the other, and really, that is neither here not there for the situation I am 
seeing, I don't think.


> >Yes, using FormatRequestForWrite just as in the sample, including call to 
> >ForwardFormattedRequest.  OnWrite and OnRead are just as in sample.  
> >Everything I am finding does not appear to point out any differences in this 
> >method, interrupt or bulk.    Driver trace is showing OnCompletion being 
> >called with good parameter data, but that does not make it back to the app.
> 
> That's interesting.  So, if you print GetCompletionStatus() and
> GetInformation() in OnCompletion, the numbers look OK, and don't match the
> application's result?

Yes, the trace shows all the parameter status such as GetCompletionStatus() 
and GetInformation() look good.  Issue looks to be the driver not getting the 
right status back to the app, so the writefile on the app is failing.  

One thing I did try was to remove the completion callback and call 
CompleteWithInformation() right after the send.  This gets we one good 
WriteFile call, and then I get a failure on the second call, with a 
GetLastError() of 6.  Odd coincidence is that the first byte in the write 
data is 6.  
> -- 
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.
> .
> 
0
Utf
2/25/2010 3:06:03 PM
Reply:

Similar Artilces:

Got "file could not be accessed" error while opening an .xls file through IE
I was creating a text data file named ne.xls under public_html directory so that any user can use IE to access the file and view it as excel file. For some reason, I am getting the "file could not be accessed" error message if I access the file through Internet Explore (IE). And there is no error if I directly open up the file through excel program. I am sure the file is in the right directory, has read and write permission, has no special characters in the filename, the full path is less than 218 characters. And I am sure it has something to do with the data contents. ...

Accessing the CCD array of the camera using MFC
Hello, I am capturing the images from the camera using VC++ MFC . And each image is of size 1280*1024. When I want to do processing over certain area, actually I want to divide the Image height(1024) into 4 blocks (256,256,256,256) keeping the width (1280) constant. So that I will get the whole image into 4 small images. Can anyone please kindly tell me How can I able to do this ? I am thinking of accessing CCD array, If accessing CCD array is a solution for this.. Please help Thanks in advance James First, you need to have a device driver that connects to the camera. This is not an MFC ...

error: end of file reached
Hi, I have Outlook Express 5.02 on the Mac (OS 8.6). I was running Speed = disk=20 on my Mac and it hung. Now, when I try to launch Outlook I get an error=20 message that says: "An error has occurred. The end of file was reached." = and=20 Outlook fails to launch. Per Knowledge base article 296844 I have: 1. Deleted the Identity preferences file. 2. Deleted the Outlook Express preferences file. 3. Rebuilt the desktop. 4. Tried rebuilding the Outlook Express database (by holding the option = key=20 while launching. I recieved the same "end of file" message when I tried = a=2...

Accessing Mailboxes
In Exchange 2003, is it possible for me to access a users mailbox through exchange system manager, and delete mail from a folder? -- Wack ---- This message will self destruct. No. ESM does not give you any access to the actual mailbox structure. -- Ben Winzenz Exchange MVP "Dave" <dav5489@hotmail.com> wrote in message news:ecEAYiOwEHA.1204@TK2MSFTNGP10.phx.gbl... > In Exchange 2003, is it possible for me to access a users mailbox through > exchange system manager, and delete mail from a folder? > > -- > Wack > ---- > This message will self destr...

Conversion of Access97 to Access 2000
Hi All, I need an urgent help!! I'm converting an Access97 DB to 2000. After I converted the DB through Tools, DB utilities, I'm receiving an error message:"Couldn't find installable ISAM". What should I do to resolve this problem? Thanks Hi Tamer, I take it you're getting this message when running the database after converting. See http://support.microsoft.com/default.aspx?scid=kb;en-us;209805&Product=acc2000 for the usual causes of this message and how to fix most of them. On Tue, 21 Oct 2003 14:09:46 -0700, "Tamer" <anonymous@discussions...

Error in Batch Recovery
Unusual problem: One of our customer had an error is Purchase posting batch. They got the message/: “Batch XXXX failed to complete posting. Use Batch Recovery window to complete the process” So they went to Batch Recovery and tried to recover the batch. While processing in Batch recovery the got the message: “Batch XXXX failed to complete posting. Use Batch Recovery window to complete the process”. So now what do we do? Regards Omair Omair, In order for you to see and print an edit list that might tell you the problem. go to SQL server and the company database and update the ba...

cannot access online help in excel
online help works in all office 2003 programs except excel ...

Scanpst shows errors
WinXp, Office2003 both updated, 2003 format pst of 34mb Suddenly OL2003 has started giving problems, ie switching between folders or msgs is slow to display Scanpst shows errors, which it fixes however the problem reoccurs, over a period of time, and errors are again shown. There is only the OLbackup addin. Scanpst log file shows; ??Couldn't find BBT entry in the RBT (6CF618) - repeated for some 80 addresses followed by *Attempting to recover all top-level objects !!Folder invalid high-water-mark (nidi=5E94, nidiHigh=5EC7) !!Search folder invalid high-water-mark (nidi=5EA7, ...

outlook displays error message when trying to send emails to emails addresses on a outside server
hi all, outlook is displaying the error message " server rejected the following receipients" error message when i try to send emails to email id's on a different server. However the emails ID's on the same server go thru without a problem. Can anybody please help me out of this ASAP. ...

Getting mdb to work in Access 2000 runtime / Slow in Access 2007
Our company recently rolled out new pcs (DuoCore P4 with 1 GB ram) with Office 2007 pre-installed. All my databases ran very smoothly when running in Access 2000 through 2003 on Pentium 2 pcs with 256 MB ram. Now with 2007, they run VERY slow. Just entering into a new field in a form (or even directly in a table) causes the cursor to pause anywhere between 5 and 20 seconds! What happens is the cursor will blink 2 or 3 times and then stop for 5 to 20 seconds - anything typed in while the cursor is paused will not show up when the cursor starts blinking again. You can imagine how annoying...

Automatic Shutdown of Access Database
Hello. I am looking for something that will allow an automatic shutdown of Microsoft Access after a set period of non-use. We have multiple users and sometimes people will forget to close out after they are finished. I found a few 3rd party programs that seem to allow for this, but wanted to see if there was already something within Access or Windows XP that would do it before trying that route. We are running MS Access 2003 on MS Server 2000. Thank you. See: How to Detect User Idle Time or Inactivity at: http://support.microsoft.com/?id=128814 -- Allen Browne - Microsoft MV...

Access 2003 OpenDataSource
When we converted a database to Access 2003 from 2000, one piece of the opendatasource code is no longer working. The code is: With WordDoc.MailMerge .MainDocumentType = wdFormLetters .OpenDataSource Name:="C:\TEST\test.mdb", LinkToSource:=True, Connection:="TABLE LetterBuffer" End With For some reason, the Connection string does not seem to be working. This code is identical to the code in the 2000 database. No matter what we put in the " " the database does not appear to look in here. For example, if we have only one table, the code works fine, n...

WriteFile
Hi , I am using WriteFile function for writting some data to harddisk. Is there any limit in size of data it can write. Basically this function is writting imcomplete data. I checked the contents of file. ( Writs encoded data to file then decode the data using Winzip ( MIME data ) no of Bytes are at boundries like : fff, 9fff, ffff ... Any idea why this is hapening ? I'm not sure if there is a limit, or how to find out. Are you checking the parameter that tells the number of bytes written to see if it equals the number of bytes to write? Perhaps you can just keep calling WriteFile...

MS Access database to record events etc
I wish for a template for recording past golf trips, attendees, prizewinners, accommodation etc. Will anyone help me please? On Thu, 7 Feb 2008 10:09:01 -0800, PhantomA <PhantomA@discussions.microsoft.com> wrote: >I wish for a template for recording past golf trips, attendees, prizewinners, >accommodation etc. >Will anyone help me please? What help do you need? If you want someone to design and build the database for you, you should consider hiring someone to do so. This free, volunteer-staffed newsgroup is for solving specific problems you encounter as you work on database...

DataBase access in NT Service
Hello, I wrote a regular WinNT application and it did exactly what I wanted it to do, but when I moved all the procedures over and created the application to be a service application I noticed that once execution hit the line of code that opened up my dataset, it went right into my exception block of code. Does anyone know why just opening a table in a NT Service Application is causing an error. I'm using an ODBC connected to a small Access db for testing TIA Sanjeev Kumar. On 8 Dec 2003 03:14:27 -0800, sanjeev_magoo@yahoo.com (Sanjeev) wrote: If you use the MFC ODBC classes, you nee...

excel chart with data source from an access query
Hi All, I have an access query and I want to use it as the data source for a chart.Somebody told me that we can can provide the excel chart to display the data from our query.How to do that? Wish somebody would like to help me. thank's Hi, You need to create a connection to Access, here are the steps you need to do one time only. 1. In Excel choose Data, Import External Data, New Database Query 2. Pick MS Access Database from the list and click Next. 3. Locate the database, select it, and click OK. 4. Find the query on the left pane and either send all the fields (columns) to ...

How do I enable read access so I can open an access attachment 04-20-10
Messaggio multiparte in formato MIME. ------=_NextPart_000_0019_01CAE0D2.B0BCFD10 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I just bought Microsoft Office 2007 enterprise for school. When I try to = open=20 an attached "ACCESS file from mb school ( so I can edit it for homework) = a=20 box with an EXCLAMATION POINT in it shows up and says "the file does not = exist, or I don't have read access to the file.." how do I fix this so I = can=20 do my homework? One more thing, I have no problem opening an ...

OLEDB Connection String Error
I am getting the following when compiling application in VS .net #error Security Issue: The connection string may contain a password // The connection string below may contain plain text passwords and/or // other sensitive information. Please remove the #error after reviewing // the connection string for any security related issues. You may want to // store the password in some other form or use a different user authentication How do I resolve this? Thanks in advance. ...

Re: Windows Live Mail Error that I haven't been able to remove
Prev. pc was an XP on dial up, w. MSN Mail. My present Vista is on DSL, no Outlook, still mSN Mail and WIN Live Mail. Vista had mail problems until I got the LiveMail. However: For the longest time, I've had this Windows Live Mail Error popup that will not go away: Red Dot > Unable to send or receive messages for the Mail account. The host 'POP3' couldnot be found. Please verify that you have entered the server correctly. > Server: 'POP3' > Windows Live Mail Error ID: 0x800CCC0D > Protocol: POP3 > Port: 110 > Secure(SSL): No > Socket Error:...

Reset brick level access
We recently finished a migration from a 5.5 exchange server on a NT4 domain to a 2k3 exchange server on a 2k3 domain. Everything is working fine except for when i want to do a document level or brick level backup. The only username it will allow to do it is from the old domain, which is now turned off. How can i reset the permission's so that i can use the main 2k3 exchange admin account? It currently has full access to everywhere i can find to add permissions in. What error message do you get ? It could be to do with the administrators having send as and recieve as permissions den...

Upgraded to access 07 from access 03
After i upgraded from access 07 from access 03 some of my commonly used functions are no longer working. For example, reports that have StrConv now ask for a parameter value. Sugestions: 1. If you have not yet done so, tell A2007 that you trust the folder where your database resides: Office Button | Access Options | Trust Center | Trust Center Settings 2. Open a code window (e.g. Ctrl+G), and choose References on the Tools menu. Do you have any "MISSING" references? Or are there any references to a version of Office other than 12? See: http://allenbrowne.com/ser-38.h...

Access bug?
Hi all. This code: Private Sub cboNamen_AfterUpdate() Dim intRowCount As Integer Dim dblLicenceFee As Double Dim intSelectCount As Integer dblLicenceFee = 0# intSelectCount = 0 For intRowCount = 0 To Me![cboNamen].Recordset.RecordCount - 1 If (Me![cboNamen].Selected(intRowCount) = True) Then dblLicenceFee = dblLicenceFee + CDbl(Me![cboNamen].Column(2, intRowCount)) intSelectCount = intSelectCount + 1 End If Next intRowCount If (intSelectCount = 0) Then MsgBox "No licence selected!", vbInformation Else Me![tx...

Access Error
I have a problem when I leave the program I am writing for about 20 minutes it comes up with the error : Path/File access error what is causing this I can save it fine before the error and when the error comes up it just freezes. Thanks in advance Greg It sounds like you have a macro running in the background -- some type of OnTime procedure. And the drive/path that its trying to write to isn't available (bad code or a network/local drive that disappears???) Next time this happens: while in excel hit alt-f11 (to get to the VBE) hit ctrl-r (to see the project explorer) ...

Online banking access
I downloaded Mocrosoft money home and business and trying to set up the banking and credit card information for online access. Although I have active online access to the bank and credit card, it continuously tells that "Currently, the account set up is unavailable. Please try later again"(banking) and " you don't have online access to that financial institution"(Credit card). I tried many times and this problem persists. I went to online troubleshoot where I didn't find any solution for this. could anyone kindly give me the solution for this? Thanks "...

Integration Manager Access Driver Error
Since I installed Dynamics and IM 9.0 on a new PC, I receive an error trying to open any integration. Other users in my office use the same shared resource without issue. Source: Microsoft OLE DB Provider for ODBC Drivers Message: [Microsoft][ODBC Microsoft Access Driver] Invalid string or buffer length. Number: -2147467259 I have installed the latest IM service pack. ...