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.

739 lines
19 KiB

  1. //---------------------------------------------------------------------------
  2. //
  3. // Module: tc.cpp
  4. //
  5. // Description:
  6. //
  7. // Topology Connection Class
  8. //
  9. //@@BEGIN_MSINTERNAL
  10. // Development Team:
  11. // Mike McLaughlin
  12. //
  13. // History: Date Author Comment
  14. //
  15. // To Do: Date Author Comment
  16. //
  17. //@@END_MSINTERNAL
  18. //
  19. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  20. // KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  21. // IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  22. // PURPOSE.
  23. //
  24. // Copyright (c) 1996-1999 Microsoft Corporation. All Rights Reserved.
  25. //
  26. //---------------------------------------------------------------------------
  27. #include "common.h"
  28. //---------------------------------------------------------------------------
  29. ULONG gcTopologyConnections = 0;
  30. //---------------------------------------------------------------------------
  31. //---------------------------------------------------------------------------
  32. CTopologyConnection::CTopologyConnection(
  33. PTOPOLOGY_PIN pTopologyPinFrom,
  34. PTOPOLOGY_PIN pTopologyPinTo,
  35. PPIN_INFO pPinInfoFrom,
  36. PPIN_INFO pPinInfoTo
  37. )
  38. {
  39. #ifdef DEBUG
  40. DPF4(110,
  41. "CTopologyConnection: PIF: %08x PIT: %08x TPF: %08x TPT: %08x",
  42. pPinInfoFrom,
  43. pPinInfoTo,
  44. pTopologyPinFrom,
  45. pTopologyPinTo);
  46. #endif
  47. this->pTopologyPinFrom = pTopologyPinFrom;
  48. this->pTopologyPinTo = pTopologyPinTo;
  49. this->pPinInfoFrom = pPinInfoFrom;
  50. this->pPinInfoTo = pPinInfoTo;
  51. ASSERT(TOPC_FLAGS_FILTER_CONNECTION_TYPE == 0);
  52. ++gcTopologyConnections;
  53. DPF1(70, "CTopologyConnection: %08x", this);
  54. }
  55. CTopologyConnection::~CTopologyConnection(
  56. )
  57. {
  58. Assert(this);
  59. DPF1(70, "~CTopologyConnection: %08x", this);
  60. --gcTopologyConnections;
  61. }
  62. NTSTATUS
  63. CTopologyConnection::Create(
  64. PTOPOLOGY_CONNECTION *ppTopologyConnection,
  65. PFILTER_NODE pFilterNode,
  66. PGRAPH_NODE pGraphNode,
  67. PTOPOLOGY_PIN pTopologyPinFrom,
  68. PTOPOLOGY_PIN pTopologyPinTo,
  69. PPIN_INFO pPinInfoFrom,
  70. PPIN_INFO pPinInfoTo
  71. )
  72. {
  73. NTSTATUS Status = STATUS_SUCCESS;
  74. PTOPOLOGY_CONNECTION pTopologyConnection;
  75. PLIST_DESTROY_TOPOLOGY_CONNECTION plstTopologyConnection;
  76. PFILTER_NODE pFilterNodeNext;
  77. #ifdef DEBUG
  78. DPF4(110,
  79. "CTopologyConnection::Create: PIF: %08x PIT: %08x TPF: %08x TPT: %08x",
  80. pPinInfoFrom,
  81. pPinInfoTo,
  82. pTopologyPinFrom,
  83. pTopologyPinTo);
  84. #endif
  85. ASSERT(pFilterNode != NULL || pGraphNode != NULL);
  86. pTopologyConnection = new TOPOLOGY_CONNECTION(
  87. pTopologyPinFrom,
  88. pTopologyPinTo,
  89. pPinInfoFrom,
  90. pPinInfoTo
  91. );
  92. if(pTopologyConnection == NULL) {
  93. Status = STATUS_INSUFFICIENT_RESOURCES;
  94. Trap();
  95. goto exit;
  96. }
  97. *ppTopologyConnection = pTopologyConnection;
  98. if(pFilterNode != NULL) {
  99. Assert(pFilterNode);
  100. ASSERT(pGraphNode == NULL);
  101. // Adding connection to filter connection list
  102. plstTopologyConnection = &pFilterNode->lstTopologyConnection;
  103. // Check if duplicate connection on filter list
  104. FOR_EACH_LIST_ITEM(
  105. &pFilterNode->lstConnectedFilterNode,
  106. pFilterNodeNext) {
  107. if(pFilterNodeNext->lstTopologyConnection.EnumerateList(
  108. CTopologyConnection::CheckDuplicate,
  109. ppTopologyConnection) == STATUS_SUCCESS) {
  110. ASSERT(NT_SUCCESS(Status));
  111. DPF(70, "CTopologyConnection::Create: Duplicate 1");
  112. delete pTopologyConnection;
  113. goto exit;
  114. }
  115. } END_EACH_LIST_ITEM
  116. }
  117. if(pGraphNode != NULL) {
  118. PLOGICAL_FILTER_NODE pLogicalFilterNode;
  119. Assert(pGraphNode);
  120. ASSERT(pFilterNode == NULL);
  121. // Adding connection to GraphNode connection list
  122. plstTopologyConnection = &pGraphNode->lstTopologyConnection;
  123. // Check if duplicate on GraphNode's logical filter list
  124. FOR_EACH_LIST_ITEM(
  125. &pGraphNode->pDeviceNode->lstLogicalFilterNode,
  126. pLogicalFilterNode) {
  127. if(pLogicalFilterNode->lstTopologyConnection.EnumerateList(
  128. CTopologyConnection::CheckDuplicate,
  129. ppTopologyConnection) == STATUS_SUCCESS) {
  130. ASSERT(NT_SUCCESS(Status));
  131. DPF(70, "CTopologyConnection::Create: Duplicate 2");
  132. delete pTopologyConnection;
  133. goto exit;
  134. }
  135. } END_EACH_LIST_ITEM
  136. // Check if duplicate on GraphNode's connected filter list
  137. FOR_EACH_LIST_ITEM(
  138. &pGraphNode->lstLogicalFilterNode,
  139. pLogicalFilterNode) {
  140. if(pLogicalFilterNode->lstTopologyConnection.EnumerateList(
  141. CTopologyConnection::CheckDuplicate,
  142. ppTopologyConnection) == STATUS_SUCCESS) {
  143. ASSERT(NT_SUCCESS(Status));
  144. DPF(70, "CTopologyConnection::Create: Duplicate 3");
  145. delete pTopologyConnection;
  146. goto exit;
  147. }
  148. } END_EACH_LIST_ITEM
  149. pTopologyConnection->ulFlags = TOPC_FLAGS_GRAPH_CONNECTION_TYPE;
  150. }
  151. // Check for duplicate topology connections
  152. if(plstTopologyConnection->EnumerateList(
  153. CTopologyConnection::CheckDuplicate,
  154. ppTopologyConnection) == STATUS_SUCCESS) {
  155. DPF(70, "CTopologyConnection::Create: Duplicate 4");
  156. ASSERT(NT_SUCCESS(Status));
  157. delete pTopologyConnection;
  158. goto exit;
  159. }
  160. if(pTopologyPinFrom != NULL) {
  161. Assert(pTopologyConnection);
  162. Status = pTopologyConnection->AddListEnd(
  163. &pTopologyPinFrom->lstTopologyConnection);
  164. if(!NT_SUCCESS(Status)) {
  165. Trap();
  166. goto exit;
  167. }
  168. }
  169. if(pTopologyPinTo != NULL) {
  170. Assert(pTopologyConnection);
  171. Status = pTopologyConnection->AddListEnd(
  172. &pTopologyPinTo->lstTopologyConnection);
  173. if(!NT_SUCCESS(Status)) {
  174. Trap();
  175. goto exit;
  176. }
  177. }
  178. if(pPinInfoFrom != NULL) {
  179. Assert(pTopologyConnection);
  180. Status = pTopologyConnection->AddListEnd(
  181. &pPinInfoFrom->lstTopologyConnection);
  182. if(!NT_SUCCESS(Status)) {
  183. Trap();
  184. goto exit;
  185. }
  186. }
  187. if(pPinInfoTo != NULL) {
  188. Assert(pTopologyConnection);
  189. Status = pTopologyConnection->AddListEnd(
  190. &pPinInfoTo->lstTopologyConnection);
  191. if(!NT_SUCCESS(Status)) {
  192. Trap();
  193. goto exit;
  194. }
  195. }
  196. Status = pTopologyConnection->AddListEnd(plstTopologyConnection);
  197. if(!NT_SUCCESS(Status)) {
  198. Trap();
  199. goto exit;
  200. }
  201. exit:
  202. DPF3(70, "CTopologyConnection::Create: %08x, FN: %08x GN: %08x",
  203. *ppTopologyConnection,
  204. pFilterNode,
  205. pGraphNode);
  206. return(Status);
  207. }
  208. ENUMFUNC
  209. CTopologyConnection::CheckDuplicate(
  210. PVOID pReference
  211. )
  212. {
  213. PTOPOLOGY_CONNECTION *ppTopologyConnection =
  214. (PTOPOLOGY_CONNECTION*)pReference;
  215. if((this->pTopologyPinFrom == (*ppTopologyConnection)->pTopologyPinFrom) &&
  216. (this->pTopologyPinTo == (*ppTopologyConnection)->pTopologyPinTo) &&
  217. (this->pPinInfoFrom == (*ppTopologyConnection)->pPinInfoFrom) &&
  218. (this->pPinInfoTo == (*ppTopologyConnection)->pPinInfoTo)) {
  219. *ppTopologyConnection = this;
  220. return(STATUS_SUCCESS);
  221. }
  222. return(STATUS_CONTINUE);
  223. }
  224. BOOL
  225. CTopologyConnection::IsTopologyConnectionOnGraphNode(
  226. PGRAPH_NODE pGraphNode
  227. )
  228. {
  229. PLOGICAL_FILTER_NODE pLogicalFilterNodeFrom;
  230. PLOGICAL_FILTER_NODE pLogicalFilterNodeTo;
  231. PLOGICAL_FILTER_NODE pLogicalFilterNode;
  232. BOOL fStatusFrom = FALSE;
  233. BOOL fStatusTo = FALSE;
  234. Assert(pGraphNode);
  235. if(pPinInfoFrom != NULL || pPinInfoTo != NULL) {
  236. return(TRUE);
  237. }
  238. if(pTopologyPinFrom == NULL || pTopologyPinTo == NULL) {
  239. return(FALSE);
  240. }
  241. Assert(pTopologyPinFrom);
  242. Assert(pTopologyPinTo);
  243. FOR_EACH_LIST_ITEM(
  244. &pTopologyPinFrom->pTopologyNode->lstLogicalFilterNode,
  245. pLogicalFilterNodeFrom) {
  246. Assert(pLogicalFilterNodeFrom);
  247. FOR_EACH_LIST_ITEM(
  248. &pTopologyPinTo->pTopologyNode->lstLogicalFilterNode,
  249. pLogicalFilterNodeTo) {
  250. FOR_EACH_LIST_ITEM(
  251. &pGraphNode->pDeviceNode->lstLogicalFilterNode,
  252. pLogicalFilterNode) {
  253. Assert(pLogicalFilterNode);
  254. if(pLogicalFilterNode == pLogicalFilterNodeFrom) {
  255. fStatusFrom = TRUE;
  256. }
  257. if(pLogicalFilterNode == pLogicalFilterNodeTo) {
  258. fStatusTo = TRUE;
  259. }
  260. } END_EACH_LIST_ITEM
  261. if(fStatusFrom && fStatusTo) {
  262. goto exit;
  263. }
  264. FOR_EACH_LIST_ITEM(
  265. &pGraphNode->lstLogicalFilterNode,
  266. pLogicalFilterNode) {
  267. Assert(pLogicalFilterNode);
  268. if(pLogicalFilterNode == pLogicalFilterNodeFrom) {
  269. fStatusFrom = TRUE;
  270. }
  271. if(pLogicalFilterNode == pLogicalFilterNodeTo) {
  272. fStatusTo = TRUE;
  273. }
  274. } END_EACH_LIST_ITEM
  275. if(fStatusFrom && fStatusTo) {
  276. goto exit;
  277. }
  278. } END_EACH_LIST_ITEM
  279. } END_EACH_LIST_ITEM
  280. exit:
  281. return(fStatusFrom && fStatusTo);
  282. }
  283. NTSTATUS
  284. AddPinToFilterNode(
  285. PTOPOLOGY_PIN pTopologyPin,
  286. PFILTER_NODE pFilterNode
  287. )
  288. {
  289. NTSTATUS Status = STATUS_SUCCESS;
  290. PFILTER_NODE pFilterNodeNext;
  291. Assert(pFilterNode);
  292. Assert(pTopologyPin);
  293. Assert(pTopologyPin->pTopologyNode->pFilterNode);
  294. //
  295. // Add to filter node to connected filter node list
  296. //
  297. if(pFilterNode != pTopologyPin->pTopologyNode->pFilterNode) {
  298. Status = pFilterNode->lstConnectedFilterNode.AddList(
  299. pTopologyPin->pTopologyNode->pFilterNode);
  300. if(!NT_SUCCESS(Status)) {
  301. Trap();
  302. goto exit;
  303. }
  304. // Hack for ds1wdm dmus synth topology (adds dmus to wave FN lst)
  305. if((pFilterNode->GetType() & FILTER_TYPE_ENDPOINT) == 0) {
  306. DPF2(50, "AddPinToFilterNode: (from) FN: %08x %s",
  307. pFilterNode,
  308. pFilterNode->DumpName());
  309. FOR_EACH_LIST_ITEM(
  310. &pTopologyPin->pTopologyNode->pFilterNode->lstConnectedFilterNode,
  311. pFilterNodeNext) {
  312. if(pFilterNodeNext == pFilterNode ||
  313. pFilterNodeNext == pTopologyPin->pTopologyNode->pFilterNode) {
  314. continue;
  315. }
  316. DPF2(50, "AddPinToFilterNode: (to) FN: %08x %s",
  317. pFilterNodeNext,
  318. pFilterNodeNext->DumpName());
  319. Status = pFilterNodeNext->lstConnectedFilterNode.AddList(
  320. pFilterNode);
  321. if(!NT_SUCCESS(Status)) {
  322. Trap();
  323. goto exit;
  324. }
  325. } END_EACH_LIST_ITEM
  326. }
  327. //
  328. // This fixes the bug with capture only devices. The topology for
  329. // capture only devices was not built properly, due to the missing
  330. // link between wave filter and topology filter.
  331. // Add the topology filter to wave filter ConnectedFilterNode list.
  332. // The AddList function does not allow duplicate entries.
  333. //
  334. if ((pFilterNode->GetType() & FILTER_TYPE_TOPOLOGY) &&
  335. (pTopologyPin->pTopologyNode->pFilterNode->GetType() & (FILTER_TYPE_CAPTURER))) {
  336. Status = pTopologyPin->pTopologyNode->pFilterNode->lstConnectedFilterNode.AddList(
  337. pFilterNode);
  338. DPF3(20, "AddPinToFilterNode: (CAPTURE ONLY) FN: %08x FN: %08x %s",
  339. pTopologyPin->pTopologyNode->pFilterNode,
  340. pFilterNode,
  341. pFilterNode->DumpName());
  342. }
  343. }
  344. exit:
  345. return(Status);
  346. }
  347. NTSTATUS
  348. AddPinToGraphNode(
  349. PTOPOLOGY_PIN pTopologyPin,
  350. PGRAPH_NODE pGraphNode,
  351. PTOPOLOGY_CONNECTION pTopologyConnection
  352. )
  353. {
  354. PLOGICAL_FILTER_NODE pLogicalFilterNode2;
  355. PLOGICAL_FILTER_NODE pLogicalFilterNode;
  356. PTOPOLOGY_CONNECTION pTopologyConnection2;
  357. NTSTATUS Status = STATUS_SUCCESS;
  358. BOOL fAddLogicalFilterNode;
  359. Assert(pTopologyPin);
  360. Assert(pTopologyPin->pTopologyNode);
  361. Assert(pGraphNode);
  362. FOR_EACH_LIST_ITEM(
  363. &pTopologyPin->pTopologyNode->lstLogicalFilterNode,
  364. pLogicalFilterNode) {
  365. fAddLogicalFilterNode = FALSE;
  366. FOR_EACH_LIST_ITEM(
  367. &pLogicalFilterNode->lstTopologyConnection,
  368. pTopologyConnection2) {
  369. Assert(pTopologyConnection2);
  370. if(pTopologyPin == pTopologyConnection2->pTopologyPinFrom ||
  371. pTopologyPin == pTopologyConnection2->pTopologyPinTo) {
  372. fAddLogicalFilterNode = TRUE;
  373. break;
  374. }
  375. } END_EACH_LIST_ITEM
  376. if(fAddLogicalFilterNode) {
  377. FOR_EACH_LIST_ITEM(
  378. &pGraphNode->pDeviceNode->lstLogicalFilterNode,
  379. pLogicalFilterNode2) {
  380. Assert(pLogicalFilterNode2);
  381. if(pLogicalFilterNode == pLogicalFilterNode2) {
  382. fAddLogicalFilterNode = FALSE;
  383. break;
  384. }
  385. } END_EACH_LIST_ITEM
  386. }
  387. if(fAddLogicalFilterNode) {
  388. Status = pGraphNode->lstLogicalFilterNode.AddList(
  389. pLogicalFilterNode,
  390. pTopologyConnection);
  391. if(!NT_SUCCESS(Status)) {
  392. Trap();
  393. goto exit;
  394. }
  395. }
  396. } END_EACH_LIST_ITEM
  397. exit:
  398. return(Status);
  399. }
  400. NTSTATUS
  401. CreatePinInfoConnection(
  402. PTOPOLOGY_CONNECTION *ppTopologyConnection,
  403. PFILTER_NODE pFilterNode,
  404. PGRAPH_NODE pGraphNode,
  405. PPIN_INFO pPinInfoSource,
  406. PPIN_INFO pPinInfoSink
  407. )
  408. {
  409. PTOPOLOGY_CONNECTION pTopologyConnectionSource;
  410. PTOPOLOGY_CONNECTION pTopologyConnectionSink;
  411. PTOPOLOGY_PIN pTopologyPinFrom;
  412. PTOPOLOGY_PIN pTopologyPinTo;
  413. NTSTATUS Status = STATUS_SUCCESS;
  414. Assert(pPinInfoSource);
  415. Assert(pPinInfoSink);
  416. ASSERT(pPinInfoSource != pPinInfoSink);
  417. FOR_EACH_LIST_ITEM(
  418. &pPinInfoSource->lstTopologyConnection,
  419. pTopologyConnectionSource) {
  420. Assert(pTopologyConnectionSource);
  421. if(!IS_CONNECTION_TYPE(pTopologyConnectionSource, FILTER)) {
  422. continue;
  423. }
  424. pTopologyPinFrom = NULL;
  425. pTopologyPinTo = NULL;
  426. if(pTopologyConnectionSource->pTopologyPinFrom != NULL) {
  427. ASSERT(pTopologyConnectionSource->pPinInfoTo == pPinInfoSource);
  428. ASSERT(pTopologyConnectionSource->pPinInfoFrom == NULL);
  429. ASSERT(pTopologyConnectionSource->pTopologyPinTo == NULL);
  430. pTopologyPinFrom = pTopologyConnectionSource->pTopologyPinFrom;
  431. }
  432. if(pTopologyConnectionSource->pTopologyPinTo != NULL) {
  433. ASSERT(pTopologyConnectionSource->pPinInfoFrom == pPinInfoSource);
  434. ASSERT(pTopologyConnectionSource->pPinInfoTo == NULL);
  435. ASSERT(pTopologyConnectionSource->pTopologyPinFrom == NULL);
  436. pTopologyPinTo = pTopologyConnectionSource->pTopologyPinTo;
  437. }
  438. FOR_EACH_LIST_ITEM(
  439. &pPinInfoSink->lstTopologyConnection,
  440. pTopologyConnectionSink) {
  441. Assert(pTopologyConnectionSink);
  442. if(!IS_CONNECTION_TYPE(pTopologyConnectionSink, FILTER)) {
  443. continue;
  444. }
  445. if(pTopologyConnectionSink->pTopologyPinFrom != NULL) {
  446. ASSERT(pTopologyConnectionSink->pPinInfoTo == pPinInfoSink);
  447. ASSERT(pTopologyConnectionSink->pPinInfoFrom == NULL);
  448. ASSERT(pTopologyConnectionSink->pTopologyPinTo == NULL);
  449. pTopologyPinFrom = pTopologyConnectionSink->pTopologyPinFrom;
  450. }
  451. if(pTopologyConnectionSink->pTopologyPinTo != NULL) {
  452. ASSERT(pTopologyConnectionSink->pPinInfoFrom == pPinInfoSink);
  453. ASSERT(pTopologyConnectionSink->pPinInfoTo == NULL);
  454. ASSERT(pTopologyConnectionSink->pTopologyPinFrom == NULL);
  455. pTopologyPinTo = pTopologyConnectionSink->pTopologyPinTo;
  456. }
  457. ASSERT(pTopologyPinFrom != NULL);
  458. ASSERT(pTopologyPinTo != NULL);
  459. Status = CTopologyConnection::Create(
  460. ppTopologyConnection,
  461. pFilterNode,
  462. pGraphNode,
  463. pTopologyPinFrom, // DataFlow == OUT, Pin #0
  464. pTopologyPinTo, // DataFlow == IN, Pin #1 - n
  465. NULL,
  466. NULL);
  467. if(!NT_SUCCESS(Status)) {
  468. Trap();
  469. goto exit;
  470. }
  471. // Add the connections to the PinInfos
  472. Assert(*ppTopologyConnection);
  473. Status = (*ppTopologyConnection)->AddListEnd(
  474. &pPinInfoSource->lstTopologyConnection);
  475. if(!NT_SUCCESS(Status)) {
  476. Trap();
  477. goto exit;
  478. }
  479. Status = (*ppTopologyConnection)->AddListEnd(
  480. &pPinInfoSink->lstTopologyConnection);
  481. if(!NT_SUCCESS(Status)) {
  482. Trap();
  483. goto exit;
  484. }
  485. if(pFilterNode != NULL) {
  486. Assert(pFilterNode);
  487. Status = AddPinToFilterNode(pTopologyPinFrom, pFilterNode);
  488. if(!NT_SUCCESS(Status)) {
  489. Trap();
  490. goto exit;
  491. }
  492. Status = AddPinToFilterNode(pTopologyPinTo, pFilterNode);
  493. if(!NT_SUCCESS(Status)) {
  494. Trap();
  495. goto exit;
  496. }
  497. // Change the connection type to physical
  498. (*ppTopologyConnection)->ulFlags =
  499. TOPC_FLAGS_PHYSICAL_CONNECTION_TYPE;
  500. }
  501. if(pGraphNode != NULL) {
  502. Assert(pGraphNode);
  503. Status = AddPinToGraphNode(
  504. pTopologyPinFrom,
  505. pGraphNode,
  506. *ppTopologyConnection);
  507. if(!NT_SUCCESS(Status)) {
  508. Trap();
  509. goto exit;
  510. }
  511. Status = AddPinToGraphNode(
  512. pTopologyPinTo,
  513. pGraphNode,
  514. *ppTopologyConnection);
  515. if(!NT_SUCCESS(Status)) {
  516. Trap();
  517. goto exit;
  518. }
  519. ASSERT(IS_CONNECTION_TYPE(*ppTopologyConnection, GRAPH));
  520. }
  521. } END_EACH_LIST_ITEM
  522. } END_EACH_LIST_ITEM
  523. exit:
  524. return(Status);
  525. }
  526. //---------------------------------------------------------------------------
  527. #ifdef DEBUG
  528. ENUMFUNC
  529. CTopologyConnection::Dump(
  530. )
  531. {
  532. PWSTR pwstrNameFrom = L"";
  533. PWSTR pwstrNameTo = L"";
  534. ULONG ulFromNode = MAXULONG;
  535. ULONG ulToNode = MAXULONG;
  536. ULONG ulFromPin = MAXULONG;
  537. ULONG ulToPin = MAXULONG;
  538. Assert(this);
  539. if(pTopologyPinFrom != NULL && pTopologyPinTo != NULL &&
  540. pTopologyPinFrom->pTopologyNode->pFilterNode !=
  541. pTopologyPinTo->pTopologyNode->pFilterNode) {
  542. pwstrNameFrom = pTopologyPinFrom->pTopologyNode->
  543. pFilterNode->GetFriendlyName();
  544. pwstrNameTo = pTopologyPinTo->pTopologyNode->
  545. pFilterNode->GetFriendlyName();
  546. }
  547. if(ulDebugFlags & (DEBUG_FLAGS_VERBOSE | DEBUG_FLAGS_OBJECT)) {
  548. dprintf("TC: %08x ulFlags %08x ", this, ulFlags);
  549. if(IS_CONNECTION_TYPE(this, FILTER)) {
  550. dprintf("FILTER");
  551. }
  552. if(IS_CONNECTION_TYPE(this, PHYSICAL)) {
  553. dprintf("PHYSICAL");
  554. }
  555. if(IS_CONNECTION_TYPE(this, GRAPH)) {
  556. dprintf("GRAPH");
  557. }
  558. dprintf("\n");
  559. if(pTopologyPinFrom != NULL) {
  560. dprintf(" TPFrom: %08x TN %08x #%02x Pin # %d %s\n",
  561. pTopologyPinFrom,
  562. pTopologyPinFrom->pTopologyNode,
  563. pTopologyPinFrom->pTopologyNode->ulRealNodeNumber,
  564. pTopologyPinFrom->ulPinNumber,
  565. DbgUnicode2Sz(pwstrNameFrom));
  566. }
  567. if(pPinInfoFrom != NULL) {
  568. dprintf(" PIFrom: %08x Pin # %d\n",
  569. pPinInfoFrom,
  570. pPinInfoFrom->PinId);
  571. }
  572. if(pTopologyPinTo != NULL) {
  573. dprintf(" TPTo: %08x TN %08x #%02x Pin # %d %s\n",
  574. pTopologyPinTo,
  575. pTopologyPinTo->pTopologyNode,
  576. pTopologyPinTo->pTopologyNode->ulRealNodeNumber,
  577. pTopologyPinTo->ulPinNumber,
  578. DbgUnicode2Sz(pwstrNameTo));
  579. }
  580. if(pPinInfoTo != NULL) {
  581. dprintf(" PITo: %08x Pin # %d\n",
  582. pPinInfoTo,
  583. pPinInfoTo->PinId);
  584. }
  585. dprintf("\n");
  586. }
  587. else {
  588. if(pTopologyPinFrom != NULL) {
  589. ulFromNode = pTopologyPinFrom->pTopologyNode->ulRealNodeNumber;
  590. ulFromPin = pTopologyPinFrom->ulPinNumber;
  591. }
  592. if(pTopologyPinTo != NULL) {
  593. ulToNode = pTopologyPinTo->pTopologyNode->ulRealNodeNumber;
  594. ulToPin = pTopologyPinTo->ulPinNumber;
  595. }
  596. if(pPinInfoFrom != NULL) {
  597. ulFromPin = pPinInfoFrom->PinId;
  598. }
  599. if(pPinInfoTo != NULL) {
  600. ulToPin = pPinInfoTo->PinId;
  601. }
  602. if(ulFromNode == KSFILTER_NODE) {
  603. dprintf("TC: %08x From: Filter P#%-2d %s\n",
  604. this,
  605. ulFromPin,
  606. DbgUnicode2Sz(pwstrNameFrom));
  607. }
  608. else {
  609. dprintf("TC: %08x From: N#%-2d P#%-2d %s\n",
  610. this,
  611. ulFromNode,
  612. ulFromPin,
  613. DbgUnicode2Sz(pwstrNameFrom));
  614. }
  615. if(ulToNode == KSFILTER_NODE) {
  616. dprintf(" To: Filter P#%-2d %s\n",
  617. ulToPin,
  618. DbgUnicode2Sz(pwstrNameTo));
  619. }
  620. else {
  621. dprintf(" To: N#%-2d P#%-2d %s\n",
  622. ulToNode,
  623. ulToPin,
  624. DbgUnicode2Sz(pwstrNameTo));
  625. }
  626. }
  627. return(STATUS_CONTINUE);
  628. }
  629. #endif
  630. //---------------------------------------------------------------------------