/* Win32-like Services for Windows CE 5.0 and above win32 applications, such as stunnel. */ #ifndef MYWCEDEFS_H #define MYWCEDEFS_H #include #include #include #include #include LPSTR wstr2str(LPCWSTR); typedef int errno_t; errno_t _tputenv_s( const TCHAR *name, const TCHAR *value ); HICON wceLoadIconFromFile(TCHAR *filename);/* works only for BMP dib files 16x16, 16 colors (or more...) */ #define DuplicateIcon wceDuplicateIcon /* Comment this out if your SDK AND TARGET DEVICE support DuplicateIcon natively */ HICON wceDuplicateIcon( /* same -stupid- prototype as w32 DuplicateIcon */ HINSTANCE hInst, // not used HICON hIcon // handle to icon ); #define ShellExecute wceShellExecute /* Comment this out if your SDK AND TARGET DEVICE support DuplicateIcon natively */ HINSTANCE wceShellExecute( HWND hwnd, LPCTSTR lpVerb, LPCTSTR lpFile, LPCTSTR lpParameters, LPCTSTR lpDirectory, INT nShowCmd ); #define GetCurrentDirectory wceGetCurrentDirectory /* Comment this out if your SDK AND TARGET DEVICE support DuplicateIcon natively */ DWORD wceGetCurrentDirectory( DWORD nBufferLength, // size of directory buffer LPTSTR lpBuffer // directory buffer ); /* For ANSI WCE version of _tcsrchr : there is a lack of macro def in tchar.h, fixed here */ #ifdef _WIN32_WCE #ifndef _tcsrchr #ifdef UNICODE #define _tcsrchr wcsrchr #else #define _tcsrchr strrchr #endif #endif #endif #endif