55 DPRINT1(
"CUnregisterPhysicalConnection::QueryInterface no interface!!! iface %S\n",
GuidString.Buffer);
79CUnregisterPhysicalConnection::UnregisterPhysicalConnection(
94CUnregisterPhysicalConnection::UnregisterPhysicalConnectionToExternal(
109CUnregisterPhysicalConnection::UnregisterPhysicalConnectionFromExternal(
150 ISubdevice * FromSubDevice =
NULL, *ToSubDevice =
NULL;
156 Status = FromUnknown->QueryInterface(IID_ISubdevice, (
PVOID*)&FromSubDevice);
160 Status = FromSubDevice->GetDescriptor(&FromSubDeviceDescriptor);
176 Status = ToUnknown->QueryInterface(IID_ISubdevice, (
PVOID*)&ToSubDevice);
180 Status = ToSubDevice->GetDescriptor(&ToSubDeviceDescriptor);
184 if (
IsListEmpty(&ToSubDeviceDescriptor->SymbolicLinkList))
195 if (FromSubDeviceDescriptor)
205 if (ToSubDeviceDescriptor)
215 if (FromSubDeviceDescriptor)
226 if (ToSubDeviceDescriptor)
228 ToEntry->FromPin = ToPin;
229 ToEntry->Connection.Pin = FromPin;
231 RtlMoveMemory(&ToEntry->Connection.SymbolicLinkName, FromString->Buffer, FromString->MaximumLength);
232 ToEntry->Connection.SymbolicLinkName[FromString->Length /
sizeof(
WCHAR)] =
UNICODE_NULL;
234 InsertTailList(&ToSubDeviceDescriptor->PhysicalConnectionList, &ToEntry->Entry);
246 ToSubDevice->Release();
266 DPRINT(
"PcRegisterPhysicalConnection\n");
struct PHYSICAL_CONNECTION_ENTRY * PPHYSICAL_CONNECTION_ENTRY
struct SYMBOLICLINK_ENTRY * PSYMBOLICLINK_ENTRY
IMP_IUnregisterPhysicalConnection
CUnregisterPhysicalConnection(IUnknown *OuterUnknown)
STDMETHODIMP QueryInterface(REFIID InterfaceId, PVOID *Interface)
virtual ~CUnregisterPhysicalConnection()
NTSTATUS NTAPI PcRegisterPhysicalConnection(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
NTSTATUS NTAPI PcRegisterPhysicalConnectionFromExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNICODE_STRING FromString, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN ULONG ToPin)
NTSTATUS NTAPI PcRegisterPhysicalConnectionToExternal(IN PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN ULONG FromPin, IN PUNICODE_STRING ToString, IN ULONG ToPin)
NTSTATUS NTAPI NewIUnregisterPhysicalConnection(OUT PUNREGISTERPHYSICALCONNECTION *OutConnection)
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
static NTSTATUS UnRegisterConnection(IN OUT PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN PUNICODE_STRING FromString, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN PUNICODE_STRING ToString, IN ULONG ToPin)
NTSTATUS RegisterConnection(IN OUT PDEVICE_OBJECT DeviceObject, IN PUNKNOWN FromUnknown, IN PUNICODE_STRING FromString, IN ULONG FromPin, IN PUNKNOWN ToUnknown, IN PUNICODE_STRING ToString, IN ULONG ToPin)
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
static void cleanup(void)
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
NTSYSAPI NTSTATUS WINAPI RtlStringFromGUID(REFGUID, PUNICODE_STRING)
PVOID AllocateItem(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
VOID FreeItem(IN PVOID Item)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
_Out_ _Inout_ POEM_STRING DestinationString
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
IUnregisterPhysicalConnection * PUNREGISTERPHYSICALCONNECTION
#define PC_ASSERT_IRQL_EQUAL(x)
base of all file and directory entries
WCHAR SymbolicLinkName[1]
KSPIN_PHYSICALCONNECTION Connection
LIST_ENTRY PhysicalConnectionList
LIST_ENTRY SymbolicLinkList
UNICODE_STRING SymbolicLink
struct _LIST_ENTRY * Flink
#define RtlMoveMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
#define IsEqualGUIDAligned(guid1, guid2)
std::string ToString(XMLHandle node)