5 /* unique difinition in wince platform. */
8 #define CONTEXT_FLOATING_POINT 0x00000002L
11 /* LockFile difinition. */
12 #define LOCKFILE_FAIL_IMMEDIATELY 0x00000001
13 #define LOCKFILE_EXCLUSIVE_LOCK 0x00000002
15 /* Dual Mode difinition. */
16 #define STARTF_USESHOWWINDOW 0x00000001
17 #define STARTF_USESIZE 0x00000002
18 #define STARTF_USEPOSITION 0x00000004
19 #define STARTF_USECOUNTCHARS 0x00000008
20 #define STARTF_USEFILLATTRIBUTE 0x00000010
21 #define STARTF_RUNFULLSCREEN 0x00000020
22 #define STARTF_FORCEONFEEDBACK 0x00000040
23 #define STARTF_FORCEOFFFEEDBACK 0x00000080
24 #define STARTF_USESTDHANDLES 0x00000100
25 /* #define STARTF_USEHOTKEY 0x00000200 */
27 #define STD_INPUT_HANDLE (DWORD)-10
28 #define STD_OUTPUT_HANDLE (DWORD)-11
29 #define STD_ERROR_HANDLE (DWORD)-12
31 #define NORMAL_PRIORITY_CLASS 0x00000020
32 #define IDLE_PRIORITY_CLASS 0x00000040
33 #define HIGH_PRIORITY_CLASS 0x00000080
34 #define REALTIME_PRIORITY_CLASS 0x00000100
38 #define SO_SYNCHRONOUS_NONALERT 0x20
40 /* MoveFileEx definition. */
41 #define MOVEFILE_REPLACE_EXISTING 0x00000001
43 #define MOVEFILE_COPY_ALLOWED 0x00000002
44 #define MOVEFILE_DELAY_UNTIL_REBOOT 0x00000004
45 #define MOVEFILE_WRITE_THROUGH 0x00000008
46 #define MOVEFILE_CREATE_HARDLINK 0x00000010
47 #define MOVEFILE_FAIL_IF_NOT_TRACKABLE 0x00000020
57 /* Win32 API redifinition. */
60 #define GetCommandLine GetCommandLineA
62 #undef SetFileAttributes
63 #define SetFileAttributes SetFileAttributesA
65 #undef GetFileAttributes
66 #define GetFileAttributes GetFileAttributesA
69 #define FormatMessage FormatMessageA
71 #undef GetModuleFileName
72 #define GetModuleFileName GetModuleFileNameA
75 #define CreateFile CreateFileA
78 #define MoveFile MoveFileA
81 #define DeleteFile DeleteFileA
84 #define CreateProcess CreateProcessA
87 #define CharNext CharNextA
90 #define CharPrev CharPrevA
92 #undef WIN32_FIND_DATA
93 #define WIN32_FIND_DATA WIN32_FIND_DATAA
96 #define FindFirstFile FindFirstFileA
99 #define FindNextFile FindNextFileA
102 FILE *freopen(const char *filename
, const char *mode
, FILE *file
);
103 FILE *fdopen( int handle
, const char *mode
);
105 //#define fdopen _fdopen
108 char *getenv(const char *charstuff
);
109 char *_fullpath(char *absPath
, const char *relPath
, size_t maxLength
);
112 char *strdup(const char * str
);
113 /* char *strerror(int errno); */
114 int strnicmp( const char *s1
, const char *s2
, size_t count
);
116 //#define strnicmp _strnicmp
117 #define stricmp _stricmp
120 FARPROC
GetProcAddressX(HMODULE hModule
, LPCSTR lpProcName
);
122 BOOL
MoveFileEx(LPCSTR oldname
, LPCSTR newname
, DWORD dwFlags
);
123 BOOL
DuplicateHandle(
124 HANDLE source_process
, HANDLE source
,
125 HANDLE dest_process
, HANDLE
*dest
,
126 DWORD access
, BOOL inherit
, DWORD options
);
127 BOOL
LockFile(HANDLE hFile
,
128 DWORD dwFileOffsetLow
, DWORD dwFileOffsetHigh
,
129 DWORD nNumberOfBytesToLockLow
, DWORD nNumberOfBytesToLockHigh
);
130 BOOL
LockFileEx(HANDLE hFile
,
131 DWORD dwFlags
, DWORD dwReserved
,
132 DWORD nNumberOfBytesToLockLow
, DWORD nNumberOfBytesToLockHigh
,
133 LPOVERLAPPED lpOverlapped
);
134 BOOL
UnlockFile( HFILE hFile
,
135 DWORD dwFileOffsetLow
, DWORD dwFileOffsetHigh
,
136 DWORD nNumberOfBytesToUnlockLow
, DWORD nNumberOfBytesToUnlockHigh
);
137 BOOL
UnlockFileEx(HANDLE hFile
,
138 DWORD dwReserved
, DWORD nNumberOfBytesToUnlockLow
,
139 DWORD nNumberOfBytesToUnlockHigh
, LPOVERLAPPED lpOverlapped
);
140 BOOL
GetUserName(LPSTR lpBuffer
, LPDWORD nSize
);
141 BOOL
CreatePipe(PHANDLE hReadPipe
, PHANDLE hWritePipe
,
142 LPSECURITY_ATTRIBUTES lpPipeAttributes
, DWORD nSize
);
143 HANDLE
GetStdHandle(DWORD nStdHandle
);
144 BOOL
SetStdHandle(DWORD nStdHandle
, HANDLE h
);
145 DWORD
GetLogicalDrives(VOID
);
146 DWORD
WaitForMultipleObjectsEx(DWORD count
,
147 const HANDLE
*handles
, BOOL wait_all
,
148 DWORD timeout
, BOOL alertable
);
149 DWORD
GetEnvironmentVariable(LPCSTR name
, LPSTR value
, DWORD size
);
150 LPVOID
GetEnvironmentStrings(VOID
);
151 BOOL
FreeEnvironmentStrings(LPSTR lpszEnvironmentBlock
);
152 BOOL
GenerateConsoleCtrlEvent(DWORD dwCtrlEvent
,
153 DWORD dwProcessGroupID
);
154 BOOL
GetProcessTimes(HANDLE hprocess
,
155 LPFILETIME lpCreationTime
, LPFILETIME lpExitTime
,
156 LPFILETIME lpKernelTime
, LPFILETIME lpUserTime
);
158 /* char -> wchar_t, wchar_t -> char */
159 wchar_t* wce_mbtowc(const char* a
);
160 char* wce_wctomb(const wchar_t* w
);
162 void wce_SetCommandLine(LPCWSTR wcmd
);
163 void wce_FreeCommandLine(void);
164 TCHAR
*wce_replaceRelativeDir(const char* str
);
165 void wce_SetCurrentDir();
168 /* for Handheld PC Pro. */
169 char *strrchr( const char *p
, int c
);
170 int stricmp( const char *p1
, const char *p2
);
171 VOID
ZeroMemory(PVOID p
, DWORD length
);
173 #define isascii(c) ( (c>=0x00&&c<=0x7f)?1:0 )
174 #define isspace(c) ( ((c>=0x09&&c<=0x0d)||c==0x20)?1:0 )
175 #define isdigit(c) ( (c>=0x00&&c<=0x09)?1:0 )
176 #define isupper(c) ( (c>='A'&&c<='Z')?1:0 )
177 #define isalpha(c) ( ((c>='A'&&c<='Z')||(c>='a'&&c<='z'))?1:0 )
178 #define isprint(c) ( (c>=0x20&&c<=0x7e)?1:0 )
179 #define isalnum(c) ( (isalpha(c)||isdigit(c))?1:0 )
180 #define iscntrl(c) ( ((c>=0x00&&c<=0x1f)||c==0x7f)?1:0 )
181 #define islower(c) ( (c>='a'&&c<='z')?1:0 )
182 #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 )
183 #define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 )
191 #endif /* _EXT_CE_ */