home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / dtx9303 / ms_c_7 / vcopy / vcopy.h < prev   
Encoding:
C/C++ Source or Header  |  1993-05-17  |  1.9 KB  |  58 lines

  1. /*======================================================*/
  2. /*                       VCOPY.H                        */
  3. /*    Copyright (C) 1993 Thomas Wölker und DMV-Verlag   */
  4. /*------------------------------------------------------*/
  5. /*                Headerfile für vcopy.c                */
  6. /*======================================================*/
  7.  
  8. /* ***********[ Allgemeine Definitionen ]****************/
  9. typedef short   BOOL;
  10. typedef unsigned WORD;
  11.  
  12. #define TRUE  1
  13. #define FALSE 0
  14.  
  15. /***************[ Copy returns etc. ]********************/
  16.  
  17. #define CP_BLOCKSIZE 32767       // Blockgröße für Kopien
  18. #define CP_OK             1      // Alles OK
  19. #define CP_ERROPENSOURCE  2
  20. #define CP_ERROPENDEST    3
  21. #define CP_ERRLOCK        4
  22. #define CP_ERRWRITE       5
  23. #define CP_ERRVLDEINIT    6
  24. #define CP_ERRVLINIT      7
  25. #define CP_ERRVMALLOC     8
  26. #define CP_ERRVLREAD      9
  27.  
  28. /***************[ Alles für die Liste ]******************/
  29.  
  30. typedef struct tagVMNODE
  31. {
  32.   struct tagVMNODE *pNext; // Zeiger auf nächsten Knoten
  33.   _vmhnd_t         hVM;    // Handle auf virt. Speicherbl.
  34.   long             cSize;  // Größe des virtuellen Blocks
  35. } VMNODE;
  36.  
  37. typedef struct tagVMROOT
  38. {
  39.   VMNODE    *pFirst;      // Zeiger auf den 1. Knoten
  40.   VMNODE    *pAct;        // Zeiger auf aktuellen Knoten
  41.   unsigned  cBlocks;      // Anzahl Blöcke
  42. } VMROOT;
  43.  
  44. /******************[ Funktionen ]************************/
  45.  
  46. WORD    Copy(char * pszSrc, char * pszDest);
  47. WORD    VLRead(int hFile, long cBlockSize, VMROOT * vmr);
  48. BOOL    VLInit(VMROOT *pRoot);
  49. VMNODE *VLAddBlock(VMROOT *pRoot, long cSize);
  50. WORD    VLReadBlock(VMNODE *pNode, int hFile, long cSize);
  51. BOOL    VLDeinit(VMROOT vmRoot);
  52. void    VLPanicAbort(VMROOT vmRoot);
  53. void    BlockStatistics(VMNODE* pvmNode, unsigned nNode);
  54. void    MemoryStatistics(void);
  55.  
  56. /*======================================================*/
  57. /*                    Ende von VCOPY.H                  */
  58.