Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.7 KiB

  1. #ifndef DEBUG
  2. #include <malloc.h>
  3. #endif
  4. ERR ErrSysOpenFile( CHAR *szFileName, HANDLE *phf, ULONG ulFileSize, BOOL fReadOnly, BOOL fOverlapped );
  5. ERR ErrSysOpenReadFile( CHAR *szFileName, HANDLE *phf );
  6. ERR ErrSysCloseHandle( HANDLE hf );
  7. #define ErrSysCloseFile( hf ) ErrSysCloseHandle( hf )
  8. #ifdef ANGEL
  9. ERR ErrSysDeleteFile( CHAR *szFileName );
  10. #else
  11. ERR ErrSysDeleteFile( const CHAR *szFileName );
  12. #endif
  13. ERR ErrSysNewSize( HANDLE hf, ULONG ulFileSize, ULONG ulFileSizeHigh, BOOL fOverlapped );
  14. ERR ErrSysMove( CHAR *szFrom, CHAR *szTo );
  15. ERR ErrSysCopy( CHAR *szFrom, CHAR *szTo, BOOL fFailIfExists );
  16. ERR ErrSysReadBlock( HANDLE hf, VOID *pvBuf, UINT cbBuf, UINT *pcbRead );
  17. ERR ErrSysWriteBlock( HANDLE hf, VOID *pvBuf, UINT cbBuf, UINT *pcbWritten );
  18. VOID SysTerm( VOID );
  19. VOID SysDebugBreak( VOID );
  20. /* text normalization
  21. /**/
  22. ERR ErrSysCheckLangid( LANGID langid );
  23. VOID SysNormText( CHAR *rgchText, INT cchText, BYTE *rgchNorm, INT cbNorm, INT *pbNorm );
  24. INT SysCmpText( const CHAR *sz1, const CHAR *sz2 );
  25. ERR ErrSysNormText(
  26. const BYTE *pbField,
  27. INT cbField,
  28. INT cbKeyBufLeft,
  29. BYTE *pbSeg,
  30. INT *pcbSeg );
  31. VOID SysStringCompare( char __far *pb1, unsigned long cb1,
  32. char __far *pb2, unsigned long cb2, unsigned long sort,
  33. long __far *plResult );
  34. typedef struct _olp
  35. {
  36. ULONG ulInternal;
  37. ULONG ulInternalHigh;
  38. ULONG ulOffset;
  39. ULONG ulOffsetHigh;
  40. SIG sigIO;
  41. } OLP;
  42. ERR ErrSysReadBlockOverlapped( HANDLE hf, VOID *pvBuf, UINT cbBuf,
  43. DWORD *pcbRead, OLP *polp );
  44. ERR ErrSysWriteBlockOverlapped( HANDLE hf, VOID *pvBuf, UINT cbBuf,
  45. DWORD *pcbWrite, OLP *polp );
  46. ERR ErrSysGetOverlappedResult( HANDLE hf, OLP *polp, UINT *pcb,
  47. BOOL fWait );
  48. ERR ErrSysWriteBlockEx( HANDLE hf, VOID *pvBuf, UINT cbBuf, OLP *polp, VOID *pfnCompletion);
  49. ERR ErrSysReadBlockEx( HANDLE hf, VOID *pvBuf, UINT cbBuf, OLP *polp, VOID *pfnCompletion);
  50. VOID SysChgFilePtr( HANDLE hf, LONG lRel, LONG *plRelHigh, ULONG ulRef, ULONG *pul );
  51. VOID SysGetDateTime( JET_DATESERIAL *pdt );
  52. VOID SysSleep( ULONG ulTime );
  53. VOID SysSleepEx( ULONG ulTime, BOOL fAlert );
  54. ERR ErrSysCreateThread( ULONG (*pulfn)(), ULONG cbStack, LONG lThreadPriority, HANDLE *phandle );
  55. VOID SysExitThread( ULONG ulExitCode );
  56. BOOL FSysExitThread( HANDLE handle );
  57. ULONG UlSysThreadId( VOID );
  58. ERR ErrSysGetComputerName( CHAR *sz, INT *pcb);
  59. /* Unicode Support
  60. /**/
  61. ERR ErrSysMapString(LANGID langid, BYTE *pbField, INT cbField, BYTE *rgbSeg,
  62. int cbBufLeft, int *cbSeg);
  63. VOID SysCheckWriteBuffer( BYTE *pvBuf, INT cbBuf );
  64. /* Memory allocation
  65. /**/
  66. #define cbMemoryPage 4096
  67. VOID *PvSysAlloc( ULONG dwSize );
  68. VOID *PvSysCommit( VOID *pv, ULONG dwSize );
  69. VOID *PvSysAllocAndCommit( ULONG dwSize );
  70. VOID SysFree( VOID *pv );