Re: WritePipeAsync returns error code e00002c2 (Bad Argument)
Re: WritePipeAsync returns error code e00002c2 (Bad Argument)
- Subject: Re: WritePipeAsync returns error code e00002c2 (Bad Argument)
- From: Ian was here <email@hidden>
- Date: Fri, 30 Jan 2009 13:30:41 -0800 (PST)
I didn't realize there was a USB mailing list. Thanks for the info. I solved my own problem. The second parameter needed to be a 1 for write, not a 2 (which is for a read).
--- On Fri, 1/30/09, Dave Camp <email@hidden> wrote:
> From: Dave Camp <email@hidden>
> Subject: Re: WritePipeAsync returns error code e00002c2 (Bad Argument)
> To: email@hidden
> Date: Friday, January 30, 2009, 12:22 PM
> If it's a USB question, you should probably ask it on
> the USB mailing list...
>
> Dave
>
> On Jan 30, 2009, at 12:02 PM, Ian was here wrote:
>
> > For some reasom when I call WritePipeAsync(), I get
> error code e0002c2 (kIOReturnBadArgument). I Googled the
> heck out of it and haven't found any similar issues. If
> I use WritePipe(), it works great. Here is my code:
> >
> >
> > char gBuffer[64] = {0};
> >
> > gBuffer[0] = 1;
> > gBuffer[1] = 1;
> > gBuffer[2] = 's';
> >
> > IOReturn kr =
> (*interface)->WritePipeAsync(interface, 2, gBuffer,
> sizeof(gBuffer),
> (IOAsyncCallback1)WriteCompletion, (void *)interface);
> >
> >
> > Note: this is taken from Apple's USB sample code.
> >
> >
> >
> > _______________________________________________
> >
> > Cocoa-dev mailing list (email@hidden)
> >
> > Please do not post admin requests or moderator
> comments to the list.
> > Contact the moderators at
> cocoa-dev-admins(at)lists.apple.com
> >
> > Help/Unsubscribe/Update your Subscription:
> >
> >
> > This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden