Revert "Split AdbWinApi.dll into two dlls to remove dependency on WINUSB.DLL"

which breaks the Windows SDK on Donut.

This reverts commit f855c4e846.
This commit is contained in:
Raphael
2009-08-06 20:51:11 -07:00
parent f1a0ad991b
commit 3e44f3b231
24 changed files with 24 additions and 674 deletions

View File

@@ -110,30 +110,6 @@ typedef struct _AdbEndpointInformation {
/// the driver in isolation from hardware.
#define DEVICE_EMULATOR_PROD_ID 0xDDDD
/** \brief Function prototype for InstantiateWinUsbInterface routine exported
from AdbWinUsbApi.dll
In order to provide backward compatibility with the systems that still run
legacy (custom) USB drivers, and have not installed WINUSB.DLL we need to
split functionality of our ADB API on Windows between two DLLs: AdbWinApi,
and AdbWinUsbApi. AdbWinApi is fully capable of working on top of the legacy
driver, but has no traces to WinUsb. AdbWinUsbApi is capable of working on
top of WinUsb API. We are forced to do this split, because we can have
dependency on WINUSB.DLL in the DLL that implements legacy API. The problem
is that customers may have a legacy driver that they don't want to upgrade
to WinUsb, so they may not have WINUSB.DLL installed on their machines, but
they still must be able to use ADB. So, the idea behind the split is as
such. When AdbWinApi.dll is loaded into a process, it will check WINUSB.DLL
installation (by checking existance of C:\Windows\System32\winusb.dll). If
WINUSB.DLL is installed, AdbWinApi will also load AdbWinUsbApi.dll (by
calling LoadLibrary), and will extract address of InstantiateWinUsbInterface
routine exported from AdbWinUsbApi.dll. Then this routine will be used to
instantiate AdbInterfaceObject instance on condition that it is confirmed
that USB driver underneath us is in deed WinUsb.
*/
typedef class AdbInterfaceObject* \
(__cdecl *PFN_INSTWINUSBINTERFACE)(const wchar_t*);
// The following ifdef block is the standard way of creating macros which make
// exporting from a DLL simpler. All files within this DLL are compiled with
// the ADBWIN_EXPORTS symbol defined on the command line. this symbol should
@@ -143,10 +119,8 @@ typedef class AdbInterfaceObject* \
// as being exported.
#ifdef ADBWIN_EXPORTS
#define ADBWIN_API EXTERN_C __declspec(dllexport)
#define ADBWIN_API_CLASS __declspec(dllexport)
#else
#define ADBWIN_API EXTERN_C __declspec(dllimport)
#define ADBWIN_API_CLASS __declspec(dllimport)
#endif
/** \brief Handle to an API object.