1 //////////////////////////////////////////////////////
2 //
3 // VisualStudio 2005 PWLib Port,
4 // (c) 2007 Dinsk.net
5 // developer@dinsk.net
6 //
7 //////////////////////////////////////////////////////
8 //
9 // (c) Yuri Kiryanov, openh323@kiryanov.com and
10 //     Yuriy Gorvitovskiy
11 //
12 // for Openh323, www.Openh323.org
13 //
14 // Windows CE Port
15 //
16 // stdlib routines implemented through Windows CE API
17 //
18 
19 #include <ptlib.h>
20 
21 #ifdef _WIN32_WCE
22 
23 //#include <Atlconv.h>
24 #include <winbase.h>
25 #include <winnt.h>
26 
27 #include <ptlib/sockets.h>
28 #include <ptclib/pdns.h>
29 #include <ptclib/httpsvc.h>
30 
31 #define DELETE (0x00010000L) // defined in <winnt.h> and undef "msos/ptlib/contain.h"
32 
33 #ifndef __cplusplus
34 #include <tchar.h>
isprint(int c)35 int isprint(int c) { return _istprint(c);}
isxdigit(int c)36 int isxdigit(int c) { return _istxdigit(c); }
isspace(int c)37 int isspace( int c ) { return _istspace(c); }
isupper(int c)38 int isupper( int c ) { return _istupper(c); }
islower(int c)39 int islower( int c ) { return _istlower(c); }
isalnum(int c)40 int isalnum( int c ) { return _istalnum(c); }
isalpha(int c)41 int isalpha( int c ) { return _istalpha(c); }
iscntrl(int c)42 int iscntrl( int c ) { return _istcntrl(c); }
isdigit(int c)43 int isdigit( int c ) { return _istdigit(c); }
ispunct(int c)44 int ispunct( int c ) { return _istpunct(c); }
45 #endif
46 
47 
abort(void)48 void __cdecl abort(void)
49 {
50   static HANDLE mutex = CreateSemaphore(NULL, 1, 1, NULL);
51   WaitForSingleObject(mutex, INFINITE);
52 
53   switch (MessageBox(NULL, _T("Abort?"), _T("Portable Windows Library"),
54     MB_ABORTRETRYIGNORE|MB_ICONHAND|MB_APPLMODAL)) {
55       case IDABORT :
56         ExitProcess(255);
57 
58       case IDRETRY :
59         DebugBreak();
60   }
61 
62   ReleaseSemaphore(mutex, 1, NULL);
63 }
64 
65 
perror(const char * s)66 void __cdecl perror(const char * s)
67 {
68   PVarString msg = s;
69   MessageBox(NULL, msg, _T("Portable Tools Library"), MB_OK);
70 }
71 
72 
_lseek(int nHandle,long off,int orig)73 long _lseek(int nHandle, long off, int orig)
74 {
75   DWORD dwMoveMethod=FILE_BEGIN;
76   switch(orig)
77   {
78     case SEEK_SET:
79       dwMoveMethod=FILE_BEGIN;
80       break;
81     case SEEK_CUR:
82       dwMoveMethod=FILE_CURRENT;
83       break;
84     case SEEK_END:
85       dwMoveMethod=FILE_END;
86       break;
87   }
88   return SetFilePointer((HANDLE)nHandle,off,NULL,dwMoveMethod);
89 }
90 
91 
_close(int nHandle)92 int  _close(int nHandle)
93 {
94   FlushFileBuffers((HANDLE)nHandle);
95   return (CloseHandle((HANDLE)nHandle)) ? 0 : -1;
96 }
97 
98 
_read(int nHandle,void * p,unsigned int s)99 int  _read(int nHandle, void *p, unsigned int s)
100 {
101   DWORD size=0;
102   ReadFile((HANDLE)nHandle,p,s,&size,NULL);
103   return size;
104 }
105 
106 
_write(int nHandle,const void * p,unsigned int s)107 int  _write(int nHandle, const void *p, unsigned int s)
108 {
109   DWORD size=0;
110   WriteFile((HANDLE)nHandle,p,s,&size,NULL);
111   //[YG]???? FlushFileBuffers((HANDLE)nHandle);
112   return size;
113 }
114 
115 
_open(const char * filename,int oflag,int)116 int	_open(const char *filename, int oflag , int)
117 {
118   HANDLE	osfh;                    /* OS handle of opened file */
119   DWORD	fileaccess;               /* OS file access (requested) */
120   DWORD	fileshare;                /* OS file sharing mode */
121   DWORD	filecreate;               /* OS method of opening/creating */
122   DWORD	fileattrib;               /* OS file attribute flags */
123 
124   /*
125   * decode the access flags
126   */
127   switch( oflag & (_O_RDONLY | _O_WRONLY | _O_RDWR) )
128   {
129     case _O_RDONLY:         /* read access */
130       fileaccess = GENERIC_READ;
131       break;
132     case _O_WRONLY:         /* write access */
133       fileaccess = GENERIC_WRITE;
134       break;
135     case _O_RDWR:           /* read and write access */
136       fileaccess = GENERIC_READ | GENERIC_WRITE;
137       break;
138     default:                /* error, bad oflag */
139       set_errno(EINVAL);
140       return -1;
141   }
142 
143   /*
144   * decode sharing flags
145   */
146   fileshare = FILE_SHARE_READ | FILE_SHARE_WRITE;
147 
148   /*
149   * decode open/create method flags
150   */
151   switch ( oflag & (_O_CREAT | _O_EXCL | _O_TRUNC) )
152   {
153     case 0:
154     case _O_EXCL:                   // ignore EXCL w/o CREAT
155       filecreate = OPEN_EXISTING;
156       break;
157 
158     case _O_CREAT:
159       filecreate = OPEN_ALWAYS;
160       break;
161 
162     case _O_CREAT | _O_EXCL:
163     case _O_CREAT | _O_TRUNC | _O_EXCL:
164       filecreate = CREATE_NEW;
165       break;
166 
167     case _O_TRUNC:
168     case _O_TRUNC | _O_EXCL:        // ignore EXCL w/o CREAT
169       filecreate = TRUNCATE_EXISTING;
170       break;
171 
172     case _O_CREAT | _O_TRUNC:
173       filecreate = CREATE_ALWAYS;
174       break;
175 
176     default:
177       // this can't happen ... all cases are covered
178       set_errno(EINVAL);
179       return -1;
180   }
181 
182   /*
183   * decode file attribute flags if _O_CREAT was specified
184   */
185   fileattrib = FILE_ATTRIBUTE_NORMAL;     /* default */
186 
187   if ( oflag & _O_CREAT )
188   {
189     /*
190     * set up variable argument list stuff
191     */
192     if ( oflag & _O_RDONLY )
193       fileattrib = FILE_ATTRIBUTE_READONLY;
194   }
195 
196   /*
197   * Set temporary file (delete-on-close) attribute if requested.
198   */
199   if ( oflag & _O_TEMPORARY )
200   {
201     fileattrib |= FILE_FLAG_DELETE_ON_CLOSE;
202     fileaccess |= DELETE;
203   }
204 
205   /*
206   * Set temporary file (delay-flush-to-disk) attribute if requested.
207   */
208   if ( oflag & _O_SHORT_LIVED )
209     fileattrib |= FILE_ATTRIBUTE_TEMPORARY;
210 
211   /*
212   * Set sequential or random access attribute if requested.
213   */
214   if ( oflag & _O_SEQUENTIAL )
215     fileattrib |= FILE_FLAG_SEQUENTIAL_SCAN;
216   else if ( oflag & _O_RANDOM )
217     fileattrib |= FILE_FLAG_RANDOM_ACCESS;
218 
219   /*
220   * get an available handle.
221   *
222   * multi-thread note: the returned handle is locked!
223   */
224   /*
225   * try to open/create the file
226   */
227 
228   PWideString widefilename = filename;
229   if ( (osfh = CreateFile(widefilename,
230                           fileaccess,
231                           fileshare,
232                           NULL,
233                           filecreate,
234                           fileattrib,
235                           NULL ))
236                           == INVALID_HANDLE_VALUE )
237   {
238     return -1;                      /* return error to caller */
239   }
240   return (int)osfh;
241 }
242 
243 
_sopen(const char * filename,int oflag,int pmode,...)244 int _sopen(const char *filename, int oflag , int pmode, ...)
245 {
246   return _open(filename, oflag , pmode);
247 }
248 
249 
_chsize(int nHandle,long size)250 int	_chsize( int nHandle, long size )
251 {
252   if ((DWORD)size!=SetFilePointer((HANDLE)nHandle,size,NULL,FILE_BEGIN))
253     return -1;
254 
255   return (SetEndOfFile((HANDLE)nHandle)) ? 0 : -1;
256 }
257 
258 
259 
_mkdir(const char * sDir)260 int _mkdir(const char *sDir)
261 {
262   PString folderName = sDir;
263 
264   if (folderName[folderName.GetLength() - 1] == PDIR_SEPARATOR) {
265     folderName.Delete(folderName.GetLength() - 1, 1);
266   }
267 
268   return (CreateDirectory(folderName.AsUCS2(),NULL) ? 0 : -1);
269 }
270 
_rmdir(const char * sDir)271 int  _rmdir(const char *sDir)
272 {
273   PString folderName = sDir;
274   if (folderName[folderName.GetLength() - 1] == PDIR_SEPARATOR)
275     folderName.Delete(folderName.GetLength() - 1, 1);
276 
277   return (RemoveDirectory(folderName.AsUCS2()) ? 0 : -1);
278 }
279 
280 
_access(const char * sName,int mode)281 int  _access(const char *sName, int mode)
282 {
283   WIN32_FIND_DATA FindFileData;
284 
285   PString test(sName);
286   if (test[test.GetLength() - 1] == '.' && test[test.GetLength() - 2] == PDIR_SEPARATOR)
287     test.Delete(test.GetLength() - 2, 2);
288 
289   HANDLE file = FindFirstFile(test.AsUCS2(), &FindFileData);
290 
291   if (file == INVALID_HANDLE_VALUE )
292     return -1;
293 
294   FindClose(file);
295 
296   switch(mode)
297   {
298     case 0: //checking for the existance
299       return 0;
300     case 4: //checking for read permission
301       return 0;
302     case 2: //checking for write permission
303       return (FindFileData.dwFileAttributes&FILE_ATTRIBUTE_READONLY) ? -1 : 0;
304     case 6: //checking for read and write permission
305       return (FindFileData.dwFileAttributes&FILE_ATTRIBUTE_READONLY) ? -1 : 0;
306   }
307   return -1;
308 }
309 
310 
remove(const char * name)311 int	remove(const char *name)
312 {
313   PVarString filename = name;
314   return (DeleteFile(filename) ? 0 : -1);
315 }
316 
317 
_chmod(const char * filename,int pmode)318 int	_chmod( const char *filename, int pmode )
319 {
320   PString pstrFileName(filename);
321   DWORD attr = GetFileAttributes(pstrFileName.AsUCS2());
322   if (pmode&_S_IWRITE)
323     attr|=FILE_ATTRIBUTE_READONLY;
324   else
325     attr&=~FILE_ATTRIBUTE_READONLY;
326 
327   return (SetFileAttributes(pstrFileName.AsUCS2(), attr) ? 0: -1);
328 }
329 
330 
rename(const char * oldname,const char * newname)331 int	rename( const char *oldname, const char *newname )
332 {
333   PString pstrOldFileName(oldname);
334   PString pstrNewFileName(newname);
335   return (DeleteAndRenameFile(pstrNewFileName.AsUCS2(), pstrOldFileName.AsUCS2()) ? 0 : -1);
336 }
337 
338 //used by regex.cxx
printchar(char n)339 void printchar (char n)
340 {
341   printf(" %d ",n);
342 }
343 
344 
345 #if _WIN32_WCE < 0x501
346 
strtol(const char * nptr,char ** endptr,int ibase)347 long strtol (const char *nptr,char **endptr,int ibase)
348 {
349   const TCHAR* tnptr = PString(nptr).AsUCS2();
350   TCHAR* tendptr = NULL;
351 
352   long res= _tcstoul(tnptr,&tendptr,ibase);
353   if (endptr)
354   {
355     if (tendptr)
356       *endptr=const_cast<char*>(nptr+(tendptr-tnptr));
357     else
358       *endptr=NULL;
359   }
360   return res;
361 }
362 
strtoul(const char * nptr,char ** endptr,int ibase)363 unsigned long strtoul (const char *nptr,char **endptr,int ibase)
364 {
365   const TCHAR* tnptr = PString(nptr).AsUCS2();
366   TCHAR* tendptr = NULL;
367 
368   unsigned long res= _tcstoul(tnptr,&tendptr,ibase);
369   if (endptr)
370   {
371     if (tendptr)
372       *endptr=const_cast<char*>(nptr+(tendptr-tnptr));
373     else
374       *endptr=NULL;
375   }
376   return res;
377 }
378 
strtod(const char * nptr,char ** endptr)379 double strtod( const char *nptr, char **endptr )
380 {
381   const TCHAR* tnptr = PString(nptr).AsUCS2();
382   TCHAR* tendptr = NULL;
383 
384   double res= _tcstod(tnptr,&tendptr);
385   if (endptr)
386   {
387     if (tendptr)
388       *endptr=const_cast<char*>(nptr+(tendptr-tnptr));
389     else
390       *endptr=NULL;
391   }
392   return res;
393 }
394 
395 
strspn(const char * string,const char * strCharSet)396 size_t strspn( const char *string, const char *strCharSet )
397 {
398   const unsigned char *str = (const unsigned char*)string;
399   const unsigned char *ctrl = (const unsigned char*)strCharSet;
400 
401   unsigned char map[32];
402   int count;
403 
404   /* Clear out bit map */
405   for (count=0; count<32; count++)
406     map[count] = 0;
407 
408   /* Set bits in control map */
409   while (*ctrl)
410   {
411     map[*ctrl >> 3] |= (1 << (*ctrl & 7));
412     ctrl++;
413   }
414 
415   /* 1st char NOT in control map stops search */
416   if (*str)
417   {
418     count=0;
419     while (map[*str >> 3] & (1 << (*str & 7)))
420     {
421       count++;
422       str++;
423     }
424     return(count);
425   }
426   return(0);
427 }
428 
429 
_atoi64(const char * nptr)430 __int64 _atoi64(const char *nptr)
431 {
432   int c;              /* current char */
433   __int64 total;      /* current total */
434   int sign;           /* if '-', then negative, otherwise positive */
435 
436   /* skip whitespace */
437   while ( isspace((int)(unsigned char)*nptr) )
438     ++nptr;
439 
440   c = (int)(unsigned char)*nptr++;
441   sign = c;           /* save sign indication */
442   if (c == '-' || c == '+')
443     c = (int)(unsigned char)*nptr++;    /* skip sign */
444 
445   total = 0;
446 
447   while (isdigit(c)) {
448     total = 10 * total + (c - '0');     /* accumulate digit */
449     c = (int)(unsigned char)*nptr++;    /* get next char */
450   }
451 
452   if (sign == '-')
453     return -total;
454   else
455     return total;   /* return result, negated if necessary */
456 }
457 
458 #endif
459 
460 
x64toa(unsigned __int64 val,char * buf,unsigned radix,int is_neg)461 static void x64toa (unsigned __int64 val,char *buf,unsigned radix,int is_neg)
462 {
463   char *p;                /* pointer to traverse string */
464   char *firstdig;         /* pointer to first digit */
465   char temp;              /* temp char */
466   unsigned digval;        /* value of digit */
467 
468   p = buf;
469 
470   if ( is_neg )
471   {
472     *p++ = '-';         /* negative, so output '-' and negate */
473     val = (unsigned __int64)(-(__int64)val);
474   }
475 
476   firstdig = p;           /* save pointer to first digit */
477 
478   do {
479     digval = (unsigned) (val % radix);
480     val /= radix;       /* get next digit */
481 
482     /* convert to ascii and store */
483     if (digval > 9)
484       *p++ = (char) (digval - 10 + 'a');  /* a letter */
485     else
486       *p++ = (char) (digval + '0');       /* a digit */
487   } while (val > 0);
488 
489   /* We now have the digit of the number in the buffer, but in reverse
490   order.  Thus we reverse them now. */
491 
492   *p-- = '\0';            /* terminate string; p points to last digit */
493 
494   do {
495     temp = *p;
496     *p = *firstdig;
497     *firstdig = temp;   /* swap *p and *firstdig */
498     --p;
499     ++firstdig;         /* advance to next two digits */
500   } while (firstdig < p); /* repeat until halfway */
501 }
502 
503 
504 /* Actual functions just call conversion helper with neg flag set correctly,
505 and return pointer to buffer. */
506 
_i64toa(__int64 val,char * buf,int radix)507 char * _i64toa (__int64 val,char *buf,int radix)
508 {
509   x64toa((unsigned __int64)val, buf, radix, (radix == 10 && val < 0));
510   return buf;
511 }
512 
513 
_ui64toa(unsigned __int64 val,char * buf,int radix)514 char * _ui64toa (unsigned __int64 val,char *buf,int radix)
515 {
516   x64toa(val, buf, radix, 0);
517   return buf;
518 }
519 
520 
521 #if _WIN32_WCE < 0x502
522 
stricmp(const char * s1,const char * s2)523 int stricmp(const char* s1, const char* s2 ) { return _stricmp(s1, s2); }
524 
stricmp(const wchar_t * s1,const char * s2)525 int stricmp(const wchar_t* s1, const char* s2 )
526 {
527   int len = wcslen(s1);
528   if(NULL == s2) // Some optimization here
529     return len;
530 
531   while(--len && (*s1++ == *s2++)) ;
532   return len;
533 };
534 
535 #endif // _WIN32_WCE < 0x502
536 
537 
strdup(const char * s)538 char* strdup( const char* s )
539 {
540   char* s1 = (char*) malloc(strlen(s) +1);
541   if( s1 )
542     strcpy( s1, s );
543   return s1;
544 }
545 
546 
strcasecmp(const char * s1,const char * s2)547 int strcasecmp(const char* s1, const char* s2 )
548 {
549   return _stricmp(s1, s2);
550 }
551 
552 
strncasecmp(const char * s1,const char * s2,int n)553 int strncasecmp(const char* s1, const char* s2, int n)
554 {
555   return _strnicmp(s1, s2, n);
556 }
557 
558 
strcasecmp(const wchar_t * s1,const char * s2)559 int strcasecmp(const wchar_t* s1, const char* s2 )
560 {
561   int len = wcslen(s1);
562   if(NULL == s2) // Some optimization here
563     return len;
564 
565   while(--len && (*s1++ == *s2++)) ;
566   return len;
567 }
568 
569 
strncasecmp(const wchar_t * s1,const char * s2,int n)570 int strncasecmp( const wchar_t* s1, const char* s2, int n )
571 {
572   int len = wcslen(s1);
573   if(NULL == s2) // Some optimization here
574     return min(n, (int) wcslen(s1));
575 
576   while(--len && (towlower(*(s1++)) == tolower(*(s2++))));
577   return len;
578 };
579 
580 
strcasecmp(PString s1,const char * s2)581 int strcasecmp(PString s1, const char* s2)
582 {
583   return _stricmp((const char*) s1, s2);
584 }
585 
586 
_mktemp(char * temp)587 char * _mktemp (char *temp)
588 {
589   char *string = temp;
590   unsigned number;
591   int letter = 'a';
592   int xcount = 0;
593   int olderrno;
594 
595   _ASSERTE(temp != NULL);
596   _ASSERTE(*temp != '\0');
597 
598   number = (unsigned) GetCurrentProcess();
599 
600   while (*string)
601     string++;
602 
603 #ifndef _MBCS
604   while (*--string == 'X')
605 #else  /* _MBCS */
606   while ((string>temp) && (!__isdbcscode(temp,string-1))
607     && (*--string == 'X'))
608 #endif  /* _MBCS */
609   {
610     xcount++;
611     *string = (char)((number % 10) + '0');
612     number /= 10;
613   }
614 
615   if (*++string == '\0' || xcount != 6 )
616     return(NULL);
617 
618   olderrno = errno;       /* save current errno */
619   set_errno(0);              /* make sure errno isn't EACCESS */
620 
621   while ((_access(temp,0) == 0) || (errno == EACCES))
622     /* while file exists */
623   {
624     set_errno(0);
625     if (letter == 'z'+1)
626     {
627       set_errno(olderrno);
628       return(NULL);
629     }
630 
631     *string = (char)letter++;
632   }
633 
634   set_errno(olderrno);
635   return(temp);
636 }
637 
638 
RegDeleteValue(HKEY hKey,const char * lpValueName)639 LONG RegDeleteValue( HKEY hKey, const char* lpValueName )
640 {
641   return RegDeleteValue(hKey, PString(lpValueName).AsUCS2());
642 }
643 
644 
RegQueryValueEx(HKEY hKey,const char * lpValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData)645 LONG RegQueryValueEx( HKEY hKey, const char* lpValueName, LPDWORD lpReserved,
646                      LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData )
647 {
648   return RegQueryValueEx(hKey, PString(lpValueName).AsUCS2(), lpReserved, lpType, lpData, lpcbData);
649 }
650 
651 
RegSetValueEx(HKEY hKey,const char * lpValueName,DWORD Reserved,DWORD dwType,const BYTE * lpData,DWORD cbData)652 LONG RegSetValueEx( HKEY hKey, const char* lpValueName, DWORD Reserved,
653                    DWORD dwType, const BYTE* lpData, DWORD cbData )
654 {
655   return RegSetValueEx(hKey, PString(lpValueName).AsUCS2(), Reserved, dwType, lpData, cbData);
656 }
657 
658 
RegCreateKeyEx(HKEY hKey,const char * lpSub,DWORD dwr,LPSTR lpcls,DWORD dwo,REGSAM sam,LPSECURITY_ATTRIBUTES lpsa,PHKEY phk,LPDWORD lpdw)659 LONG RegCreateKeyEx( HKEY hKey, const char* lpSub, DWORD dwr, LPSTR lpcls, DWORD dwo,
660                     REGSAM sam, LPSECURITY_ATTRIBUTES lpsa, PHKEY phk, LPDWORD lpdw )
661 {
662   return RegCreateKeyEx( hKey, PString(lpSub).AsUCS2(), dwr,
663     (LPWSTR) (LPCWSTR) PString(lpcls).AsUCS2(), // we know this value won't change
664     dwo, sam, lpsa, phk, lpdw );
665 }
666 
667 
RegEnumKey(HKEY hKey,DWORD dwIndex,LPTSTR ptcsName,DWORD cbName)668 LONG RegEnumKey(HKEY hKey, DWORD dwIndex, LPTSTR ptcsName, DWORD cbName)
669 {	DWORD cb = cbName;
670 return RegEnumKeyEx( hKey, dwIndex, ptcsName, &cb, 0L, NULL, NULL, NULL );
671 }
672 
673 
RegEnumValueCe(HKEY hKey,DWORD dwIndex,LPTSTR ptcsValueName,LPDWORD lpcbValueName,LPDWORD lpReserved,LPDWORD lpType,LPBYTE lpData,LPDWORD lpcbData)674 LONG RegEnumValueCe( HKEY hKey, DWORD dwIndex, LPTSTR ptcsValueName, LPDWORD lpcbValueName,
675                     LPDWORD lpReserved, LPDWORD lpType, LPBYTE lpData, LPDWORD lpcbData )
676 {
677   return RegEnumValue( hKey, dwIndex, ptcsValueName, lpcbValueName,
678     lpReserved, lpType, lpData, lpcbData );
679 }
680 
681 
GetWindowsDirectory(char * lpBuffer,UINT uSize)682 UINT GetWindowsDirectory( char* lpBuffer, UINT uSize )
683 {
684   strncpy(lpBuffer, "\\Windows", uSize ); return uSize;
685 }
686 
687 
GetPrivateProfileString(const char *,const char *,const char *,char *,DWORD,const char *)688 DWORD GetPrivateProfileString(
689                               const char*, // lpAppName,        // points to section name
690                               const char*,  // lpKeyName,        // points to key name
691                               const char*, // lpDefault,        // points to default string
692                               char*, // lpReturnedString,  // points to destination buffer
693                               DWORD, // nSize,              // size of destination buffer
694                               const char*  )        // points to initialization filename
695 {
696   return (DWORD) -1L;
697 }
698 
699 
WritePrivateProfileString(const char *,const char *,const char *,const char *)700 BOOL WritePrivateProfileString(
701                                const char*, // lpAppName,  // pointer to section name
702                                const char*, // lpKeyName,  // pointer to key name
703                                const char*, // lpString,   // pointer to string to add
704                                const char* )  // pointer to initialization filename
705 {
706   return FALSE;
707 }
708 
709 //
710 // Functions to enable inclusion of windows service based code
711 //
InternalMain(void *)712 int PServiceProcess::InternalMain(void *) { return 0; };
IsServiceProcess(void) const713 bool PServiceProcess::IsServiceProcess(void)const { return true; };
PServiceProcess(char const *,char const *,unsigned short,unsigned short,enum PProcess::CodeStatus,unsigned short)714 PServiceProcess::PServiceProcess(char const *,
715 	char const *, unsigned short, unsigned short,
716 	enum PProcess::CodeStatus,unsigned short) {};
Current(void)717 PServiceProcess & PServiceProcess::Current(void)
718 { return (PServiceProcess &) PProcess::Current(); }
OnStart()719 PBoolean PServiceProcess::OnStart() { return PTrue; };
OnStop()720 void PServiceProcess::OnStop() {};
OnPause()721 PBoolean PServiceProcess::OnPause() { return PTrue; };
OnContinue()722 void PServiceProcess::OnContinue() {};
GetServiceDependencies(void) const723 char const * PServiceProcess::GetServiceDependencies(void)const { return NULL; }
724 
725 
726 #endif // _WIN32_WCE
727