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.

60 lines
1.6 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: exp.cxx
  8. //
  9. //--------------------------------------------------------------------------
  10. // drt that mainly puts things into the locator
  11. //
  12. //
  13. #include "drt.hxx"
  14. void __cdecl main(int argc, char **argv)
  15. {
  16. RPC_STATUS status;
  17. RPC_BINDING_VECTOR * pBindingVector = NULL;
  18. RPC_IF_HANDLE IfSpec;
  19. UUID_VECTOR * objuuid;
  20. int fFailed = 0;
  21. // form a dynamic endpoint.
  22. unsigned int cMinCalls = 1;
  23. unsigned int cMaxCalls = 20;
  24. unsigned char * pszSecurity = NULL;
  25. status = RpcServerUseAllProtseqs(cMaxCalls, pszSecurity);
  26. printf("RpcServerUseProtseqs returned 0x%x\n", status);
  27. if (status)
  28. fFailed = 1;
  29. status = RpcServerInqBindings(&pBindingVector);
  30. printf("RpcServerInqBindings returned 0x%x\n", status);
  31. if (status)
  32. fFailed = 1;
  33. FormIfHandle(ifid[1], &IfSpec);
  34. status = RpcNsBindingExport(RPC_C_NS_SYNTAX_DEFAULT,
  35. szDynSrvEntryName,
  36. IfSpec,
  37. pBindingVector,
  38. NULL);
  39. printf("RpcNsBindingExport returned 0x%x\n", status);
  40. if (status)
  41. fFailed = 1;
  42. if (fFailed)
  43. printf("Export Test FAILED\n");
  44. else
  45. printf("Export Test PASSED\n");
  46. RpcServerListen(10, 20, 0);
  47. }
  48.