home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / EDMI5.ZIP / IFSR0.ZIP / R0STUBS.C < prev   
C/C++ Source or Header  |  1993-10-04  |  48KB  |  1,209 lines

  1. /******************************************************************************
  2. *******************************************************************************
  3. **
  4. ** EXR0R3 - A ring 0/ring 3 IFS skeleton
  5. ** Copyright (C) 1993 by Andre Asselin
  6. **
  7. ** R0STUBS.C - Ring 0 stubs
  8. **
  9. ** History:
  10. ** 5/25/93 - created
  11. **
  12. *******************************************************************************
  13. ******************************************************************************/
  14.  
  15. #include "r0inc.h"
  16.  
  17. #if defined(__cplusplus)
  18. extern "C" {
  19. #endif
  20.  
  21. /******************************************************************************
  22. ** Name of IFS
  23. ******************************************************************************/
  24.  
  25. char pascal FS_NAME[] = "EXR0R3";
  26.  
  27.  
  28. /******************************************************************************
  29. ** Attributes of IFS
  30. ******************************************************************************/
  31.  
  32. #define SUP_REMOTE
  33. //#define SUP_UNC
  34. //#define SUP_LOCK
  35. //#define SUP_LVL7
  36. //#define SUP_FILEIO
  37. //#define SUP_PAGEIO
  38.  
  39. unsigned long int pascal FS_ATTRIBUTE = 0
  40. #if defined(SUP_REMOTE)
  41.                         | FSA_REMOTE   /* If file system is remote          */
  42. #endif
  43. #if defined(SUP_UNC)
  44.                         | FSA_UNC      /* If IFS supports UNC               */
  45. #endif
  46. #if defined(SUP_LOCK)
  47.                         | FSA_LOCK     /* If IFS supports file locking      */
  48. #endif
  49. #if defined(SUP_LVL7)
  50.                         | FSA_LVL7     /* If IFS supports QPathInfo level 7 */
  51. #endif
  52.                         ;
  53.  
  54.  
  55. #if defined(__cplusplus)
  56. }
  57. #endif
  58.  
  59. /******************************************************************************
  60. *******************************************************************************
  61. **
  62. ** Primary entry points
  63. **
  64. *******************************************************************************
  65. ******************************************************************************/
  66.  
  67.  
  68.  
  69.  
  70.  
  71. /*-----------------------------------------------------------------------------
  72. --
  73. -- Volume management
  74. --
  75. -----------------------------------------------------------------------------*/
  76.  
  77.  
  78. /******************************************************************************
  79. **
  80. ** FS_ATTACH - Attach or detach a drive or device
  81. **
  82. ** Parameters
  83. ** ----------
  84. ** unsigned short flag                  indicates attaching/detaching
  85. **   values:
  86. **     FSA_ATTACH               attach drive/device
  87. **     FSA_DETACH               detach drive/device
  88. **     FSA_ATTACH_INFO          return info on attached drive/device
  89. ** char far *pDev                       drive or device that is being attached/detached
  90. ** struct vpfsd far *pvpfsd             pointer to FSD dependant volume parameters
  91. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  92. ** void far *pParm                      UNVERIFIED pointer to FSD dependant attachment info
  93. ** unsigned short far *pLen             length of area pointed to by pParm
  94. **
  95. ******************************************************************************/
  96.  
  97. #pragma argsused
  98. short int far pascal _export _loadds FS_ATTACH(unsigned short flag, 
  99.                                                char far *pDev,
  100.                                                struct vpfsd far *pvpfsd,
  101.                                                struct cdfsd far *pcdfsd,
  102.                                                void far *pParm,
  103.                                                unsigned short far *pLen) {
  104.    unsigned short rc;
  105.  
  106.    // If control program isn't attached, immediately return
  107.    if (!CPAttached)
  108.       return (ERROR_NOT_READY);
  109.  
  110.    // Make sure this thread can change the buffers
  111.    rc = FSH_SEMREQUEST(&CPData.BufLock, MAXCPRDYWAIT);
  112.    if (rc == ERROR_SEM_TIMEOUT) {
  113.       return (ERROR_NOT_READY);
  114.    } else if (rc != NO_ERROR) {
  115.       return rc;
  116.    }
  117.  
  118.    // And make sure the control program isn't changing them
  119.    rc = FSH_SEMWAIT(&CPData.CmdComplete, MAXCPRDYWAIT);
  120.    if (rc == ERROR_SEM_TIMEOUT) {
  121.       FSH_SEMCLEAR(&CPData.BufLock);
  122.       return (ERROR_NOT_READY);
  123.    } else if (rc != NO_ERROR) {
  124.       FSH_SEMCLEAR(&CPData.BufLock);
  125.       return rc;
  126.    }
  127.  
  128.    // Verify parameters
  129.    if (flag == FSA_ATTACH || flag == FSA_DETACH) {
  130.       rc = FSH_PROBEBUF(PB_OPREAD, pParm, *pLen);
  131.    } else if (flag == FSA_ATTACH_INFO) {
  132.       rc = FSH_PROBEBUF(PB_OPWRITE, pParm, *pLen);
  133.    } else {
  134.       return ERROR_INVALID_PARAMETER;
  135.    }
  136.    if (rc != NO_ERROR)
  137.       return rc;
  138.  
  139.    // Make sure the control program is still attached (this is how we
  140.    // know our buffers are still valid)
  141.    if (!CPAttached) {
  142.       FSH_SEMCLEAR(&CPData.BufLock);
  143.       return (ERROR_NOT_READY);
  144.    }
  145.  
  146.    // From here to the FSH_SEMSET(&CPData.CmdComplete), we MUST NOT block
  147.  
  148.    CPData.OpData->funccode = CPFC_ATTACH;
  149.    CPData.OpData->attach.flag = flag;
  150.    strncpy(CPData.OpData->attach.Dev, pDev, sizeof(CPData.OpData->attach.Dev));
  151.    CPData.OpData->attach.vpfsd = *pvpfsd;
  152.    CPData.OpData->attach.cdfsd = *pcdfsd;
  153.    CPData.OpData->attach.Len = *pLen;
  154.    memcpy(CPData.Buf, pParm, *pLen);
  155.  
  156.    // Set sem that we'll wait on
  157.    rc = FSH_SEMSET(&CPData.CmdComplete);
  158.    if (rc != NO_ERROR) {
  159.       FSH_SEMCLEAR(&CPData.CmdComplete);
  160.       FSH_SEMCLEAR(&CPData.BufLock);
  161.       return rc;
  162.    }
  163.  
  164.    // Tell the control program to do the operation
  165.    rc = FSH_SEMCLEAR(&CPData.CmdReady);
  166.  
  167.    // Wait until the CP is done
  168.    rc = FSH_SEMWAIT(&CPData.CmdComplete, MAXCPRESWAIT);
  169.    if (!CPAttached || rc == ERROR_SEM_TIMEOUT) {
  170.       // If we got a timeout, abort
  171.       FSH_SEMCLEAR(&CPData.BufLock);
  172.       return (ERROR_NOT_READY);
  173.    } else if (rc != NO_ERROR) {
  174.       // Some other error occurred, abort
  175.       FSH_SEMCLEAR(&CPData.BufLock);
  176.       return (rc);
  177.    }
  178.  
  179.    // Copy results
  180.    *pvpfsd = CPData.OpData->attach.vpfsd;
  181.    *pcdfsd = CPData.OpData->attach.cdfsd;
  182.    *pLen = CPData.OpData->attach.Len;
  183.    if (flag == FSA_ATTACH_INFO)
  184.       memcpy(pParm, CPData.Buf, *pLen);
  185.  
  186.    rc = CPData.OpData->rc;
  187.  
  188.    // We CANNOT access the buffers after this line
  189.    FSH_SEMCLEAR(&CPData.BufLock);
  190.  
  191.    return rc;
  192. }
  193.  
  194.  
  195. /******************************************************************************
  196. **
  197. ** FS_MOUNT - Examine a volume to determine if the IFS knows its format
  198. **
  199. ** Parameters
  200. ** ----------
  201. ** unsigned short flag                  indicates function to perform
  202. **   values:
  203. **     MOUNT_MOUNT              mount or accept the volume
  204. **     MOUNT_VOL_REMOVED        volume has been removed
  205. **     MOUNT_RELEASE            release all resources associated with the volume
  206. **     MOUNT_ACCEPT             accept the volume in preparation for formatting
  207. ** struct vpfsi far *pvpfsi             pointer to FSD independant volume parameters
  208. ** struct vpfsd far *pvpfsd             pointer to FSD dependant volume parameters
  209. ** unsigned short hVPB                  volume handle
  210. ** char far *pBoot                      pointer to sector 0 data
  211. **
  212. ******************************************************************************/
  213.  
  214. #pragma argsused
  215. short int far pascal _export _loadds FS_MOUNT(unsigned short flag, struct vpfsi far *pvpfsi,
  216.                               struct vpfsd far *pvpfsd, unsigned short hVPB, char far *pBoot)
  217. {
  218.    return ERROR_NOT_SUPPORTED;
  219. }
  220.  
  221.  
  222. /******************************************************************************
  223. **
  224. ** FS_FSINFO - Get/Set file system information
  225. **
  226. ** Parameters
  227. ** ----------
  228. ** unsigned short flag                  indicates function to perform
  229. **   values:
  230. **     INFO_RETREIVE                    retrieve information
  231. **     INFO_SET                         set information
  232. ** unsigned short hVPB                  volume handle
  233. ** char far *pData                      UNVERIFIED pointer to data buffer
  234. ** unsigned short cbData                length of data buffer
  235. ** unsigned short level                 type of information to return
  236. **
  237. ******************************************************************************/
  238.  
  239. #pragma argsused
  240. short int far pascal _export _loadds FS_FSINFO(unsigned short flag, unsigned short hVPB,
  241.                                char far *pData, unsigned short cbData,
  242.                                unsigned short level)
  243. {
  244.    return ERROR_NOT_SUPPORTED;
  245. }
  246.  
  247.  
  248. /******************************************************************************
  249. **
  250. ** FS_FLUSHBUF - Flush buffers for a specified volume
  251. **
  252. ** Parameters
  253. ** ----------
  254. ** unsigned short hVPB                  handle to volume to flush
  255. ** unsigned short flag                  indicates whether to discard or retain cache
  256. **   values:
  257. **     FLUSH_RETAIN     retain cached information
  258. **     FLUSH_DISCARD    discard cached information
  259. **
  260. ******************************************************************************/
  261.  
  262. #pragma argsused
  263. short int far pascal _export _loadds FS_FLUSHBUF(unsigned short hVPB, unsigned short flag)
  264. {
  265.    return ERROR_NOT_SUPPORTED;
  266. }
  267.  
  268.  
  269.  
  270. /*-----------------------------------------------------------------------------
  271. --
  272. -- Directory management
  273. --
  274. -----------------------------------------------------------------------------*/
  275.  
  276.  
  277.  
  278. /******************************************************************************
  279. **
  280. ** FS_CHDIR - Change current directory
  281. **
  282. ** Parameters
  283. ** ----------
  284. ** unsigned short flag                  indicates flavor of call
  285. **   values:
  286. **     CD_EXPLICIT      creating a new current directory
  287. **     CD_VERIFY        verifying a current directory
  288. **     CD_FREE          freeing an instance of a current directory
  289. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  290. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  291. ** char far *pDir                       pointer to directory to change to
  292. ** unsigned short iCurDirEnd            offset to the end of the current directory in pDir
  293. **
  294. ******************************************************************************/
  295.  
  296. #pragma argsused
  297. short int far pascal _export _loadds FS_CHDIR(unsigned short flag, struct cdfsi far *pcdfsi,
  298.                               struct cdfsd far *pcdfsd, char far *pDir,
  299.                               unsigned short iCurDirEnd)
  300. {
  301.    return ERROR_NOT_SUPPORTED;
  302. }
  303.  
  304.  
  305. /******************************************************************************
  306. **
  307. ** FS_MKDIR - Make a new directory
  308. **
  309. ** Parameters
  310. ** ----------
  311. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  312. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  313. ** char far *pName                      pointer to directory name to create
  314. ** unsigned short iCurDirEnd            offset to the end of the current directory
  315. **                                      in pName
  316. ** char *pEABuf                         UNVERIFIED pointer to EAs to attach
  317. **                                      to new directory
  318. ** unsigned short flags                 0x40 = directory is non 8.3 filename
  319. **
  320. ******************************************************************************/
  321.  
  322. #pragma argsused
  323. short int far pascal _export _loadds FS_MKDIR(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  324.                               char far *pName, unsigned short iCurDirEnd,
  325.                               char far *pEABuf, unsigned short flags)
  326. {
  327.    return ERROR_NOT_SUPPORTED;
  328. }
  329.  
  330.  
  331. /******************************************************************************
  332. **
  333. ** FS_RMDIR - Delete directory
  334. **
  335. ** Parameters
  336. ** ----------
  337. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  338. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  339. ** char far *pName                      pointer to directory name to delete
  340. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  341. **
  342. ******************************************************************************/
  343.  
  344. #pragma argsused
  345. short int far pascal _export _loadds FS_RMDIR(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  346.                               char far *pName, unsigned short iCurDirEnd)
  347. {
  348.    return ERROR_NOT_SUPPORTED;
  349. }
  350.  
  351.  
  352.  
  353. /*-----------------------------------------------------------------------------
  354. --
  355. -- File management
  356. --
  357. -----------------------------------------------------------------------------*/
  358.  
  359.  
  360.  
  361. /******************************************************************************
  362. **
  363. ** FS_CHGFILEPTR - Change current location in file
  364. **
  365. ** Parameters
  366. ** ----------
  367. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  368. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  369. ** long offset                          signed offset
  370. ** unsigned short type                  indicates seek type
  371. **   values:
  372. **     CFP_RELBEGIN     move pointer relative to begining of file
  373. **     CFP_RELCUR       move pointer relative to current position in file
  374. **     CFP_RELEND       move pointer relative to end of file
  375. ** unsigned short IOflag                bitfield of I/O suggestions
  376. **   values:
  377. **     IOFL_WRITETHRU   write all updated data before returning
  378. **     IOFL_NOCACHE     don't cache any new data
  379. **
  380. ******************************************************************************/
  381.  
  382. #pragma argsused
  383. short int far pascal _export _loadds FS_CHGFILEPTR(struct sffsi far *psffsi, struct sffsd far *psffsd,
  384.                                    long offset, unsigned short type, unsigned short IOflag)
  385. {
  386.    return ERROR_NOT_SUPPORTED;
  387. }
  388.  
  389.  
  390. /******************************************************************************
  391. **
  392. ** FS_CLOSE - Close an open file
  393. **
  394. ** Parameters
  395. ** ----------
  396. ** unsigned short type                  indicates close type
  397. **   values:
  398. **     FS_CL_ORDINARY   this is not the final close of the file
  399. **     FS_CL_FORPROC    this is the final close of the file for the process
  400. **     FS_CL_FORSYS     this is the final close of the file for the whole system
  401. ** unsigned short IOflag                bitfield of I/O suggestions
  402. **   values:
  403. **     IOFL_WRITETHRU   write all updated data before returning
  404. **     IOFL_NOCACHE     don't cache any new data
  405. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  406. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  407. **
  408. ******************************************************************************/
  409.  
  410. #pragma argsused
  411. short int far pascal _export _loadds FS_CLOSE(unsigned short type, unsigned short IOflag,
  412.                               struct sffsi far *psffsi, struct sffsd far *psffsd)
  413. {
  414.    return ERROR_NOT_SUPPORTED;
  415. }
  416.  
  417.  
  418. /******************************************************************************
  419. **
  420. ** FS_COMMIT - Commit a file to disk
  421. **
  422. ** Parameters
  423. ** ----------
  424. ** unsigned short type                  indicates commit type
  425. **   values:
  426. **     FS_COMMIT_ONE    commit this one file
  427. **     FS_COMMIT_ALL    commit all files
  428. ** unsigned short IOflag                bitfield of I/O suggestions
  429. **   values:
  430. **     IOFL_WRITETHRU   write all updated data before returning
  431. **     IOFL_NOCACHE     don't cache any new data
  432. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  433. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  434. **
  435. ******************************************************************************/
  436.  
  437. #pragma argsused
  438. short int far pascal _export _loadds FS_COMMIT(unsigned short type, unsigned short IOflag,
  439.                                struct sffsi far *psffsi, struct sffsd far *psffsd)
  440. {
  441.    return ERROR_NOT_SUPPORTED;
  442. }
  443.  
  444.  
  445. /******************************************************************************
  446. **
  447. ** FS_COPY - Copy a file
  448. **
  449. ** Parameters
  450. ** ----------
  451. ** unsigned short flag                  indicates flavor of call
  452. **   values:
  453. **     DCPY_EXISTING    if destination file exists, replace it
  454. **     DCPY_APPEND      source file should be appended to destination file
  455. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  456. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  457. ** char far *pSrc                       pointer to source filename
  458. ** unsigned short iSrcCurDirEnd         offset to the end of the current directory in pSrc
  459. ** char far *pDst                       pointer to destination filename
  460. ** unsigned short iDstCurDirEnd         offset to the end of the current directory in pDst
  461. ** unsigned short nameType              0x40 = destination is non 8.3 filename
  462. **
  463. ******************************************************************************/
  464.  
  465. #pragma argsused
  466. short int far pascal _export _loadds FS_COPY(unsigned short flag, struct cdfsi far *pcdfsi,
  467.                              struct cdfsd far *pcdfsd, char far *pSrc,
  468.                              unsigned short iSrcCurDirEnd, char far *pDst,
  469.                              unsigned short iDstCurDirEnd, unsigned short nameType)
  470. {
  471.    return ERROR_CANNOT_COPY;
  472. }
  473.  
  474.  
  475. /******************************************************************************
  476. **
  477. ** FS_DELETE - Delete a file
  478. **
  479. ** Parameters
  480. ** ----------
  481. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  482. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  483. ** char far *pFile                      pointer to filename to delete
  484. ** unsigned short iCurDirEnd            offset to the end of the current directory in pFile
  485. **
  486. ******************************************************************************/
  487.  
  488. #pragma argsused
  489. short int far pascal _export _loadds FS_DELETE(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  490.                                char far *pFile, unsigned short iCurDirEnd)
  491. {
  492.    return ERROR_NOT_SUPPORTED;
  493. }
  494.  
  495.  
  496. /******************************************************************************
  497. **
  498. ** FS_FILEATTRIBUTE - Get/Set DOS file attributes
  499. **
  500. ** Parameters
  501. ** ----------
  502. ** unsigned short flag                  indicates flavor of call
  503. **   values:
  504. **     FA_RETRIEVE      retrieve attribute
  505. **     FA_SET           set attribute
  506. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  507. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  508. ** char far *pName                      pointer to filename
  509. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  510. ** unsigned short far *pAttr            pointer to the attribute
  511. **
  512. ******************************************************************************/
  513.  
  514. #pragma argsused
  515. short int far pascal _export _loadds FS_FILEATTRIBUTE(unsigned short flag, struct cdfsi far *pcdfsi,
  516.                                       struct cdfsd far *pcdfsd, char far *pName,
  517.                                       unsigned short iCurDirEnd, unsigned short far *pAttr)
  518. {
  519.    return ERROR_NOT_SUPPORTED;
  520. }
  521.  
  522.  
  523. /******************************************************************************
  524. **
  525. ** FS_FILEINFO - Get/Set file information
  526. **
  527. ** Parameters
  528. ** ----------
  529. ** unsigned short flag                  indicates flavor of call
  530. **   values:
  531. **     FI_RETRIEVE      retrieve information
  532. **     FI_SET           set information
  533. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  534. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  535. ** unsigned short level                 level of information to get/set
  536. ** char far *pData                      UNVERIFIED? pointer to information area
  537. ** unsigned short cbData                size of area pointed to by pData
  538. ** unsigned short IOflag                bitfield of I/O suggestions
  539. **   values:
  540. **     IOFL_WRITETHRU   write all updated data before returning
  541. **     IOFL_NOCACHE     don't cache any new data
  542. **
  543. ******************************************************************************/
  544.  
  545. #pragma argsused
  546. short int far pascal _export _loadds FS_FILEINFO(unsigned short flag, struct sffsi far *psffsi,
  547.                                  struct sffsd far *psffsd, unsigned short level,
  548.                                  char far *pData, unsigned short cbData,
  549.                                  unsigned short IOflag)
  550. {
  551.    return ERROR_NOT_SUPPORTED;
  552. }
  553.  
  554.  
  555. /******************************************************************************
  556. **
  557. ** FS_FILEIO - Atomic I/O operations
  558. **
  559. ** Parameters
  560. ** ----------
  561. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  562. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  563. ** char far *pCmdList                   UNVERIFIED pointer to information area
  564. ** unsigned short cbCmdList             size of area pointed to by pCmdList
  565. ** unsigned short far *poError          UNVERIFIED pointer to offset within
  566. **                                      pCmdList of command that caused an error
  567. ** unsigned short IOflag                bitfield of I/O suggestions
  568. **   values:
  569. **     IOFL_WRITETHRU   write all updated data before returning
  570. **     IOFL_NOCACHE     don't cache any new data
  571. **
  572. ******************************************************************************/
  573.  
  574. #pragma argsused
  575. short int far pascal _export _loadds FS_FILEIO(struct sffsi far *psffsi, struct sffsd far *psffsd,
  576.                                char far *pCmdList, unsigned short cbCmdList,
  577.                                unsigned short far *poError, unsigned short IOflag)
  578. {
  579.    return ERROR_NOT_SUPPORTED;
  580. }
  581.  
  582.  
  583. /******************************************************************************
  584. **
  585. ** FS_MOVE - Move/rename a file
  586. **
  587. ** Parameters
  588. ** ----------
  589. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  590. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  591. ** char far *pSrc                       pointer to source filename
  592. ** unsigned short iSrcCurDirEnd         offset to the end of the current directory in pSrc
  593. ** char far *pDst                       pointer to destination filename
  594. ** unsigned short iDstCurDirEnd         offset to the end of the current directory in pDst
  595. ** unsigned short flags                 0x40 = destination is non 8.3 filename
  596. **
  597. ******************************************************************************/
  598.  
  599. #pragma argsused
  600. short int far pascal _export _loadds FS_MOVE(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  601.                              char far *pSrc, unsigned short iSrcCurDirEnd,
  602.                              char far *pDst, unsigned short iDstCurDirEnd,
  603.                              unsigned short flags)
  604. {
  605.    return ERROR_NOT_SUPPORTED;
  606. }
  607.  
  608.  
  609. /******************************************************************************
  610. **
  611. ** FS_NEWSIZE - Change size of file
  612. **
  613. ** Parameters
  614. ** ----------
  615. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  616. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  617. ** unsigned long len                    new length of file
  618. ** unsigned short IOflag                bitfield of I/O suggestions
  619. **   values:
  620. **     IOFL_WRITETHRU   write all updated data before returning
  621. **     IOFL_NOCACHE     don't cache any new data
  622. **
  623. ******************************************************************************/
  624.  
  625. #pragma argsused
  626. short int far pascal _export _loadds FS_NEWSIZE(struct sffsi far *psffsi, struct sffsd far *psffsd,
  627.                                 unsigned long len, unsigned short IOflag)
  628. {
  629.    return ERROR_NOT_SUPPORTED;
  630. }
  631.  
  632.  
  633. /******************************************************************************
  634. **
  635. ** FS_OPENCREATE - Open or create a new file
  636. **
  637. ** Parameters
  638. ** ----------
  639. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  640. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  641. ** char far *pName                      pointer to filename
  642. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  643. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  644. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  645. ** unsigned long openmode               sharing and access mode
  646. ** unsigned short openflag              action to take when file exists/doesn't exist
  647. ** unsigned short far *pAction          returns the action that the IFS took
  648. ** unsigned short attr                  OS/2 file attributes
  649. ** char *pEABuf                         UNVERIFIED pointer to EAs to attach to new file
  650. ** unsigned short fat *pfgenFlag        flags returned by the IFS
  651. **   values:
  652. **     FOC_NEEDEAS      indicates there are critical EAs associated with the file
  653. **
  654. ******************************************************************************/
  655.  
  656. #pragma argsused
  657. short int far pascal _export _loadds FS_OPENCREATE(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  658.                                    char far *pName, unsigned short iCurDirEnd,
  659.                                    struct sffsi far *psffsi, struct sffsd far *psffsd,
  660.                                    unsigned long openmode, unsigned short openflag,
  661.                                    unsigned short far *pAction, unsigned short attr,
  662.                                    char far *pEABuf, unsigned short far *pfgenFlag)
  663. {
  664.    return ERROR_NOT_SUPPORTED;
  665. }
  666.  
  667.  
  668. /******************************************************************************
  669. **
  670. ** FS_PATHINFO - get/set file information by filename
  671. **
  672. ** Parameters
  673. ** ----------
  674. ** unsigned short flag                  indicates flavor of call
  675. **   values:
  676. **     PI_RETRIEVE      retrieve information
  677. **     PI_SET           set information
  678. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  679. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  680. ** char far *pName                      pointer to filename
  681. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  682. ** unsigned short level                 level of information to get/set
  683. ** char far *pData                      UNVERIFIED pointer to information area
  684. ** unsigned short cbData                size of area pointed to by pData
  685. **
  686. ******************************************************************************/
  687.  
  688. #pragma argsused
  689. short int far pascal _export _loadds FS_PATHINFO(unsigned short flag, struct cdfsi far *pcdfsi,
  690.                                  struct cdfsd far *pcdfsd, char far *pName,
  691.                                  unsigned short iCurDirEnd, unsigned short level,
  692.                                  char far *pData, unsigned short cbData)
  693. {
  694.    return ERROR_NOT_SUPPORTED;
  695. }
  696.  
  697.  
  698. /******************************************************************************
  699. **
  700. ** FS_READ - read data from a file
  701. **
  702. ** Parameters
  703. ** ----------
  704. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  705. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  706. ** char far *pData                      UNVERIFIED pointer to buffer
  707. ** unsigned short far *pLen             length of buffer
  708. ** unsigned short IOflag                bitfield of I/O suggestions
  709. **   values:
  710. **     IOFL_WRITETHRU   write all updated data before returning
  711. **     IOFL_NOCACHE     don't cache any new data
  712. **
  713. ******************************************************************************/
  714.  
  715. #pragma argsused
  716. short int far pascal _export _loadds FS_READ(struct sffsi far *psffsi, struct sffsd far *psffsd,
  717.                              char far *pData, unsigned short far *pLen,
  718.                              unsigned short IOflag)
  719. {
  720.    return ERROR_NOT_SUPPORTED;
  721. }
  722.  
  723.  
  724. /******************************************************************************
  725. **
  726. ** FS_WRITE - write data to a file
  727. **
  728. ** Parameters
  729. ** ----------
  730. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  731. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  732. ** char far *pData                      UNVERIFIED pointer to buffer
  733. ** unsigned short far *pLen             length of buffer
  734. ** unsigned short IOflag                bitfield of I/O suggestions
  735. **   values:
  736. **     IOFL_WRITETHRU   write all updated data before returning
  737. **     IOFL_NOCACHE     don't cache any new data
  738. **
  739. ******************************************************************************/
  740.  
  741. #pragma argsused
  742. short int far pascal _export _loadds FS_WRITE(struct sffsi far *psffsi, struct sffsd far *psffsd,
  743.                               char far *pData, unsigned short far *pLen,
  744.                               unsigned short IOflag)
  745. {
  746.    return ERROR_NOT_SUPPORTED;
  747. }
  748.  
  749.  
  750.  
  751. /*-----------------------------------------------------------------------------
  752. --
  753. -- Directory management
  754. --
  755. -----------------------------------------------------------------------------*/
  756.  
  757.  
  758.  
  759. /******************************************************************************
  760. **
  761. ** FS_FINDCLOSE - End a directory search
  762. **
  763. ** Parameters
  764. ** ----------
  765. ** struct fsfsi far *pfsfsi             pointer to FSD independant search record
  766. ** struct fsfsd far *pfsfsd             pointer to FSD dependant search record
  767. **
  768. ******************************************************************************/
  769.  
  770. #pragma argsused
  771. short int far pascal _export _loadds FS_FINDCLOSE(struct fsfsi far *pfsfsi, struct fsfsd far *pfsfsd)
  772. {
  773.    return ERROR_NOT_SUPPORTED;
  774. }
  775.  
  776.  
  777. /******************************************************************************
  778. **
  779. ** FS_FINDFIRST - Begin a new directory search
  780. **
  781. ** Parameters
  782. ** ----------
  783. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  784. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  785. ** char far *pName                      pointer to filename mask
  786. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  787. ** unsigned short attr                  attribute mask
  788. ** struct fsfsi far *pfsfsi             pointer to FSD independant search record
  789. ** struct fsfsd far *pfsfsd             pointer to FSD dependant search record
  790. ** char far *pData                      UNVERIFIED pointer to information area
  791. ** unsigned short cbData                size of area pointed to by pData
  792. ** unsigned short far *pcMatch          maximum number of entries to return*
  793. **                                      number of entries actually returned
  794. ** unsigned short level                 level of information to return
  795. ** unsigned short flags                 indicates whether to return position information
  796. **   values:
  797. **     FF_NOPOS         don't return any position information
  798. **     FF_GETPOS        return position information in buffer
  799. **
  800. ******************************************************************************/
  801.  
  802. #pragma argsused
  803. short int far pascal _export _loadds FS_FINDFIRST(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  804.                                   char far *pName, unsigned short iCurDirEnd,
  805.                                   unsigned short attr, struct fsfsi far *pfsfsi,
  806.                                   struct fsfsd far *pfsfsd, char far *pData,
  807.                                   unsigned short cbData, unsigned short far *pcMatch,
  808.                                   unsigned short level, unsigned short flags)
  809. {
  810.    return ERROR_NOT_SUPPORTED;
  811. }
  812.  
  813.  
  814. /******************************************************************************
  815. **
  816. ** FS_FINDFROMNAME - Restart directory search
  817. **
  818. ** Parameters
  819. ** ----------
  820. ** struct fsfsi far *pfsfsi             pointer to FSD independant search record
  821. ** struct fsfsd far *pfsfsd             pointer to FSD dependant search record
  822. ** char far *pData                      UNVERIFIED pointer to information area
  823. ** unsigned short cbData                size of area pointed to by pData
  824. ** unsigned short far *pcMatch          maximum number of entries to return*
  825. **                                      number of entries actually returned
  826. ** unsigned short level                 level of information to return
  827. ** unsigned long position               position in directory to restart search from
  828. ** char far *pName                      pointer to filename to restart search from
  829. ** unsigned short flags                 indicates whether to return position information
  830. **   values:
  831. **     FF_NOPOS         don't return any position information
  832. **     FF_GETPOS        return position information in buffer
  833. **
  834. ******************************************************************************/
  835.  
  836. #pragma argsused
  837. short int far pascal _export _loadds FS_FINDFROMNAME(struct fsfsi far *pfsfsi, struct fsfsd far *pfsfsd,
  838.                                      char far *pData, unsigned short cbData,
  839.                                      unsigned short far *pcMatch, unsigned short level,
  840.                                      unsigned long position, char far *pName,
  841.                                      unsigned short flags)
  842. {
  843.    return ERROR_NOT_SUPPORTED;
  844. }
  845.  
  846.  
  847. /******************************************************************************
  848. **
  849. ** FS_FINDNEXT - Continue directory search
  850. **
  851. ** Parameters
  852. ** ----------
  853. ** struct fsfsi far *pfsfsi             pointer to FSD independant search record
  854. ** struct fsfsd far *pfsfsd             pointer to FSD dependant search record
  855. ** char far *pData                      UNVERIFIED pointer to information area
  856. ** unsigned short cbData                size of area pointed to by pData
  857. ** unsigned short far *pcMatch          maximum number of entries to return*
  858. **                                      number of entries actually returned
  859. ** unsigned short level                 level of information to return
  860. ** unsigned short flag                  indicates whether to return position information
  861. **   values:
  862. **     FF_NOPOS         don't return any position information
  863. **     FF_GETPOS        return position information in buffer
  864. **
  865. ******************************************************************************/
  866.  
  867. #pragma argsused
  868. short int far pascal _export _loadds FS_FINDNEXT(struct fsfsi far *pfsfsi, struct fsfsd far *pfsfsd,
  869.                                  char far *pData, unsigned short cbData,
  870.                                  unsigned short far *pcMatch, unsigned short level,
  871.                                  unsigned short flag)
  872. {
  873.    return ERROR_NOT_SUPPORTED;
  874. }
  875.  
  876.  
  877. /******************************************************************************
  878. **
  879. ** FS_FINDNOTIFYCLOSE - End a directory update request
  880. **
  881. ** Parameters
  882. ** ----------
  883. ** unsigned short handle                handle of update request to close
  884. **
  885. ******************************************************************************/
  886.  
  887. #pragma argsused
  888. short int far pascal _export _loadds FS_FINDNOTIFYCLOSE(unsigned short handle)
  889. {
  890.    return ERROR_NOT_SUPPORTED;
  891. }
  892.  
  893.  
  894. /******************************************************************************
  895. **
  896. ** FS_FINDNOTIFYFIRST - Begin a new directory update request
  897. **
  898. ** Parameters
  899. ** ----------
  900. ** struct cdfsi far *pcdfsi             pointer to FSD independant current directory
  901. ** struct cdfsd far *pcdfsd             pointer to FSD dependant current directory
  902. ** char far *pName                      pointer to filename mask
  903. ** unsigned short iCurDirEnd            offset to the end of the current directory in pName
  904. ** unsigned short attr                  attribute mask
  905. ** unsigned short far *pHandle          pointer to place where FSD stores its handle
  906. ** char far *pData                      UNVERIFIED pointer to information area
  907. ** unsigned short cbData                size of area pointed to by pData
  908. ** unsigned short far *pcMatch          maximum number of entries to return*
  909. **                                      number of entries actually returned
  910. ** unsigned short level                 level of information to return
  911. ** unsigned long timeout                timeout in milliseconds
  912. **
  913. ******************************************************************************/
  914.  
  915. #pragma argsused
  916. short int far pascal _export _loadds FS_FINDNOTIFYFIRST(struct cdfsi far *pcdfsi, struct cdfsd far *pcdfsd,
  917.                                         char far *pName, unsigned short iCurDirEnd,
  918.                                         unsigned short attr, unsigned short far *pHandle,
  919.                                         char far *pData, unsigned short cbData,
  920.                                         unsigned short far *pcMatch, unsigned short level,
  921.                                         unsigned long timeout)
  922. {
  923.    return ERROR_NOT_SUPPORTED;
  924. }
  925.  
  926.  
  927. /******************************************************************************
  928. **
  929. ** FS_FINDNOTIFYNEXT - Continue directory update request
  930. **
  931. ** Parameters
  932. ** ----------
  933. ** unsigned short handle                directory update handle
  934. ** char far *pData                      UNVERIFIED pointer to information area
  935. ** unsigned short cbData                size of area pointed to by pData
  936. ** unsigned short far *pcMatch          maximum number of entries to return*
  937. **                                      number of entries actually returned
  938. ** unsigned short level                 level of information to return
  939. ** unsigned long timeout                timeout in milliseconds
  940. **
  941. ******************************************************************************/
  942.  
  943. #pragma argsused
  944. short int far pascal _export _loadds FS_FINDNOTIFYNEXT(unsigned short handle, char far *pData,
  945.                                        unsigned short cbData, unsigned short far *pcMatch,
  946.                                        unsigned short level, unsigned long timeout)
  947. {
  948.    return ERROR_NOT_SUPPORTED;
  949. }
  950.  
  951.  
  952.  
  953. /*-----------------------------------------------------------------------------
  954. --
  955. -- FSD Extended Interface
  956. --
  957. -----------------------------------------------------------------------------*/
  958.  
  959.  
  960.  
  961. /******************************************************************************
  962. **
  963. ** FS_IOCTL - Perform an IOCTL on the IFS
  964. **
  965. ** Parameters
  966. ** ----------
  967. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  968. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  969. ** unsigned short cat                   function category
  970. ** unsigned short func                  function to perform
  971. ** char far *pParm                      UNVERIFIED pointer to parameter area
  972. ** unsigned short lenParm               size of area pointed to by pParm
  973. ** unsigned short far *pParmLenInOut    length of parameters passed in pParm
  974. ** char far *pData                      UNVERIFIED pointer to information area
  975. ** unsigned short lenData               size of area pointed to by pData
  976. ** unsigned short far *pDataLenInOut    length of parameters passed in pData
  977. **
  978. ******************************************************************************/
  979.  
  980. #pragma argsused
  981. short int far pascal _export _loadds FS_IOCTL(struct sffsi far *psffsi, struct sffsd far *psffsd,
  982.                               unsigned short cat, unsigned short func,
  983.                               char far *pParm, unsigned short lenParm,
  984.                               unsigned far *pParmLenInOut, char far *pData,
  985.                               unsigned short lenData, unsigned far *pDataLenInOut)
  986. {
  987.    return ERROR_NOT_SUPPORTED;
  988. }
  989.  
  990.  
  991.  
  992. /*-----------------------------------------------------------------------------
  993. --
  994. -- Miscellaneous Functions
  995. --
  996. -----------------------------------------------------------------------------*/
  997.  
  998.  
  999.  
  1000. /******************************************************************************
  1001. **
  1002. ** FS_NMPIPE - Perform a named pipe operation
  1003. **
  1004. ** Parameters
  1005. ** ----------
  1006. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  1007. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  1008. ** unsigned short OpType                operation to perform
  1009. **   values:
  1010. **     NMP_GetPHandState
  1011. **     NMP_SetPHandState
  1012. **     NMP_PipeQInfo
  1013. **     NMP_PeekPipe
  1014. **     NMP_ConnectPipe
  1015. **     NMP_DisconnectPipe
  1016. **     NMP_TransactPipe
  1017. **     NMP_READRAW
  1018. **     NMP_WRITERAW
  1019. **     NMP_WAITPIPE
  1020. **     NMP_CALLPIPE
  1021. **     NMP_QNmPipeSemState
  1022. ** union npoper far *pOpRec             data for operation
  1023. ** char far *pData                      pointer to user data
  1024. ** char far *pName                      pointer to remote named pipe
  1025. **
  1026. ******************************************************************************/
  1027.  
  1028. #pragma argsused
  1029. short int far pascal _export _loadds FS_NMPIPE(struct sffsi far *psffsi, struct sffsd far *psffsd,
  1030.                                unsigned short OpType, union npoper far *pOpRec,
  1031.                                char far *pData, char far *pName)
  1032. {
  1033.    return ERROR_NOT_SUPPORTED;
  1034. }
  1035.  
  1036.  
  1037. /******************************************************************************
  1038. **
  1039. ** FS_PROCESSNAME - Canonicalize a filename
  1040. **
  1041. ** Parameters
  1042. ** ----------
  1043. ** char far *pNameBuf                   filename to canonicalize
  1044. **
  1045. ******************************************************************************/
  1046.  
  1047. #pragma argsused
  1048. short int far pascal _export _loadds FS_PROCESSNAME(char far *pNameBuf)
  1049. {
  1050.    return NO_ERROR;
  1051. }
  1052.  
  1053.  
  1054. /******************************************************************************
  1055. **
  1056. ** FS_SETSWAP - Inform IFS that it owns the swap file
  1057. **
  1058. ** Parameters
  1059. ** ----------
  1060. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  1061. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  1062. **
  1063. ******************************************************************************/
  1064.  
  1065. #pragma argsused
  1066. short int far pascal _export _loadds FS_SETSWAP(struct sffsi far *psffsi,
  1067.                                         struct sffsd far *psffsd)
  1068. {
  1069.    return NO_ERROR;
  1070. }
  1071.  
  1072.  
  1073.  
  1074. /******************************************************************************
  1075. *******************************************************************************
  1076. **
  1077. ** Locking support entry points
  1078. **
  1079. *******************************************************************************
  1080. ******************************************************************************/
  1081.  
  1082.  
  1083.  
  1084. #if defined(SUP_FILEIO)
  1085. /******************************************************************************
  1086. **
  1087. ** FS_CANCELLOCKREQUEST - Unlock a range in a file
  1088. **
  1089. ** Parameters
  1090. ** ----------
  1091. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  1092. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  1093. ** void far *pLockRange                 range to unlock
  1094. **
  1095. ******************************************************************************/
  1096.  
  1097. #pragma argsused
  1098. short int far pascal _export _loadds FS_CANCELLOCKREQUEST(struct sffsi far *psffsi, struct sffsd far *psffsd,
  1099.                                           void far *pLockRange)
  1100. {
  1101.    return ERROR_NOT_SUPPORTED;
  1102. }
  1103.  
  1104.  
  1105. /******************************************************************************
  1106. **
  1107. ** FS_FILELOCKS - Lock a range in a file
  1108. **
  1109. ** Parameters
  1110. ** ----------
  1111. ** struct sffsi far *psffsi             pointer to FSD independant file instance
  1112. ** struct sffsd far *psffsd             pointer to FSD dependant file instance
  1113. ** void far *pUnLockRange               range to unlock
  1114. ** void far *pLockRange                 range to lock
  1115. ** unsigned long timeout                time in milliseconds to wait
  1116. ** unsigned long flags                  flags
  1117. **   values:
  1118. **     0x01                     sharing of this file region is allowed
  1119. **     0x02                     atomic lock request
  1120. **
  1121. ******************************************************************************/
  1122.  
  1123. #pragma argsused
  1124. short int far pascal _export _loadds FS_FILELOCKS(struct sffsi far *psffsi, struct sffsd far *psffsd,
  1125.                                   void far *pUnLockRange, void far *pLockRange,
  1126.                                   unsigned long timeout, unsigned long flags)
  1127. {
  1128.    return ERROR_NOT_SUPPORTED;
  1129. }
  1130.  
  1131. #endif
  1132.  
  1133.  
  1134. /******************************************************************************
  1135. *******************************************************************************
  1136. **
  1137. ** UNC entry point
  1138. **
  1139. *******************************************************************************
  1140. ******************************************************************************/
  1141.  
  1142.  
  1143. #if defined(SUP_UNC)
  1144.  
  1145. /******************************************************************************
  1146. **
  1147. ** FS_VERIFYUNCNAME - Check if the IFS controls the server in question
  1148. **
  1149. ** Parameters
  1150. ** ----------
  1151. ** unsigned long far *pFlag             flags
  1152. **   values:
  1153. **     VUN_PASS1                pass 1 poll
  1154. **     VUN_PASS2                pass 2 poll
  1155. ** char far *pName                      pointer to server in UNC format
  1156. **
  1157. ******************************************************************************/
  1158.  
  1159. #pragma argsused
  1160. short int far pascal _export _loadds FS_VERIFYUNCNAME(unsigned short flag, char far *pName)
  1161. {
  1162.    return ERROR_NOT_SUPPORTED;
  1163. }
  1164.  
  1165. #endif
  1166.  
  1167.  
  1168.  
  1169. #if defined(SUP_PAGEIO)
  1170.  
  1171. #pragma argsused
  1172. short int far pascal _export _loadds FS_ALLOCATEPAGESPACE(
  1173.     struct sffsi far *psffsi,       /* ptr to fs independent SFT */
  1174.     struct sffsd far *psffsd,       /* ptr to fs dependent SFT   */
  1175.     unsigned long     lSize,        /* new size                  */
  1176.     unsigned long     lWantContig   /* contiguous chunk size     */
  1177. )
  1178. {
  1179.    return ERROR_NOT_SUPPORTED;
  1180. }
  1181.  
  1182. #pragma argsused
  1183. short int far pascal _export _loadds FS_DOPAGEIO(
  1184.     struct sffsi far *         psffsi,      /* ptr to fs independent SFT    */
  1185.     struct sffsd far *         psffsd,      /* ptr to fs dependent SFT      */
  1186.     struct PageCmdHeader far * pPageCmdList /* ptr to list of page commands */
  1187. )
  1188. {
  1189.    return ERROR_NOT_SUPPORTED;
  1190. }
  1191.  
  1192. #pragma argsused
  1193. short int far pascal _export _loadds FS_OPENPAGEFILE (
  1194.     unsigned long far *pFlags,      /* pointer to Flags               */
  1195.     unsigned long far *pcMaxReq,    /* max # of reqs packed in list   */
  1196.     char far *         pName,       /* name of paging file            */
  1197.     struct sffsi far * psffsi,      /* ptr to fs independent SFT      */
  1198.     struct sffsd far * psffsd,      /* ptr to fs dependent SFT        */
  1199.     unsigned short     OpenMode,    /* sharing, ...                   */
  1200.     unsigned short     OpenFlag,    /* open flag for action           */
  1201.     unsigned short     Attr,        /* file attribute                 */
  1202.     unsigned long      Reserved     /* reserved, must be zero         */
  1203. )
  1204. {
  1205.    return ERROR_NOT_SUPPORTED;
  1206. }
  1207.  
  1208. #endif
  1209.