/* Win32-like Services for Windows CE 5.0 and above win32 applications, such as stunnel. Copyright (C) 2014 Pierre DELAAGE This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #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