Source code of Windows XP (NT5)
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.

168 lines
5.1 KiB

  1. /********************************************************************/
  2. /** Copyright(c) 1989 Microsoft Corporation. **/
  3. /********************************************************************/
  4. //***
  5. //
  6. // Filename: cmd.h
  7. //
  8. // Description:
  9. //
  10. // History:
  11. // Nov 11,1993. NarenG Created original version.
  12. //
  13. #define MACFILE_IDS_BASE 1000
  14. //
  15. // Do not change the ID numbers of these strings. AFPERR_*
  16. // map to these string ids via the formula:
  17. // -(AFPERR_*) + MACFILE_IDS_BASE + AFPERR_BASE = IDS_*
  18. //
  19. #define AFPERR_TO_STRINGID( AfpErr ) \
  20. \
  21. ((( AfpErr <= AFPERR_BASE ) && ( AfpErr >= AFPERR_MIN )) ? \
  22. (MACFILE_IDS_BASE+AFPERR_BASE-AfpErr) : AfpErr )
  23. #define IDS_AFPERR_InvalidVolumeName (MACFILE_IDS_BASE+1)
  24. #define IDS_AFPERR_InvalidId (MACFILE_IDS_BASE+2)
  25. #define IDS_AFPERR_InvalidParms (MACFILE_IDS_BASE+3)
  26. #define IDS_AFPERR_CodePage (MACFILE_IDS_BASE+4)
  27. #define IDS_AFPERR_InvalidServerName (MACFILE_IDS_BASE+5)
  28. #define IDS_AFPERR_DuplicateVolume (MACFILE_IDS_BASE+6)
  29. #define IDS_AFPERR_VolumeBusy (MACFILE_IDS_BASE+7)
  30. #define IDS_AFPERR_VolumeReadOnly (MACFILE_IDS_BASE+8)
  31. #define IDS_AFPERR_DirectoryNotInVolume (MACFILE_IDS_BASE+9)
  32. #define IDS_AFPERR_SecurityNotSupported (MACFILE_IDS_BASE+0)
  33. #define IDS_AFPERR_BufferSize (MACFILE_IDS_BASE+10)
  34. #define IDS_AFPERR_DuplicateExtension (MACFILE_IDS_BASE+12)
  35. #define IDS_AFPERR_UnsupportedFS (MACFILE_IDS_BASE+13)
  36. #define IDS_AFPERR_InvalidSessionType (MACFILE_IDS_BASE+14)
  37. #define IDS_AFPERR_InvalidServerState (MACFILE_IDS_BASE+15)
  38. #define IDS_AFPERR_NestedVolume (MACFILE_IDS_BASE+16)
  39. #define IDS_AFPERR_InvalidComputername (MACFILE_IDS_BASE+17)
  40. #define IDS_AFPERR_DuplicateTypeCreator (MACFILE_IDS_BASE+18)
  41. #define IDS_AFPERR_TypeCreatorNotExistant (MACFILE_IDS_BASE+19)
  42. #define IDS_AFPERR_CannotDeleteDefaultTC (MACFILE_IDS_BASE+20)
  43. #define IDS_AFPERR_CannotEditDefaultTC (MACFILE_IDS_BASE+21)
  44. #define IDS_AFPERR_InvalidTypeCreator (MACFILE_IDS_BASE+22)
  45. #define IDS_AFPERR_InvalidExtension (MACFILE_IDS_BASE+23)
  46. #define IDS_AFPERR_TooManyEtcMaps (MACFILE_IDS_BASE+24)
  47. #define IDS_AFPERR_InvalidPassword (MACFILE_IDS_BASE+25)
  48. #define IDS_AFPERR_VolumeNonExist (MACFILE_IDS_BASE+26)
  49. #define IDS_AFPERR_NoSuchUserGroup (MACFILE_IDS_BASE+27)
  50. #define IDS_AFPERR_NoSuchUser (MACFILE_IDS_BASE+28)
  51. #define IDS_AFPERR_NoSuchGroup (MACFILE_IDS_BASE+29)
  52. #define IDS_GENERAL_SYNTAX (MACFILE_IDS_BASE+30)
  53. #define IDS_VOLUME_SYNTAX (MACFILE_IDS_BASE+31)
  54. #define IDS_DIRECTORY_SYNTAX (MACFILE_IDS_BASE+32)
  55. #define IDS_SERVER_SYNTAX (MACFILE_IDS_BASE+33)
  56. #define IDS_FORKIZE_SYNTAX (MACFILE_IDS_BASE+34)
  57. #define IDS_AMBIGIOUS_SWITCH_ERROR (MACFILE_IDS_BASE+35)
  58. #define IDS_UNKNOWN_SWITCH_ERROR (MACFILE_IDS_BASE+36)
  59. #define IDS_DUPLICATE_SWITCH_ERROR (MACFILE_IDS_BASE+37)
  60. #define IDS_API_ERROR (MACFILE_IDS_BASE+38)
  61. #define IDS_SUCCESS (MACFILE_IDS_BASE+39)
  62. #define IDS_VOLUME_TOO_BIG (MACFILE_IDS_BASE+40)
  63. // This structure is required by GetSwitchValue. It will store the
  64. // information of the switches on the command line. This structure is
  65. // global within this module.
  66. typedef struct cmdfmt {
  67. CHAR * cf_parmstr;
  68. CHAR * cf_ptr;
  69. DWORD cf_usecount;
  70. } CMD_FMT, * PCMD_FMT;
  71. VOID
  72. ParseCmdArgList(
  73. INT argc,
  74. CHAR * argv[]
  75. );
  76. BOOL
  77. IsDriveGreaterThan2Gig( LPSTR lpwsDrivePath );
  78. VOID
  79. GetArguments(
  80. CMD_FMT * pArgFmt,
  81. CHAR * argv[],
  82. DWORD argc,
  83. DWORD ArgCount
  84. );
  85. VOID
  86. GetSwitchValue(
  87. CMD_FMT * pArgFmt,
  88. IN CHAR * pchSwitchPtr
  89. );
  90. VOID
  91. PrintMessageAndExit(
  92. DWORD ids,
  93. CHAR * pchInsertString
  94. );
  95. VOID
  96. DoVolumeAdd(
  97. CHAR * gblServer,
  98. CHAR * gblName,
  99. CHAR * gblPath,
  100. CHAR * gblPassword,
  101. CHAR * gblReadOnly,
  102. CHAR * gblGuestsAllowed,
  103. CHAR * gblMaxUses
  104. );
  105. VOID
  106. DoVolumeDelete(
  107. CHAR * gblServer,
  108. CHAR * gblName
  109. );
  110. VOID
  111. DoVolumeSet(
  112. CHAR * gblServer,
  113. CHAR * gblName,
  114. CHAR * gblPassword,
  115. CHAR * gblReadOnly,
  116. CHAR * gblGuestsAllowed,
  117. CHAR * gblMaxUses
  118. );
  119. VOID
  120. DoServerSetInfo(
  121. CHAR * gblServer,
  122. CHAR * gblMaxSessions,
  123. CHAR * gblLoginMessage,
  124. CHAR * gblGuestsAllowed,
  125. CHAR * gblUAMRequired,
  126. CHAR * pchAllowSavedPasswords,
  127. CHAR * pchMacServerName
  128. );
  129. VOID
  130. DoForkize(
  131. CHAR * gblServer,
  132. CHAR * gblType,
  133. CHAR * gblCreator,
  134. CHAR * gblDataFork,
  135. CHAR * gblResourceFork,
  136. CHAR * gblTargetFile
  137. );
  138. VOID
  139. DoDirectorySetInfo(
  140. CHAR * gblServer,
  141. CHAR * gblPath,
  142. CHAR * gblOwnerName,
  143. CHAR * gblGroupName,
  144. CHAR * gblPermissions
  145. );
  146.