11 #ifndef _WINCEFIXUPS_H_ 12 #define _WINCEFIXUPS_H_ 14 #if _WIN32_WCE >= 0x0600 15 #define _CRT_SECURE_NO_DEPRECATE 35 #define ASSERT_PRINT(exp,file,line) OutputDebugStringB(TEXT("\r\n*** ASSERTION FAILED in ") TEXT(file) TEXT("(") TEXT(#line) TEXT("):\r\n") TEXT(#exp) TEXT("\r\n")) 36 #define ASSERT_AT(exp,file,line) (void)( (exp) || (ASSERT_PRINT(exp,file,line), DebugBreak(), 0 ) ) 37 #define assert(exp) ASSERT_AT(exp,__FILE__,__LINE__) 43 #define sprintf_s _snprintf 53 #define stricmp(x, y ) _stricmp( (x), (y) ) 54 #define strcasecmp _stricmp 55 #define strncasecmp _strnicmp 57 #undef RegQueryValueEx 58 #define RegQueryValueEx(x,y,z,a,b,c) RegQueryValueExB(x,y,z,a,b,c) 60 #define FormatMessage(x,y,z,a,b,c,d) FormatMessageB(x,y,z,a,b,c,d) 62 #define CreateMutex( x,y,z) CreateMutexB( x,y,z) 63 #undef CreateSemaphore 64 #define CreateSemaphore( x,y,z,a) CreateSemaphoreB( x,y,z,a) 66 #define CreateProcess(x,y,z,a,b,c,d,e,f,g) CreateProcessB(x,y,z,a,b,c,d,e,f,g) 68 #define CreateFile(x,y,z,a,b,c,d) CreateFileB(x,y,z,a,b,c,d) 69 #undef OutputDebugString 70 #define OutputDebugString(x) OutputDebugStringB(x) 72 #define SEM_FAILCRITICALERRORS 0 74 #define chdir(x) _chdir(x) 75 #define strdup(x) _strdup(x) 76 #define itoa(x, y, z) _itoa(x, y, z) 77 #define memicmp(x, y, z) _memicmp(x, y, z) 78 #define putenv(x) _putenv(x) 80 #define EACCES 13 // Orig 1 81 #define EMFILE 24 // Orig 2 82 #define ENOENT 2 // Orig 3 85 #define GetProcAddressW(x, y) GetProcAddressA(x, y) 89 #define EINVAL 22 // Orig 1234 90 #define EINTR 4 // Orig 1235 94 #define ECONNRESET 101 96 #define ECONNREFUSED 103 110 #define _A_NORMAL 0x00 111 #define _A_RDONLY 0x01 112 #define _A_HIDDEN 0x02 113 #define _A_SYSTEM 0x04 114 #define _A_SUBDIR 0x10 123 #define O_RDONLY 0x0000 124 #define O_WRONLY 0x0001 125 #define O_RDWR 0x0002 126 #define O_APPEND 0x0008 128 #define O_CREAT 0x0100 129 #define O_TRUNC 0x0200 130 #define O_EXCL 0x0400 132 #define O_TEXT 0x4000 133 #define O_BINARY 0x8000 135 #define _S_IFMT 0x0001 // mask type 136 #define _S_IFDIR 0x0002 // directory 137 #define _S_IFCHR 0x0004 // Character special (indicates a device if set) 138 #define _S_IFREG 0x0008 // Regular 139 #define _S_IREAD 0x0010 // Read permission, owner 140 #define _S_IWRITE 0x0020 // Write permission, owner 141 #define _S_IEXEC 0x0040 // Execute/serach permission, owner 143 #define S_IFMT 0x0001 // mask type 144 #define S_IFDIR 0x0002 // directory 145 #define S_IFCHR 0x0004 // Character special (indicates a device if set) 146 #define S_IFREG 0x0008 // Regular 147 #define S_IREAD 0x0010 // Read permission, owner 148 #define S_IWRITE 0x0020 // Write permission, owner 149 #define S_IEXEC 0x0040 // Execute/serach permission, owner 165 #define STARTF_USESTDHANDLES 0x00000100 169 #define STD_INPUT_HANDLE -10 170 #define STD_OUTPUT_HANDLE -11 171 #define STD_ERROR_HANDLE -12 185 extern "C" int errno;
190 long RegQueryValueExB( HKEY hKey,
const char *lpName, DWORD *lpReserved, DWORD *lpType,
unsigned char *lpData, DWORD *lpcbData );
191 HANDLE
CreateMutexB( LPSECURITY_ATTRIBUTES lpMutexAttr, BOOL bInitialOwner,
char *pNme );
192 DWORD
FormatMessageB( DWORD dwFlags,
void *lpVoid, DWORD dwMessageID, DWORD dwLangID,
char *pBuffer, DWORD dwSize, va_list *Args );
193 HANDLE
CreateSemaphoreB( LPSECURITY_ATTRIBUTES lpSemaphoreAttr, LONG lInitialCount, LONG lMaxCount,
char *pName );
194 HANDLE
CreateFileB(
const char *pFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
195 LPSECURITY_ATTRIBUTES lpSecAttr, DWORD dwCreationDisp, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile );
198 LPSECURITY_ATTRIBUTES lpsaProcess,
199 LPSECURITY_ATTRIBUTES lpsaThread,
200 BOOL fInheritHandles,
204 LPSTARTUPINFO lpStartUpInfo,
205 LPPROCESS_INFORMATION lpProcInfo );
210 int rmdir(
const char * dirname );
211 char *
getcwd(
char *buffer,
int maxlen );
217 void WINAPI
perror(
char *pC );
219 char * WINAPI
strerror(
int iErrNo );
220 int _chdir(
const char *p1 );
221 int _mkdir(
const char *p1 );
222 int rename(
const char *p1,
const char *p2 );
223 int remove(
const char *p1 );
224 int _open(
const char *filename,
int oflag );
230 int _putenv(
const char *pIn );
231 int write(
int fd,
const void *buffer,
unsigned int count );
232 int open(
const char *filename,
int oflag );
233 #pragma warning( disable : 4031 ) 234 int open(
const char *filename,
int oflag,
int pmode );
235 #pragma warning( default : 4031 ) 237 long lseek(
int fd,
long offset,
int origin );
238 int fstat(
int fd,
struct stat *buffer );
239 int read(
int fd,
void *buffer,
unsigned int count );
252 int GetMessageA(LPMSG lpMsg,HWND hWnd,
unsigned int wMsgFilterMin,
unsigned int wMsgFilterMax) ;
258 #define CreateEventA CE_CreateEventA 260 LPSECURITY_ATTRIBUTES lpEventAttributes,
266 #define RegOpenKeyExA CE_RegOpenKeyExA 275 WINMMAPI MMRESULT WINAPI
timeSetEvent(UINT uDelay, UINT uResolution,
276 LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent);
283 WCHAR szPname[MAXPNAMELEN];
293 size_t strftime(
char *
const s,
const size_t maxsize,
const char *
const format,
const struct tm *
const t);
294 time_t
mktime(
struct tm *t);
295 struct tm * __cdecl
gmtime(
const time_t *timer );
296 struct tm * __cdecl
localtime(
const time_t *timer );
297 time_t __cdecl
time( time_t *ptt );
303 #endif // _WINCEFIXUPS_H_ Definition: WinCEFixups.h:279
void WINAPI perror(char *pC)
WINBASEAPI HMODULE WINAPI GetModuleHandleA(LPCSTR pIn)
int rename(const char *p1, const char *p2)
long intptr_t
Definition: WinCEFixups.h:40
BOOL PostThreadMessageA(DWORD idThread, UINT Msg, WPARAM wParam, LPARAM lParam)
DWORD dwFormats
Definition: WinCEFixups.h:284
HANDLE CreateSemaphoreB(LPSECURITY_ATTRIBUTES lpSemaphoreAttr, LONG lInitialCount, LONG lMaxCount, char *pName)
HINSTANCE LoadLibraryA(LPCSTR pIn)
int st_nlink
Definition: WinCEFixups.h:158
void _ftime(struct _timeb *)
short dstflag
Definition: WinCEFixups.h:50
MMVERSION vDriverVersion
Definition: WinCEFixups.h:282
int read(int fd, void *buffer, unsigned int count)
int open(const char *filename, int oflag)
int size
Definition: WinCEFixups.h:106
int SetErrorMode(int iUnused)
size_t strftime(char *const s, const size_t maxsize, const char *const format, const struct tm *const t)
int st_rdev
Definition: WinCEFixups.h:159
int GetMessageA(LPMSG lpMsg, HWND hWnd, unsigned int wMsgFilterMin, unsigned int wMsgFilterMax)
HANDLE CreateMutexB(LPSECURITY_ATTRIBUTES lpMutexAttr, BOOL bInitialOwner, char *pNme)
struct tagWAVEINCAPS_W WAVEINCAPS_W
long CE_RegOpenKeyExA(HKEY hKey, LPCSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
void GetSystemTimeAsFileTime(LPFILETIME pFT)
int fstat(int fd, struct stat *buffer)
char *WINAPI strerror(int iErrNo)
WORD wPid
Definition: WinCEFixups.h:281
BOOL CreateProcessB(char *pName, char *pCmdLine, LPSECURITY_ATTRIBUTES lpsaProcess, LPSECURITY_ATTRIBUTES lpsaThread, BOOL fInheritHandles, DWORD dwCreate, LPVOID lpvEnv, char *pCurDir, LPSTARTUPINFO lpStartUpInfo, LPPROCESS_INFORMATION lpProcInfo)
time_t time
Definition: WinCEFixups.h:47
time_t time_create
Definition: WinCEFixups.h:101
HANDLE CE_CreateEventA(LPSECURITY_ATTRIBUTES lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPTSTR lpName)
unsigned attrib
Definition: WinCEFixups.h:100
intptr_t _findnext(long hFile, struct _finddata_t *pFD)
unsigned int GetSystemDirectory(char *cP, unsigned int uSize)
int dwHighDateTime
Definition: WinCEFixups.h:119
int st_atime
Definition: WinCEFixups.h:153
short timezone
Definition: WinCEFixups.h:49
HANDLE GetStdHandle(int nStdHandle)
long RegQueryValueExB(HKEY hKey, const char *lpName, DWORD *lpReserved, DWORD *lpType, unsigned char *lpData, DWORD *lpcbData)
int write(int fd, const void *buffer, unsigned int count)
int rmdir(const char *dirname)
HANDLE CreateFileB(const char *pFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecAttr, DWORD dwCreationDisp, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile)
time_t time_write
Definition: WinCEFixups.h:103
char * getcwd(char *buffer, int maxlen)
Definition: WinCEFixups.h:151
int _chdir(const char *p1)
struct tm *__cdecl localtime(const time_t *timer)
struct tm *__cdecl gmtime(const time_t *timer)
intptr_t _findfirst(const char *pName, struct _finddata_t *pFD)
void OutputDebugStringB(const char *pC)
struct _xFILETIME * xLPFILETIME
DWORD FormatMessageB(DWORD dwFlags, void *lpVoid, DWORD dwMessageID, DWORD dwLangID, char *pBuffer, DWORD dwSize, va_list *Args)
void * _findclose(long hFile)
Definition: WinCEFixups.h:117
int _open(const char *filename, int oflag)
WORD wChannels
Definition: WinCEFixups.h:285
long lseek(int fd, long offset, int origin)
int st_dev
Definition: WinCEFixups.h:155
int st_size
Definition: WinCEFixups.h:160
int st_mode
Definition: WinCEFixups.h:156
time_t time_access
Definition: WinCEFixups.h:102
unsigned short millitm
Definition: WinCEFixups.h:48
int dwLowDateTime
Definition: WinCEFixups.h:118
WORD wMid
Definition: WinCEFixups.h:280
Definition: WinCEFixups.h:98
_W64 signed int intptr_t
Definition: stdint.h:118
int st_ctime
Definition: WinCEFixups.h:154
int st_mtime
Definition: WinCEFixups.h:157
time_t mktime(struct tm *t)
int _putenv(const char *pIn)
int _mkdir(const char *p1)
Definition: WinCEFixups.h:45
WINMMAPI MMRESULT WINAPI timeSetEvent(UINT uDelay, UINT uResolution, LPTIMECALLBACK fptc, DWORD dwUser, UINT fuEvent)
WORD wReserved1
Definition: WinCEFixups.h:286