Jungo WinDriver  
Official Documentation
wdu_lib.h File Reference
#include "windrvr.h"

Go to the source code of this file.

Data Structures

struct  WDU_EVENT_TABLE
 

Typedefs

typedef PVOID WDU_DRIVER_HANDLE
 
typedef PVOID WDU_DEVICE_HANDLE
 
typedef PVOID WDU_STREAM_HANDLE
 
typedef WORD WDU_LANGID
 
typedef BOOL(DLLCALLCONVWDU_ATTACH_CALLBACK) (_In_ WDU_DEVICE_HANDLE hDevice, _In_ WDU_DEVICE *pDeviceInfo, _In_ PVOID pUserData)
 WinDriver calls this function with any new device that is attached, matches the given criteria, and if WD_ACKNOWLEDGE was passed to WDU_Init() in dwOptions - not controlled yet by another driver.
 
typedef void(DLLCALLCONVWDU_DETACH_CALLBACK) (_In_ WDU_DEVICE_HANDLE hDevice, _In_ PVOID pUserData)
 WinDriver calls this function when a controlled device has been detached from the system.
 
typedef BOOL(DLLCALLCONVWDU_POWER_CHANGE_CALLBACK) (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPowerState, _In_ PVOID pUserData)
 

Functions

DWORD DLLCALLCONV WDU_Init (_Outptr_ WDU_DRIVER_HANDLE *phDriver, _In_ WDU_MATCH_TABLE *pMatchTables, _In_ DWORD dwNumMatchTables, _In_ WDU_EVENT_TABLE *pEventTable, _In_ const char *pcLicense, _In_ DWORD dwOptions)
 Starts listening to devices matching a criteria, and registers notification callbacks for those devices.
 
void DLLCALLCONV WDU_Uninit (_In_ WDU_DRIVER_HANDLE hDriver)
 Stops listening to devices matching the criteria, and unregisters the notification callbacks for those devices.
 
DWORD DLLCALLCONV WDU_GetDeviceAddr (_In_ WDU_DEVICE_HANDLE hDevice, _Out_ DWORD *pAddress)
 Gets USB address that the device uses.
 
DWORD DLLCALLCONV WDU_GetDeviceRegistryProperty (_In_ WDU_DEVICE_HANDLE hDevice, _Outptr_ PVOID pBuffer, _Inout_ PDWORD pdwSize, _In_ WD_DEVICE_REGISTRY_PROPERTY property)
 Gets the specified registry property of a given device.
 
DWORD DLLCALLCONV WDU_GetDeviceInfo (_In_ WDU_DEVICE_HANDLE hDevice, _Outptr_ WDU_DEVICE **ppDeviceInfo)
 Gets configuration information from the device including all the descriptors in a WDU_DEVICE struct.
 
void DLLCALLCONV WDU_PutDeviceInfo (_In_ WDU_DEVICE *pDeviceInfo)
 Receives a device information pointer, allocated with a previous WDU_GetDeviceInfo() call, in order to perform the necessary cleanup.
 
DWORD DLLCALLCONV WDU_SetInterface (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwInterfaceNum, _In_ DWORD dwAlternateSetting)
 Sets the alternate setting for the specified interface.
 
DWORD DLLCALLCONV WDU_SetConfig (WDU_DEVICE_HANDLE hDevice, DWORD dwConfigNum)
 
DWORD DLLCALLCONV WDU_ResetPipe (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum)
 Resets a pipe.
 
DWORD DLLCALLCONV WDU_ResetDevice (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwOptions)
 Resets a device (supported only on Windows).
 
DWORD DLLCALLCONV WDU_Wakeup (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwOptions)
 Enables/Disables wakeup feature.
 
DWORD DLLCALLCONV WDU_SelectiveSuspend (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwOptions)
 Submits a request to suspend a given device (selective suspend), or cancels a previous suspend request.
 
DWORD DLLCALLCONV WDU_Transfer (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ PBYTE pSetupPacket, _In_ DWORD dwTimeout)
 Transfers data to/from a device.
 
DWORD DLLCALLCONV WDU_HaltTransfer (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum)
 Halts the transfer on the specified pipe (only one simultaneous transfer per-pipe is allowed by WinDriver).
 
DWORD DLLCALLCONV WDU_TransferDefaultPipe (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ PBYTE pSetupPacket, _In_ DWORD dwTimeout)
 
DWORD DLLCALLCONV WDU_TransferBulk (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ DWORD dwTimeout)
 
DWORD DLLCALLCONV WDU_TransferIsoch (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ DWORD dwTimeout)
 
DWORD DLLCALLCONV WDU_TransferInterrupt (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD fRead, _In_ DWORD dwOptions, _In_ PVOID pBuffer, _In_ DWORD dwBufferSize, _Outptr_ PDWORD pdwBytesTransferred, _In_ DWORD dwTimeout)
 
DWORD DLLCALLCONV WDU_GetLangIDs (_In_ WDU_DEVICE_HANDLE hDevice, _Outptr_ PBYTE pbNumSupportedLangIDs, _Outptr_ WDU_LANGID *pLangIDs, _In_ BYTE bNumLangIDs)
 Reads a list of supported language IDs and/or the number of supported language IDs from a device.
 
DWORD DLLCALLCONV WDU_GetStringDesc (_In_ WDU_DEVICE_HANDLE hDevice, _In_ BYTE bStrIndex, _Outptr_ PBYTE pbBuf, _In_ DWORD dwBufSize, _In_ WDU_LANGID langID, _Outptr_ PDWORD pdwDescSize)
 Reads a string descriptor from a device by string index.
 
DWORD DLLCALLCONV WDU_StreamOpen (_In_ WDU_DEVICE_HANDLE hDevice, _In_ DWORD dwPipeNum, _In_ DWORD dwBufferSize, _In_ DWORD dwRxSize, _In_ BOOL fBlocking, _In_ DWORD dwOptions, _In_ DWORD dwRxTxTimeout, _Outptr_ WDU_STREAM_HANDLE *phStream)
 Opens a new data stream for the specified pipe.
 
DWORD DLLCALLCONV WDU_StreamClose (_In_ WDU_STREAM_HANDLE hStream)
 Closes an open stream.
 
DWORD DLLCALLCONV WDU_StreamStart (_In_ WDU_STREAM_HANDLE hStream)
 Starts a stream, i.e starts transfers between the stream and the device.
 
DWORD DLLCALLCONV WDU_StreamStop (_In_ WDU_STREAM_HANDLE hStream)
 Stops a stream, i.e stops transfers between the stream and the device.
 
DWORD DLLCALLCONV WDU_StreamFlush (_In_ WDU_STREAM_HANDLE hStream)
 Flushes a stream, i.e writes the entire contents of the stream's data buffer to the device (relevant for a write stream), and blocks until the completion of all pending I/O on the stream.
 
DWORD DLLCALLCONV WDU_StreamRead (_In_ HANDLE hStream, _Outptr_ PVOID pBuffer, _In_ DWORD bytes, _Outptr_ DWORD *pdwBytesRead)
 Reads data from a read stream to the application.
 
DWORD DLLCALLCONV WDU_StreamWrite (_In_ HANDLE hStream, _In_ const PVOID pBuffer, _In_ DWORD bytes, _Outptr_ DWORD *pdwBytesWritten)
 Writes data from the application to a write stream.
 
DWORD DLLCALLCONV WDU_StreamGetStatus (_In_ WDU_STREAM_HANDLE hStream, _Outptr_ BOOL *pfIsRunning, _Outptr_ DWORD *pdwLastError, _Outptr_ DWORD *pdwBytesInBuffer)
 Returns a stream's current status.