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.

130 lines
4.1 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: unexp.cxx
  8. //
  9. //--------------------------------------------------------------------------
  10. // drt that cleans up the entries
  11. //
  12. //
  13. #include "drt.hxx"
  14. void __cdecl main(int argc, char **argv)
  15. {
  16. RPC_STATUS status;
  17. RPC_IF_HANDLE IfSpec;
  18. UUID_VECTOR * objuuid = NULL;
  19. RPC_IF_ID intfid;
  20. int fFailed = 0;
  21. intfid.Uuid = ifid[0];
  22. intfid.VersMajor = 42;
  23. intfid.VersMinor = 42;
  24. FormIfHandle(ifid[0], &IfSpec);
  25. FormObjUuid(objid, 2, &objuuid);
  26. status = RpcNsBindingUnexport(
  27. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  28. szSrvEntryName[0], // nsi entry name
  29. IfSpec,
  30. objuuid); // UUID vector
  31. printf("RpcNsBindingUnexport returned 0x%x\n", status);
  32. if (status)
  33. fFailed = 1;
  34. // status = RpcNsGroupMbrRemove(RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  35. // szGrpEntryName[0],
  36. // RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  37. // szSrvEntryName[0]);
  38. // printf("RpcNsGroupMbrRemove 1 returned 0x%x\n", status);
  39. // if (status)
  40. // fFailed = 1;
  41. status = RpcNsGroupMbrRemove(RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  42. szGrpEntryName[0],
  43. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  44. szSrvEntryName[1]);
  45. printf("RpcNsGroupMbrRemove 2 returned 0x%x\n", status);
  46. if (status)
  47. fFailed = 1;
  48. // status = RpcNsProfileEltRemove(
  49. // RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  50. // szPrfEntryName[0],
  51. // &intfid,
  52. // RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  53. // szGrpEntryName[0]);
  54. // printf("RpcNsProfileEltRemove 1 returned 0x%x\n", status);
  55. // if (status)
  56. // fFailed = 1;
  57. status = RpcNsProfileEltRemove(
  58. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  59. szPrfEntryName[0],
  60. &intfid,
  61. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  62. szGrpEntryName[1]);
  63. printf("RpcNsProfileEltRemove 2 returned 0x%x\n", status);
  64. if (status)
  65. fFailed = 1;
  66. status = RpcNsMgmtEntryDelete(
  67. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  68. szSrvEntryName[0]);
  69. printf("RpcNsMgmtEntryDelete returned 0x%x\n", status);
  70. if (status)
  71. fFailed = 1;
  72. status = RpcNsMgmtEntryDelete(
  73. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  74. szPrfEntryName[0]);
  75. printf("RpcNsMgmtEntryDelete returned 0x%x\n", status);
  76. if (status)
  77. fFailed = 1;
  78. status = RpcNsMgmtEntryDelete(
  79. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  80. szGrpEntryName[0]);
  81. printf("RpcNsMgmtEntryDelete returned 0x%x\n", status);
  82. if (status)
  83. fFailed = 1;
  84. /*
  85. status = RpcNsProfileDelete(
  86. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  87. szPrfEntryName[0]);
  88. printf("RpcNsProfileDelete returned 0x%x\n", status);
  89. if (status)
  90. fFailed = 1;
  91. status = RpcNsGroupDelete(
  92. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  93. szGrpEntryName[0]);
  94. printf("RpcNsGroupDelete returned 0x%x\n", status);
  95. if (status)
  96. fFailed = 1;
  97. */
  98. status = RpcNsMgmtEntryDelete(
  99. RPC_C_NS_SYNTAX_DEFAULT, // name syntax type
  100. szDynSrvEntryName);
  101. printf("RpcNsMgmtEntryDelete Dyn entryname returned 0x%x\n", status);
  102. if (status)
  103. fFailed = 1;
  104. if (fFailed)
  105. printf("Export Test FAILED\n");
  106. else
  107. printf("Export Test PASSED\n");
  108. }
  109.