DiskInit.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:6k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       DiskInit.h
  3.  
  4.      Contains:   Disk Initialization Package ('PACK' 2) Interfaces.
  5.  
  6.      Version:    Technology: System 8.5
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1985-2001 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __DISKINIT__
  18. #define __DISKINIT__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #if PRAGMA_ONCE
  23. #pragma once
  24. #endif
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. #if PRAGMA_IMPORT
  29. #pragma import on
  30. #endif
  31. #if PRAGMA_STRUCT_ALIGN
  32.     #pragma options align=mac68k
  33. #elif PRAGMA_STRUCT_PACKPUSH
  34.     #pragma pack(push, 2)
  35. #elif PRAGMA_STRUCT_PACK
  36.     #pragma pack(2)
  37. #endif
  38. struct HFSDefaults {
  39.     char                            sigWord[2];                 /* signature word */
  40.     long                            abSize;                     /* allocation block size in bytes */
  41.     long                            clpSize;                    /* clump size in bytes */
  42.     long                            nxFreeFN;                   /* next free file number */
  43.     long                            btClpSize;                  /* B-Tree clump size in bytes */
  44.     short                           rsrv1;                      /* reserved */
  45.     short                           rsrv2;                      /* reserved */
  46.     short                           rsrv3;                      /* reserved */
  47. };
  48. typedef struct HFSDefaults              HFSDefaults;
  49. enum {
  50.     kHFSPlusDefaultsVersion     = 1
  51. };
  52. struct HFSPlusDefaults {
  53.     UInt16                          version;                    /* version of this structure */
  54.     UInt16                          flags;                      /* currently undefined; pass zero */
  55.     UInt32                          blockSize;                  /* allocation block size in bytes */
  56.     UInt32                          rsrcClumpSize;              /* clump size for resource forks */
  57.     UInt32                          dataClumpSize;              /* clump size for data forks */
  58.     UInt32                          nextFreeFileID;             /* next free file number */
  59.     UInt32                          catalogClumpSize;           /* clump size for catalog B-tree */
  60.     UInt32                          catalogNodeSize;            /* node size for catalog B-tree */
  61.     UInt32                          extentsClumpSize;           /* clump size for extents B-tree */
  62.     UInt32                          extentsNodeSize;            /* node size for extents B-tree */
  63.     UInt32                          attributesClumpSize;        /* clump size for attributes B-tree */
  64.     UInt32                          attributesNodeSize;         /* node size for attributes B-tree */
  65.     UInt32                          allocationClumpSize;        /* clump size for allocation bitmap file */
  66. };
  67. typedef struct HFSPlusDefaults          HFSPlusDefaults;
  68. #if CALL_NOT_IN_CARBON
  69. EXTERN_API( void )
  70. DILoad                          (void)                                                      THREEWORDINLINE(0x7002, 0x3F00, 0xA9E9);
  71. EXTERN_API( void )
  72. DIUnload                        (void)                                                      THREEWORDINLINE(0x7004, 0x3F00, 0xA9E9);
  73. EXTERN_API( short )
  74. DIBadMount                      (Point                  where,
  75.                                  UInt32                 evtMessage)                         THREEWORDINLINE(0x7000, 0x3F00, 0xA9E9);
  76. EXTERN_API( OSErr )
  77. DIFormat                        (short                  drvNum)                             THREEWORDINLINE(0x7006, 0x3F00, 0xA9E9);
  78. EXTERN_API( OSErr )
  79. DIVerify                        (short                  drvNum)                             THREEWORDINLINE(0x7008, 0x3F00, 0xA9E9);
  80. EXTERN_API( OSErr )
  81. DIZero                          (short                  drvNum,
  82.                                  ConstStr255Param       volName)                            THREEWORDINLINE(0x700A, 0x3F00, 0xA9E9);
  83. /*
  84.     DIXFormat, DIXZero, and DIReformat are only available when FSM (File System Manager) is installed.
  85.     FSM is part of Macintosh PC Exchange and System 7.5.
  86. */
  87. EXTERN_API( OSErr )
  88. DIXFormat                       (short                  drvNum,
  89.                                  Boolean                fmtFlag,
  90.                                  unsigned long          fmtArg,
  91.                                  unsigned long *        actSize)                            THREEWORDINLINE(0x700C, 0x3F00, 0xA9E9);
  92. EXTERN_API( OSErr )
  93. DIXZero                         (short                  drvNum,
  94.                                  ConstStr255Param       volName,
  95.                                  short                  fsid,
  96.                                  short                  mediaStatus,
  97.                                  short                  volTypeSelector,
  98.                                  unsigned long          volSize,
  99.                                  void *                 extendedInfoPtr)                    THREEWORDINLINE(0x700E, 0x3F00, 0xA9E9);
  100. EXTERN_API( OSErr )
  101. DIReformat                      (short                  drvNum,
  102.                                  short                  fsid,
  103.                                  ConstStr255Param       volName,
  104.                                  ConstStr255Param       msgText)                            THREEWORDINLINE(0x7010, 0x3F00, 0xA9E9);
  105. #endif  /* CALL_NOT_IN_CARBON */
  106. #if CALL_NOT_IN_CARBON
  107. EXTERN_API_C( OSErr )
  108. dibadmount                      (Point *                where,
  109.                                  long                   evtMessage);
  110. EXTERN_API_C( OSErr )
  111. dizero                          (short                  drvnum,
  112.                                  const char *           volName);
  113. #endif  /* CALL_NOT_IN_CARBON */
  114. #if PRAGMA_STRUCT_ALIGN
  115.     #pragma options align=reset
  116. #elif PRAGMA_STRUCT_PACKPUSH
  117.     #pragma pack(pop)
  118. #elif PRAGMA_STRUCT_PACK
  119.     #pragma pack()
  120. #endif
  121. #ifdef PRAGMA_IMPORT_OFF
  122. #pragma import off
  123. #elif PRAGMA_IMPORT
  124. #pragma import reset
  125. #endif
  126. #ifdef __cplusplus
  127. }
  128. #endif
  129. #endif /* __DISKINIT__ */