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.

80 lines
1.7 KiB

  1. //#include "precomp.h"
  2. #include <windows.h>
  3. #include "apiutil.h"
  4. #include "stirpc.h"
  5. #include "stirpc_c.c"
  6. handle_t
  7. STI_STRING_HANDLE_bind(
  8. STI_STRING_HANDLE ServerName
  9. )
  10. /*++
  11. Routine Description:
  12. This routine is called from the STI client stubs when
  13. it is necessary create an RPC binding to the server end
  14. Arguments:
  15. ServerName - A pointer to a string containing the name of the server
  16. to bind with.
  17. Return Value:
  18. The binding handle is returned to the stub routine. If the bind is
  19. unsuccessful, a NULL will be returned.
  20. --*/
  21. {
  22. handle_t BindHandle;
  23. RPC_STATUS RpcStatus;
  24. RpcStatus = RpcBindHandleForServer(&BindHandle,
  25. (LPWSTR)ServerName,
  26. STI_INTERFACE_W,
  27. PROT_SEQ_NP_OPTIONS_W
  28. );
  29. return BindHandle;
  30. } // STI_STRING_HANDLE_bind()
  31. void
  32. STI_STRING_HANDLE_unbind(
  33. STI_STRING_HANDLE ServerName,
  34. handle_t BindHandle
  35. )
  36. /*++
  37. Routine Description:
  38. This routine calls a common unbind routine
  39. Arguments:
  40. ServerName - This is the name of the server from which to unbind.
  41. BindingHandle - This is the binding handle that is to be closed.
  42. Return Value:
  43. None.
  44. --*/
  45. {
  46. UNREFERENCED_PARAMETER(ServerName);
  47. (VOID ) RpcBindHandleFree(&BindHandle);
  48. return;
  49. } // STI_STRING_HANDLE_unbind()
  50. /****************************** End Of File ******************************/