You can use the IOCTL IOCTL_UFN_CHANGE_CURRENT_CLIENT on the USB function
controller to change the current function driver.
http://msdn.microsoft.com/en-us/library/ms895475.aspx
If you need it you may be able to use the composite USB driver which should
allow ActiveSync and MSC at the same time:
http://msdn.microsoft.com/en-us/library/aa909606.aspx
> Our BSP can supports either ActiveSync or MSC by modifying register at
> compile-time. We like to make it to be switchable in run-time.
>
> Casper
Casper - 18 Jun 2008 02:47 GMT
I find this link with code in this link. I am trying it now. Thanks
Casper
http://tw.myblog.yahoo.com/ken-sena/article?mid=15&prev=19&next=12
> You can use the IOCTL IOCTL_UFN_CHANGE_CURRENT_CLIENT on the USB function
> controller to change the current function driver.
[quoted text clipped - 10 lines]
> >
> > Casper
GSR - 26 Jun 2008 16:27 GMT
Hi Casper,
How can I send IOCTLs to USB Device.
Is it the same way by using
CreateFile(TEXT("UFN1:"),GENERIC_READ,0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,NULL);
But it always fails I mean the Handle returned is always a NULL value.
By the way what is this
LPCTSTR pszBusGuid = _T("E2BDC372-598F-4619-BC50-54B3F7848D35");
In the code written by Henrik Viklund.
Regards,
Sudheer
What we did before is to unload the USB activesync driver, change the
registry at run-time, then
load the USB mass storage driver, it works well.
-Zebra,
MVP @ TECHWARE
> Our BSP can supports either ActiveSync or MSC by modifying register at
> compile-time. We like to make it to be switchable in run-time.
>
> Casper
GSR - 22 Jul 2008 17:29 GMT
Hi Zebra,
Thank You for the reply.
I observed that USB MDD is having some IOCOntrol's to change the clients.
Can we use the following IOCTL to change the Client driver as
"IOCTL_UFN_CHANGE_CURRENT_CLIENT"
Thank You & Regards,
GSR
> What we did before is to unload the USB activesync driver, change the
> registry at run-time, then
[quoted text clipped - 7 lines]
> >
> > Casper