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.

97 lines
3.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1995 - 1999
  6. //
  7. // File: gttran.h
  8. //
  9. // Contents: Generic Transport APIs
  10. //
  11. // APIs:
  12. // GTOpen
  13. // GTSend
  14. // GTFree
  15. // GTReceive
  16. // GTClose
  17. // GTRecSend
  18. // GTInitSrv
  19. // GTUnInitSrv
  20. //
  21. // Created KeithV
  22. //--------------------------------------------------------------------------
  23. #ifndef _HGTTRAN_H_
  24. #define _HGTTRAN_H_
  25. #include <tchar.h>
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. //+-------------------------------------------------------------------------
  30. // Encoding types
  31. //
  32. // Because the Composit type for ASN is 0x30, we will define this to
  33. // be the encoding type for it.
  34. //--------------------------------------------------------------------------
  35. #define ASCII_ENCODING 0x0
  36. #define TLV_ENCODING 0x1
  37. #define IDL_ENCODING 0x2
  38. #define OCTET_ENCODING 0x3
  39. #define ASN_ENCODING 0x30
  40. //+-------------------------------------------------------------------------
  41. // Functions will allow you to read, write or both
  42. // To do both, OR (|) them together.
  43. //--------------------------------------------------------------------------
  44. #define GTREAD 0x00000001
  45. #define GTWRITE 0x00000002
  46. typedef ULONG_PTR HGT;
  47. //+-------------------------------------------------------------------------
  48. // Any receiving (listening) DLL must export these functions
  49. //--------------------------------------------------------------------------
  50. typedef DWORD (__stdcall * PFNGTRecSend) (DWORD dwEncoding, DWORD cb, const BYTE * pbIn, DWORD * pcbOut, BYTE ** ppbOut);
  51. typedef DWORD (__stdcall * PFNGTFree) (BYTE * pb);
  52. //+-------------------------------------------------------------------------
  53. // Functions used by and application that wants to send a message
  54. // Just like File IO
  55. //--------------------------------------------------------------------------
  56. DWORD __stdcall GTOpen(HGT * phTran, const TCHAR * szLibrary, const TCHAR * tszBinding, DWORD fOpen);
  57. DWORD __stdcall GTSend(HGT hTran, DWORD dwEncoding, DWORD cbSendBuff, const BYTE * pbSendBuff);
  58. DWORD __stdcall GTFree(HGT hTran, BYTE * pb);
  59. DWORD __stdcall GTReceive(HGT hTran, DWORD * pdwEncoding, DWORD * pcbReceiveBuff, BYTE ** ppbReceiveBuff);
  60. DWORD __stdcall GTClose(HGT hTran);
  61. //+-------------------------------------------------------------------------
  62. // Listening functions for a listening application.
  63. // The GTFree prototype is also used as specified above
  64. //--------------------------------------------------------------------------
  65. DWORD __stdcall GTRecSend(DWORD dwEncoding, DWORD cb, const BYTE * pbIn, DWORD * pcbOut, BYTE ** ppbOut);
  66. //+-------------------------------------------------------------------------
  67. // Additonal private listening functions for a listening application.
  68. // Not generally implemented.
  69. //--------------------------------------------------------------------------
  70. DWORD __stdcall GTRecSendNoEncrypt(DWORD dwEncoding, DWORD cb, const BYTE * pbIn, DWORD * pcbOut, BYTE ** ppbOut);
  71. //+-------------------------------------------------------------------------
  72. // Used to init a receiving DLL, particularly useful for HTTP BGI, CGI application
  73. //--------------------------------------------------------------------------
  74. DWORD __stdcall GTInitSrv(TCHAR * tszLibrary);
  75. DWORD __stdcall GTUnInitSrv(void);
  76. #ifdef __cplusplus
  77. }
  78. #endif
  79. #endif