summaryrefslogtreecommitdiff
path: root/host/windows/usb/api/adb_api.cpp
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2009-08-06 20:51:11 -0700
committerRaphael <raphael@google.com>2009-08-06 20:51:11 -0700
commit3e44f3b231c027f01290367049f2244514f22d16 (patch)
treec53238f80ac5829158872424396ab24357e6fa37 /host/windows/usb/api/adb_api.cpp
parentf1a0ad991b2a328a1633562bff1805281a4b8b43 (diff)
Revert "Split AdbWinApi.dll into two dlls to remove dependency on WINUSB.DLL"
which breaks the Windows SDK on Donut. This reverts commit f855c4e8469e31114fccca4c28aeb01a806a9a48.
Diffstat (limited to 'host/windows/usb/api/adb_api.cpp')
-rw-r--r--host/windows/usb/api/adb_api.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/host/windows/usb/api/adb_api.cpp b/host/windows/usb/api/adb_api.cpp
index 493f62d86..f9bd94e6c 100644
--- a/host/windows/usb/api/adb_api.cpp
+++ b/host/windows/usb/api/adb_api.cpp
@@ -24,19 +24,12 @@
#include "adb_object_handle.h"
#include "adb_interface_enum.h"
#include "adb_interface.h"
+#include "adb_winusb_interface.h"
#include "adb_legacy_interface.h"
#include "adb_endpoint_object.h"
#include "adb_io_completion.h"
#include "adb_helper_routines.h"
-/** \brief Points to InstantiateWinUsbInterface exported from AdbWinUsbApi.dll.
-
- This variable is initialized with the actual address in DllMain routine for
- this DLL on DLL_PROCESS_ATTACH event.
- @see PFN_INSTWINUSBINTERFACE for more information.
-*/
-PFN_INSTWINUSBINTERFACE InstantiateWinUsbInterface = NULL;
-
ADBAPIHANDLE __cdecl AdbEnumInterfaces(GUID class_id,
bool exclude_not_present,
bool exclude_removed,
@@ -108,22 +101,11 @@ ADBAPIHANDLE __cdecl AdbCreateInterfaceByName(
ADBAPIHANDLE ret = NULL;
try {
- // Instantiate interface object, depending on the USB driver type.
+ // Instantiate object
if (IsLegacyInterface(interface_name)) {
- // We have legacy USB driver underneath us.
obj = new AdbLegacyInterfaceObject(interface_name);
} else {
- // We have WinUsb driver underneath us. Make sure that AdbWinUsbApi.dll
- // is loaded and its InstantiateWinUsbInterface routine address has
- // been cached.
- if (NULL != InstantiateWinUsbInterface) {
- obj = InstantiateWinUsbInterface(interface_name);
- if (NULL == obj) {
- return NULL;
- }
- } else {
- return NULL;
- }
+ obj = new AdbWinUsbInterfaceObject(interface_name);
}
// Create handle for it