C++/VB - usb bulk transfer question
Asked By cpparm
03-Jul-07 08:46 PM
the maximum packet size of the pipes on my usb device is 512 but it seems
like with WDF I don't need to send seperate request. I just call
WdfUsbTargetPipeFormatRequestForWrite/Read followed by WdfRequestSend in my
code. It seems to work no matter how big my buffer is. Does the framework
take care of dividing the buffer up? I sometimes need to read a data buffer
as big as 10M, is there any problem sending a 10M buffer in FileRead and
just forward the request in my kernel driver?
WdfUsbTargetPipeFormatRequestForWrite
(1)
Vista
(1)
XP
(1)
WdfRequestSend
(1)
FileRead
(1)
Boekelheide
(1)
Providenza
(1)
Segement
(1)
Doron Holan [MSFT] replied...
the framework does not segement the buffer it max packet sizes, the usb core
does that. do not confuse max packet size with max transfer size. just
send the transfer in one chunk and the lower layers will take care of the
segmenting for you
d
--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
Tim Roberts replied...
Right. You didn't you need to do so with WDM either.
No. The host controller takes care of this. It has always done so.
http://support.microsoft.com/kb/832430
For USB 2.0 devices, Microsoft documents a 3.3MB limit.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Wei Wang replied...
Thanks a lot for the answer. I was confused.
Does this 3.3MB limit exist in Vista also?
Tim Roberts replied...
I do not know, but it does not really matter. As a practical matter, you
cannot really ignore XP.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

0f, &mesh, NULL); Win32 DirectX Graphics Discussions D3DXMatrixLookAtLH (1) D3DXMatrixRotationY (1) D3DXCreateCylinder (1) OnD3D9FrameRender (1) XP (1) IDirect3DDevice9 (1) DrawIndexedPrimitive (1) UnlockVertexBuffer (1) [Please do not mail me a copy of M, T1836%T<FEX5')A;G-L871I;VXH)FUA = % = O<FQD+#$P+C!F+# N, &8L, "XP M9BD[#0H)<&0S9$1E = FEC92T^4V5T5')A;G-F;W)M*"!$, T144U]73U), 1"PF C P, # P, #LL"B @.38N, S Y.38W.RTW, 2XR, 3<W, 3([ M, "XP, # P, # [+ H@("TY-BXS, #DY-C<[-S$N, C$W-S$R.S N, # P Y, 3$W.RP*(" M M.38N, S Y.38W.RTW, 2XR, 3<W, 3([, "XP, # P, # [+ H@(#DV+C, P.3DV-SLM M-S$N, C$W-S$R.S CLP+C P, # P, #LL"B @+3DV+C, P.3DV-SLW, 2XR, 3<W, 3([, "XP, # P M, # [+ H@("TY-BXS, #DY-C<[-S$N, C$W-S$R.S$Q C0S.3$Q-SLL"B @+3DV+C, P.3DV-SLW M, 2XR, 3<W, 3([, "XP, # P, # [+ H@("TY-BXS, #DY-C<[+3<Q+C(Q-S<Q, CLQ M, 3 3@L, "PQ.3LL"B @, SLQ.2PV+#$X.SL*"B @ M365S:$YO<FUA;', @('L*(" @-CL*(" @, "XP, # P, # [, "XP, # P, # [+3$N M, # P, # P.RP*(" @, "XP, # P, # [, "XP, # P, # [, 2XP, # P, # [+ H@(" P
happens? And if I click, it does not do anything also. Win32 DirectX Graphics Discussions XP (1) Ghz (1) E871E169F96 (1) Notebook (1) 38P.S (1) Dxut (1) Bits (1) TME C!F M+" P+C!F+"TS, "XP9B I.PT*(" @($0S1%A614-43U(S('95<%9E8R@@, "XP M9BP@, 2XP9BP@, "XP9B I.PT*(" @($0S1%A-051225A!, 38@;6%T5FEE = SL- M"B @("!$, T1836%T<FEX3&]O P+C P, # P, #LP+C P, # P M, #LP+C P, # P, #LL"B @, "XP, # P, # [, "XP, # P, # [, "XP, # P, # [+ H@ M(# N, # P, # P.S N, # P, # P.S N, # P, # P.RP P+C P, # P, #LP+C P M, # P, #LP+C P, # P, #LL"B @, "XP, # P, # [, "XP, # P, # [, "XP, # P, # [ M+ H@(# N, # P, # P.S N, # P, # P.S N, # P, # P.RP
backward compatibility in Vista C++ / VB I have been programming on XP machines, using C++ 6.0. Now I am moving to a Vista pc in order to work out issues in my code that have arisen in Vista. Can I assume that smooth running in Vista will mean the same for XP users? I hope I don't have to program separately for the two platforms. VC MFC Discussions TagCREATESTRUCTW (1) TIGdnZfA9elDJybbnZ2dnUVZ (1) QdnQ46ttaQBCbbnZ2dnUVZ (1) Windows XP (1) Virtual PC (1) Visual Studio 2005 (1) Windows Server (1) Windows Vista (1) For the most part, a C++ app running well on Vista will probably work
MSVCRT differnet in Vista C++ / VB I am upgrading to Vista but still support some VB6 application. If I Package (Visual Studio package and deploy) my applications in XP they work across 2000, XP, Vista and 7. But if I Package them under Vista I get an "unable to find entry point " in the MSVCRT.dll when installing on 2000 or XP machines. Under windows 2000 and XP it appears this DLL only had handlers 1 and 2 but in Vista it has
a bug in the common control wrapped by CTreeCtrl. Repro (VS2008, compiled and run on Vista): 1. Create a dialog-based native mode application. 2. Place a CTreeCtrl on the form dwStyleBits = m_ctrl_treeAdapters.GetExtendedStyle(); dwStyleBits & = TVS_EX_FADEINOUTEXPANDOS; m_ctrl_treeAdapters.SetExtendedStyle (0, dwStyleBits); 2. Use SetWindowTheme to change to Vista-style buttons. Note that I have NOT used SetWindowTheme to set visual styles consistent with so decided to post here. Bob Moore http: / / bobmoore.mvps.org / VC MFC Discussions Windows XP (1) Visual Studio 2008 (1) Visual Studio 2005 (1) Windows Vista (1) Vista (1) XP (1) SetWindowTheme (1) OnEraseBkgnd (1) Can I sort-of-copy-and-paste this into my display driver quirk by any chance? Dave I'll try it on one of the Vista test machines downstairs and let you guys know. I'm the only one with a Vista dev machine :-) - - Bob Moore http: / / bobmoore.mvps.org / (this is a non-commercial site and