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.

81 lines
1.2 KiB

  1. title "Ndr Proxy Forwarding Functions"
  2. ;++
  3. ;
  4. ; Copyright (c) 2000 Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; forward.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This module implements the proxy forwarding functions.
  13. ;
  14. ; Author:
  15. ;
  16. ; David N. Cutler 30-Dec-2000
  17. ;
  18. ; Environment:
  19. ;
  20. ; Any mode.
  21. ;
  22. ;-
  23. include ksamd64.inc
  24. subttl "Delegation Forwarding Functions"
  25. ;++
  26. ;
  27. ; VOID
  28. ; NdrProxyForwardingFunction<nnn>(
  29. ; IN IUnknown *This,
  30. ; ...
  31. ; )
  32. ;
  33. ; Routine Description:
  34. ;
  35. ; This function forwards a call to the proxy for the base interface.
  36. ;
  37. ; Arguments:
  38. ;
  39. ; This (rcx) - Supplies a pointer to the interface proxy.
  40. ;
  41. ; Return Value:
  42. ;
  43. ; None.
  44. ;
  45. ;--
  46. ;
  47. ; Define macro to generate forwarder functions.
  48. ;
  49. subclass_offset equ 32
  50. DELEGATION_FORWARDER macro Method
  51. LEAF_ENTRY NdrProxyForwardingFunction&Method, _TEXT$00
  52. mov rcx, subclass_offset[rcx] ; get subclass object address
  53. mov r10, [rcx] ; get vtable address
  54. jmp qword ptr (&Method * 8)[r10] ; transfer to method
  55. LEAF_END NdrProxyForwardingFunction&Method, _TEXT$00
  56. endm
  57. ;
  58. ; Generate forwarder functions.
  59. ;
  60. index = 3
  61. rept (255 - 3 + 1)
  62. DELEGATION_FORWARDER %index
  63. index = index + 1
  64. endm
  65. end