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.

79 lines
1.7 KiB

  1. title "User Callback Return"
  2. ;++
  3. ;
  4. ; Copyright (c) 1985 - 1999, Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; callret.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This module implements the fastpath callback return.
  13. ;
  14. ; Author:
  15. ;
  16. ; David N. Cutler (davec) 21-Dec-95
  17. ;
  18. ; Environment:
  19. ;
  20. ; User mode.
  21. ;
  22. ; Revision History:
  23. ;
  24. ;--
  25. .386p
  26. .xlist
  27. include callconv.inc ; calling convention macros
  28. .list
  29. _TEXT SEGMENT DWORD PUBLIC 'CODE'
  30. ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
  31. page ,132
  32. subttl "Return from User Mode Callback"
  33. ifndef BUILD_WOW6432
  34. ;++
  35. ;
  36. ; NTSTATUS
  37. ; FASTCALL
  38. ; XyCallbackReturn (
  39. ; IN PVOID OutputBuffer OPTIONAL,
  40. ; IN ULONG OutputLength,
  41. ; IN NTSTATUS Status
  42. ; )
  43. ;
  44. ; Routine Description:
  45. ;
  46. ; This function returns from a user mode callout to the kernel mode
  47. ; caller of the user mode callback function.
  48. ;
  49. ; Arguments:
  50. ;
  51. ; OutputBuffer (ecx) - Supplies an optional pointer to an output buffer.
  52. ;
  53. ; OutputLength (edx) - Supplies the length of the output buffer.
  54. ;
  55. ; Status (esp + 4) - Supplies the status value returned to the caller of the
  56. ; callback function.
  57. ;
  58. ; Return Value:
  59. ;
  60. ; Normally there is no return from this function. If a callbac is not active,
  61. ; then the error status is returned to the caller.
  62. ;
  63. ;--
  64. cPublicFastCall XyCallbackReturn, 3
  65. mov eax,[esp] + 4 ; get return status value
  66. int 02bH ; call fast path system service
  67. fstRET XyCallbackReturn ; return status to caller
  68. fstENDP XyCallbackReturn
  69. endif
  70. _TEXT ends
  71. end