On Wed, Jan 23, 2013 at 9:37 PM, Xiaofan Chen <xiaof...@gmail.com> wrote:
>>> I have issues building both libusbx WinCE branch and the Windows CE
>>> USB wrapper.
>>
>> Which branch were you using? I've just tried the libusbx master in VS2005
>> and it all builds nicely.
>>
>> The https://github.com/pbatard/libusbx/commits/wince-integration branch was
>> broken when I last tried it, but Pete has fixed all those issue before
>> merging into libusbx master.
>
> Okay, I will try the master again.

Yes libusbx.git master is fine. Thanks.

So I consider the libusbx WinCE integration to be good now and
1.0.15's most important task has been done. Thanks!

With regard to CE USB Wrapper, it is out of scope for libusbx
project. But I would still like to be able to compile this and
test this if possible.

I can ask my colleague to help on WinCE 6.0 as well but it will
take even longer time since the CE 6.0 port has not been tested.

>>> 1) Windows CE USB Wrapper:
>>> https://github.com/RealVNC/CEUSBKWrapper
>>
>>
>> If you're building for a WinCE 5.0 system then you'll have trouble. The big
>> (and hopefully only) issue is that between WinCE 5.0 and WinCE 6.0 the
>> method for kernel code to access user memory changed significantly.
>>
>> Currently the UserBuffer.cpp file only has an implementation for the WinCE
>> 6.0 API. I'll see if I can track down a WinCE 5.0 baseport, but if I can't,
>> would it be possible for you to try a patch if I provide it?
>
> Yes I can try the patch.
>
>>>
>>> BUILD: [01:0000000031:ERRORE]
>>> c:\WINCE500\PLATFORM\RABASE\SRC\TESTS\usb\drv\UserBuffer.h(38) : error
>>> C2100: illegal indirection
>>>
>>
>> That isn't the issue with different kernel APIs between WinCE 5 and WinCE6.
>> Can you try the attached patch and see if that fixes all of the issues other
>> than the UserBuffer.cpp compilation?
>
> Okay will do that later. Thanks.

Yes the patch helps. There are also issues with undefined ARG_IO_PDW,
ARG_I_PDW and ARG_O_PDW, this can be easily solved by adding their
definitions to UserBuffer.h.

++++++++++++++++++++++++++
define ARG_O_BIT           0x8     // all output pointer parameters
have this bit set
#define ARG_I_BIT           0x4     // all input pointer parameters
have this bit set

/* function signature generation macros */

//#define ARG_DW              0   // scaler, dword

// I64 argument is *NOT* support for it makes argument passing hard to
optimize (can't simple take the # of arguments
// and allocate space for it). Use ARG_IO_PI64 instead to pass
pointer, or split it into 2 arguments.
//#define ARG_I64             1   // scaler, 64-bit value

#define ARG_I_PTR           (ARG_I_BIT)             // input only
pointer, size in the next argument
#define ARG_I_WSTR          (ARG_I_BIT|1)           // input only,
unicode string
#define ARG_I_ASTR          (ARG_I_BIT|2)           // input only, ascii string
#define ARG_I_PDW           (ARG_I_BIT|3)           // input only, ptr
to DWORD (can be used for constant sized structure for kernel PSL)

#define ARG_O_PTR           (ARG_O_BIT)             // output only
pointer, size in the next argument
#define ARG_O_PDW           (ARG_O_BIT|1)           // output only,
pointer to DWORD
#define ARG_O_PI64          (ARG_O_BIT|2)           // output only,
pointer to 64 bit value

#define ARG_IO_PTR          (ARG_I_BIT|ARG_O_BIT)   // I/O pointer,
size in the next argument
#define ARG_IO_PDW          (ARG_IO_PTR|1)          // I/O pointer to DWORD
#define ARG_IO_PI64         (ARG_IO_PTR|2)          // I/O pointer to
64 bit value

// !! KERNEL PSL ONLY !! ptr to const sized (< 64K) structure
#define ARG_CPTR            ARG_IO_PDW
//#define ARG_PTR             ARG_IO_PDW
++++++++++++++++++++++++++++++++++++

The final issue is the real block so I agree with you that CE 5.0
needs a patch to get
the USB driver wrapper work.
BUILD: [01:0000000070:ERRORE]
c:\WINCE500\PLATFORM\RABASE\SRC\TESTS\usb\drv\UserBuffer.cpp(187) :
error C3861: 'CeDriverDuplicateCallerHandle': identifier not found,
even with argument-dependent lookup

-- 
Xiaofan

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to