Re: [wcelibcex-devel] missing functions
Brought to you by:
mloskot
From: Mateusz L. <ma...@lo...> - 2007-01-03 01:57:39
|
Peter Kümmel wrote: > Hello, > I'm thinking about porting a application to Windows CE 5.0. If you'll want to use WCELIBCEX, please drop me a note. I'd love to hear who is using it :-) > Below is a list of some compiler errors. > > What do you think about the complexity of implementing > the functions not already part of wcelib? OK, I'll try to give a short overview below: > '_get_osfhandle': identifier not found This function returnes file handle (HANDLE) from file descriptor. I can't see any solution about this now. *osfhandle functions require some infrastructure deep inside the C library like internal tables of file handles, etc. WCELIBCEX does not provide such features on the lowest level of system libraries. It just extends C and other system libraries with functions possible to implement without implementing a very low level stuff or affecting existing system libs. The only possible solution I can see for now is to use: long _get_osfhandle(int filehandle) { return (long)filehandle; } but Windows CE's HANDLE does not map directly to file descriptor. So, simple casting won't work in many cases. > '_getdrive': identifier not found There are no drives in Windows CE, so this function could return root directory int _getdrive(void) { return 1; // or other number } > '_O_NOINHERIT' : undeclared identifier > '_S_IREAD' : undeclared identifier > '_S_IWRITE' : undeclared identifier These constants are already available in WCELIBCEX, used by stat() function. > '_wchdir': identifier not found This function is already available. > '_wchmod': identifier not found There is no concept of file permissions on Windows CE. ATM, I've no idea how to implement it. > '_wgetcwd' : is not a member of '`global namespace'' This function is already available. > '_wsopen_s': identifier not found This function is not available. I'm not sure how to implement it. > 'GetCurrentDirectoryW': identifier not found This function is already available. > 'GetFullPathNameA': identifier not found > 'GetFullPathNameW': identifier not found These functions are available. > 'GetLogicalDrives': identifier not found > 'SEM_FAILCRITICALERRORS' : undeclared identifier > 'SEM_NOOPENFILEERRORBOX' : undeclared identifier There is no concept of drive on Windows CE. I'm not sure how to implement it. > 'SetCurrentDirectoryW': identifier not found It's almost the same as chdir() and wchdir(), so I can sell it's available :-) > 'SetErrorMode': identifier not found I can't see any way to have it working. > 'SystemTimeToTzSpecificLocalTime': identifier not found Not available, but should not be a big problem. > 'fd_set' : undeclared identifier > 'FD_SET': identifier not found > 'FD_ZERO': identifier not found > 'rd' : undeclared identifier Functions for I/O synchronization and multiplexing. I can't see any way how to implement it for Windows CE. > 'resolve': identifier not found > 'select': identifier not found > 'sn_except' : undeclared identifier > 'sn_read' : undeclared identifier > 'sn_write' : undeclared identifier > 'sockfd' : undeclared identifier Sockets functions should be easy to implement. > 'WaitForSingleObjectEx': identifier not found It's easy to implement it as: DWORD WaitForMultipleObjectsEx(DWORD nCount, const HANDLE* lpHandles, BOOL bWaitAll, DWORD dwMilliseconds, BOOL bAlertable /* not used */) { return WaitForMultipleObjects(nCount, lpHandles, bWaitAll, dwMilliseconds); } > 'WM_NCCREATE' : undeclared identifier It's GUI-related. No such a message on Windows CE. > '_beginthread': identifier not found > '_beginthreadex': identifier not found > '_endthreadex': identifier not found These are usually wrappers on CreateThread and other functions from Windows API, so it's feasible to have them on Windows CE too. I hope my explanation will help you. BTW, Are you porting an application from Symbian to Windows CE? Cheers -- Mateusz Loskot http://mateusz.loskot.net |