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.

104 lines
2.2 KiB

  1. /*
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. fsd_dtp.c
  5. Abstract:
  6. This module contains the entry points for the AFP desktop APIs. The API
  7. dispatcher calls these. These are all callable from FSD. All of the APIs
  8. complete in the DPC context. The ones which are completed in the FSP are
  9. directly queued to the workers in fsp_dtp.c
  10. Author:
  11. Jameel Hyder (microsoft!jameelh)
  12. Revision History:
  13. 25 Apr 1992 Initial Version
  14. Notes: Tab stop: 4
  15. --*/
  16. #define FILENUM FILE_FSD_DTP
  17. #include <afp.h>
  18. #include <gendisp.h>
  19. /*** AfpFsdDispOpenDT
  20. *
  21. * This routine implements the AfpOpenDT API. This completes here i.e. it is
  22. * not queued to the FSP.
  23. *
  24. * The request packet is represented below.
  25. *
  26. * sda_ReqBlock PCONNDESC pConnDesc
  27. */
  28. AFPSTATUS FASTCALL
  29. AfpFsdDispOpenDT(
  30. IN PSDA pSda
  31. )
  32. {
  33. AFPSTATUS Status = AFP_ERR_PARAM;
  34. struct _RequestPacket
  35. {
  36. PCONNDESC _pConnDesc;
  37. };
  38. struct _ResponsePacket
  39. {
  40. BYTE __DTRefNum[2];
  41. };
  42. DBGPRINT(DBG_COMP_AFPAPI_DTP, DBG_LEVEL_INFO,
  43. ("AfpFsdDispOpenDT: Entered\n"));
  44. ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
  45. ASSERT(VALID_CONNDESC(pReqPkt->_pConnDesc) &&
  46. VALID_VOLDESC(pReqPkt->_pConnDesc->cds_pVolDesc));
  47. if (AfpVolumeMarkDt(pSda, pReqPkt->_pConnDesc, True))
  48. {
  49. pSda->sda_ReplySize = SIZE_RESPPKT;
  50. if ((Status = AfpAllocReplyBuf(pSda)) == AFP_ERR_NONE)
  51. PUTDWORD2SHORT(pRspPkt->__DTRefNum,
  52. pReqPkt->_pConnDesc->cds_pVolDesc->vds_VolId);
  53. }
  54. return Status;
  55. }
  56. /*** AfpFsdDispCloseDT
  57. *
  58. * This routine implements the AfpCloseDT API. This completes here i.e. it is
  59. * not queued to the FSP.
  60. *
  61. * The request packet is represented below.
  62. *
  63. * sda_ReqBlock PCONNDESC pConnDesc
  64. */
  65. AFPSTATUS FASTCALL
  66. AfpFsdDispCloseDT(
  67. IN PSDA pSda
  68. )
  69. {
  70. struct _RequestPacket
  71. {
  72. PCONNDESC _pConnDesc;
  73. };
  74. DBGPRINT(DBG_COMP_AFPAPI_DTP, DBG_LEVEL_INFO,
  75. ("AfpFsdDispCloseDT: Entered\n"));
  76. ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);
  77. ASSERT(VALID_CONNDESC(pReqPkt->_pConnDesc) &&
  78. VALID_VOLDESC(pReqPkt->_pConnDesc->cds_pVolDesc));
  79. return (AfpVolumeMarkDt(pSda, pReqPkt->_pConnDesc, False) ?
  80. AFP_ERR_NONE : AFP_ERR_PARAM);
  81. }
  82.