Jungo WinDriver  
Official Documentation
windrvr.h File Reference
#include "wd_ver.h"
#include <windows.h>
#include <winioctl.h>
#include <stdarg.h>
#include "windrvr_usb.h"

Go to the source code of this file.

Data Structures

struct  WD_DMA_PAGE
 
struct  WD_DMA
 
struct  WD_KERNEL_BUFFER
 
struct  WD_TRANSFER
 
struct  WD_KERNEL_PLUGIN_CALL
 
struct  WD_INTERRUPT
 
struct  WD_VERSION
 
struct  WD_LICENSE
 
struct  WD_BUS
 
struct  WD_ITEMS
 
union  WD_ITEMS::I
 
struct  WD_ITEMS::I::Mem
 ITEM_MEMORY. More...
 
struct  WD_ITEMS::I::IO
 ITEM_IO. More...
 
struct  WD_ITEMS::I::Int
 ITEM_INTERRUPT. More...
 
struct  WD_CARD
 
struct  WD_CARD_REGISTER
 
struct  WD_IPC_PROCESS
 
struct  WD_IPC_REGISTER
 
struct  WD_IPC_SCAN_PROCS
 
struct  WD_IPC_SEND
 
struct  WD_CARD_CLEANUP
 
struct  WD_PCI_SLOT
 
struct  WD_PCI_ID
 
struct  WD_PCI_SCAN_CARDS
 
struct  WD_PCI_CAP
 
struct  WD_PCI_SCAN_CAPS
 
struct  WD_PCI_SRIOV
 
struct  WD_PCI_CARD_INFO
 
struct  WD_PCI_CONFIG_DUMP
 
struct  WD_SLEEP
 
struct  WD_DEBUG
 
struct  WD_DEBUG_DUMP
 
struct  WD_DEBUG_ADD
 
struct  WD_KERNEL_PLUGIN
 
struct  WD_GET_DEVICE_PROPERTY
 
struct  WD_EVENT
 
union  WD_EVENT::u
 
struct  WD_EVENT::u::Pci
 
struct  WD_EVENT::u::Usb
 
struct  WD_EVENT::u::Ipc
 
struct  WD_USAGE
 
struct  WD_OS_INFO
 

Macros

#define DLLCALLCONV
 
#define _In_
 
#define _Inout_
 
#define _Out_
 
#define _Outptr_
 
#define WD_DRIVER_NAME_PREFIX   ""
 
#define __FUNCTION__   __func__
 
#define WD_DEFAULT_DRIVER_NAME_BASE   "windrvr" WD_VER_ITOA
 
#define WD_DEFAULT_DRIVER_NAME    WD_DRIVER_NAME_PREFIX WD_DEFAULT_DRIVER_NAME_BASE
 
#define WD_MAX_DRIVER_NAME_LENGTH   128
 
#define WD_MAX_KP_NAME_LENGTH   128
 
#define WD_VERSION_STR_LENGTH   128
 
#define WD_DRIVER_NAME   WD_DriverName(NULL)
 Get driver name.
 
#define WD_PROD_NAME   "WinDriver"
 
#define WD_CPU_SPEC   " X86"
 
#define WD_DATA_MODEL   " 32bit"
 
#define WD_VER_STR_SUFFIX   ""
 
#define WD_VER_STR
 
#define WIN32
 
#define stricmp   _stricmp
 
#define va_copy(ap2, ap1)   (ap2)=(ap1)
 
#define WINAPI
 
#define PRI64   "I64"
 formatting for printing a 64bit variable
 
#define KPRI   ""
 formatting for printing a kernel pointer
 
#define UPRI   "l"
 
#define DMA_BIT_MASK(n)   (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
 
#define DMA_ADDRESS_WIDTH_MASK   0x7f000000
 
#define DMA_OPTIONS_ALL
 
#define DMA_DIRECTION_MASK   DMA_TO_FROM_DEVICE
 
#define DMA_READ_FROM_DEVICE   DMA_FROM_DEVICE
 Macros for backward compatibility.
 
#define DMA_WRITE_TO_DEVICE   DMA_TO_DEVICE
 
#define DMA_OPTIONS_ADDRESS_WIDTH_SHIFT
 
#define WD_LICENSE_LENGTH   3072
 
#define WD_PROCESS_NAME_LENGTH   128
 
#define DEBUG_USER_BUF_LEN   2048
 
#define WD_IPC_ALL_MSG   (WD_IPC_UNICAST_MSG | WD_IPC_MULTICAST_MSG)
 
#define WD_ACTIONS_POWER
 
#define WD_ACTIONS_ALL   (WD_ACTIONS_POWER | WD_INSERT | WD_REMOVE)
 
#define BZERO(buf)   memset(&(buf), 0, sizeof(buf))
 
#define INVALID_HANDLE_VALUE   ((HANDLE)(-1))
 
#define CTL_CODE(DeviceType, Function, Method, Access)
 
#define METHOD_BUFFERED   0
 
#define METHOD_IN_DIRECT   1
 
#define METHOD_OUT_DIRECT   2
 
#define METHOD_NEITHER   3
 
#define FILE_ANY_ACCESS   0
 
#define FILE_READ_ACCESS   1
 file & pipe
 
#define FILE_WRITE_ACCESS   2
 file & pipe
 
#define WD_TYPE   38200
 Device type.
 
#define FUNC_MASK   0x0
 
#define WD_CTL_CODE(wFuncNum)
 
#define WD_CTL_DECODE_FUNC(IoControlCode)   ((IoControlCode >> 2) & 0xfff)
 
#define WD_CTL_DECODE_TYPE(IoControlCode)    DEVICE_TYPE_FROM_CTL_CODE(IoControlCode)
 
#define WD_CTL_IS_64BIT_AWARE(IoControlCode)    (WD_CTL_DECODE_FUNC(IoControlCode) & FUNC_MASK)
 
#define IOCTL_WD_KERNEL_BUF_LOCK   WD_CTL_CODE(0x9f3)
 
#define IOCTL_WD_KERNEL_BUF_UNLOCK   WD_CTL_CODE(0x9f4)
 
#define IOCTL_WD_DMA_LOCK   WD_CTL_CODE(0x9be)
 
#define IOCTL_WD_DMA_UNLOCK   WD_CTL_CODE(0x902)
 
#define IOCTL_WD_TRANSFER   WD_CTL_CODE(0x98c)
 
#define IOCTL_WD_MULTI_TRANSFER   WD_CTL_CODE(0x98d)
 
#define IOCTL_WD_PCI_SCAN_CARDS   WD_CTL_CODE(0x9fa)
 
#define IOCTL_WD_PCI_GET_CARD_INFO   WD_CTL_CODE(0x9e8)
 
#define IOCTL_WD_VERSION   WD_CTL_CODE(0x910)
 
#define IOCTL_WD_PCI_CONFIG_DUMP   WD_CTL_CODE(0x91a)
 
#define IOCTL_WD_KERNEL_PLUGIN_OPEN   WD_CTL_CODE(0x91b)
 
#define IOCTL_WD_KERNEL_PLUGIN_CLOSE   WD_CTL_CODE(0x91c)
 
#define IOCTL_WD_KERNEL_PLUGIN_CALL   WD_CTL_CODE(0x91d)
 
#define IOCTL_WD_INT_ENABLE   WD_CTL_CODE(0x9b6)
 
#define IOCTL_WD_INT_DISABLE   WD_CTL_CODE(0x9bb)
 
#define IOCTL_WD_INT_COUNT   WD_CTL_CODE(0x9ba)
 
#define IOCTL_WD_SLEEP   WD_CTL_CODE(0x927)
 
#define IOCTL_WD_DEBUG   WD_CTL_CODE(0x928)
 
#define IOCTL_WD_DEBUG_DUMP   WD_CTL_CODE(0x929)
 
#define IOCTL_WD_CARD_UNREGISTER   WD_CTL_CODE(0x9e7)
 
#define IOCTL_WD_CARD_REGISTER   WD_CTL_CODE(0x9e6)
 
#define IOCTL_WD_INT_WAIT   WD_CTL_CODE(0x9b9)
 
#define IOCTL_WD_LICENSE   WD_CTL_CODE(0x9f9)
 
#define IOCTL_WD_EVENT_REGISTER   WD_CTL_CODE(0x9ef)
 
#define IOCTL_WD_EVENT_UNREGISTER   WD_CTL_CODE(0x9f0)
 
#define IOCTL_WD_EVENT_PULL   WD_CTL_CODE(0x9f1)
 
#define IOCTL_WD_EVENT_SEND   WD_CTL_CODE(0x9f2)
 
#define IOCTL_WD_DEBUG_ADD   WD_CTL_CODE(0x964)
 
#define IOCTL_WD_USAGE   WD_CTL_CODE(0x976)
 
#define IOCTL_WDU_GET_DEVICE_DATA   WD_CTL_CODE(0x9a7)
 
#define IOCTL_WDU_SET_INTERFACE   WD_CTL_CODE(0x981)
 
#define IOCTL_WDU_RESET_PIPE   WD_CTL_CODE(0x982)
 
#define IOCTL_WDU_TRANSFER   WD_CTL_CODE(0x983)
 
#define IOCTL_WDU_HALT_TRANSFER   WD_CTL_CODE(0x985)
 
#define IOCTL_WDU_WAKEUP   WD_CTL_CODE(0x98a)
 
#define IOCTL_WDU_RESET_DEVICE   WD_CTL_CODE(0x98b)
 
#define IOCTL_WD_GET_DEVICE_PROPERTY   WD_CTL_CODE(0x990)
 
#define IOCTL_WD_CARD_CLEANUP_SETUP   WD_CTL_CODE(0x995)
 
#define IOCTL_WD_DMA_SYNC_CPU   WD_CTL_CODE(0x99f)
 
#define IOCTL_WD_DMA_SYNC_IO   WD_CTL_CODE(0x9a0)
 
#define IOCTL_WDU_STREAM_OPEN   WD_CTL_CODE(0x9a8)
 
#define IOCTL_WDU_STREAM_CLOSE   WD_CTL_CODE(0x9a9)
 
#define IOCTL_WDU_STREAM_START   WD_CTL_CODE(0x9af)
 
#define IOCTL_WDU_STREAM_STOP   WD_CTL_CODE(0x9b0)
 
#define IOCTL_WDU_STREAM_FLUSH   WD_CTL_CODE(0x9aa)
 
#define IOCTL_WDU_STREAM_GET_STATUS   WD_CTL_CODE(0x9b5)
 
#define IOCTL_WDU_SELECTIVE_SUSPEND   WD_CTL_CODE(0x9ae)
 
#define IOCTL_WD_PCI_SCAN_CAPS   WD_CTL_CODE(0x9e5)
 
#define IOCTL_WD_IPC_REGISTER   WD_CTL_CODE(0x9eb)
 
#define IOCTL_WD_IPC_UNREGISTER   WD_CTL_CODE(0x9ec)
 
#define IOCTL_WD_IPC_SCAN_PROCS   WD_CTL_CODE(0x9ed)
 
#define IOCTL_WD_IPC_SEND   WD_CTL_CODE(0x9ee)
 
#define IOCTL_WD_PCI_SRIOV_ENABLE   WD_CTL_CODE(0x9f5)
 
#define IOCTL_WD_PCI_SRIOV_DISABLE   WD_CTL_CODE(0x9f6)
 
#define IOCTL_WD_PCI_SRIOV_GET_NUMVFS   WD_CTL_CODE(0x9f7)
 
#define IOCTL_WD_IPC_SHARED_INT_ENABLE   WD_CTL_CODE(0x9fc)
 
#define IOCTL_WD_IPC_SHARED_INT_DISABLE   WD_CTL_CODE(0x9fd)
 
#define IOCTL_WD_DMA_TRANSACTION_INIT   WD_CTL_CODE(0x9fe)
 
#define IOCTL_WD_DMA_TRANSACTION_EXECUTE   WD_CTL_CODE(0x9ff)
 
#define IOCTL_WD_DMA_TRANSFER_COMPLETED_AND_CHECK   WD_CTL_CODE(0xa00)
 
#define IOCTL_WD_DMA_TRANSACTION_RELEASE   WD_CTL_CODE(0xa01)
 
#define REGKEY_BUFSIZE   256
 
#define OS_CAN_NOT_DETECT_TEXT   "OS CAN NOT DETECT"
 
#define INSTALLATION_TYPE_NOT_DETECT_TEXT   "unknown"
 
#define WD_CloseLocal(h)   CloseHandle(h)
 
#define WD_UStreamRead(hFile, pBuffer, dwNumberOfBytesToRead, dwNumberOfBytesRead)
 
#define WD_UStreamWrite(hFile, pBuffer, dwNumberOfBytesToWrite, dwNumberOfBytesWritten)
 
#define WD_OpenLocal()
 
#define WD_OpenStreamLocal(read, sync)
 
#define WD_FUNCTION   WD_FUNCTION_LOCAL
 
#define WD_Close   WD_CloseLocal
 
#define WD_Open   WD_OpenLocal
 
#define WD_StreamOpen   WD_OpenStreamLocal
 
#define WD_StreamClose   WD_CloseLocal
 
#define SIZE_OF_WD_DMA(pDma)
 
#define SIZE_OF_WD_EVENT(pEvent)
 
#define WD_Debug(h, pDebug)    WD_FUNCTION(IOCTL_WD_DEBUG, h, pDebug, sizeof(WD_DEBUG), FALSE)
 Sets debugging level for collecting debug messages.
 
#define WD_DebugDump(h, pDebugDump)
 Retrieves debug messages buffer.
 
#define WD_DebugAdd(h, pDebugAdd)    WD_FUNCTION(IOCTL_WD_DEBUG_ADD, h, pDebugAdd, sizeof(WD_DEBUG_ADD), FALSE)
 Sends debug messages to the debug log.
 
#define WD_Transfer(h, pTransfer)    WD_FUNCTION(IOCTL_WD_TRANSFER, h, pTransfer, sizeof(WD_TRANSFER), FALSE)
 Executes a single read/write instruction to an I/O port or to a memory address.
 
#define WD_MultiTransfer(h, pTransferArray, dwNumTransfers)
 Executes multiple read/write instructions to I/O ports and/or memory addresses.
 
#define WD_KernelBufLock(h, pKerBuf)
 Allocates a contiguous or non-contiguous non-paged kernel buffer, and maps it to user address space.
 
#define WD_KernelBufUnlock(h, pKerBuf)
 Frees kernel buffer.
 
#define WD_DMALock(h, pDma)    WD_FUNCTION(IOCTL_WD_DMA_LOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
 Enables contiguous-buffer or Scatter/Gather DMA.
 
#define WD_DMAUnlock(h, pDma)    WD_FUNCTION(IOCTL_WD_DMA_UNLOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
 Unlocks a DMA buffer.
 
#define WD_DMATransactionInit(h, pDma)
 Initializes the transaction, allocates a DMA buffer, locks it in physical memory, and returns mappings of the allocated buffer to physical address space and to user-mode and kernel virtual address spaces.
 
#define WD_DMATransactionExecute(h, pDma)
 Begins the execution of a specified DMA transaction.
 
#define WD_DMATransferCompletedAndCheck(h, pDma)
 Notifies WinDriver that a device's DMA transfer operation is completed.
 
#define WD_DMATransactionRelease(h, pDma)
 Terminates a specified DMA transaction without deleting the associated WD_DMA transaction structure.
 
#define WD_DMATransactionUninit(h, pDma)    WD_FUNCTION(IOCTL_WD_DMA_UNLOCK, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
 Unlocks and frees the memory allocated for a DMA buffer transaction by a previous call to WD_DMATransactionInit()
 
#define WD_DMASyncCpu(h, pDma)    WD_FUNCTION(IOCTL_WD_DMA_SYNC_CPU, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
 Synchronizes the cache of all CPUs with the DMA buffer, by flushing the data from the CPU caches.
 
#define WD_DMASyncIo(h, pDma)    WD_FUNCTION(IOCTL_WD_DMA_SYNC_IO, h, pDma, SIZE_OF_WD_DMA(pDma), FALSE)
 Synchronizes the I/O caches with the DMA buffer, by flushing the data from the I/O caches and updating the CPU caches.
 
#define WD_CardRegister(h, pCard)
 Card registration function.
 
#define WD_CardUnregister(h, pCard)
 Unregisters a device and frees the resources allocated to it.
 
#define WD_IpcRegister(h, pIpcRegister)
 Registers an application with WinDriver IPC.
 
#define WD_IpcUnRegister(h, pProcInfo)
 This function unregisters the user application from WinDriver IPC.
 
#define WD_IpcScanProcs(h, pIpcScanProcs)
 Scans and returns information of all WinDriver IPC registered processes that share the application process groupID.
 
#define WD_IpcSend(h, pIpcSend)    WD_FUNCTION(IOCTL_WD_IPC_SEND, h, pIpcSend, sizeof(WD_IPC_SEND), FALSE)
 Sends a message to other processes, depending on the content of the pIpcSend struct.
 
#define WD_SharedIntEnable(h, pIpcRegister)
 Enables the shared interrupts mechanism of WinDriver.
 
#define WD_SharedIntDisable(h)    WD_FUNCTION(IOCTL_WD_IPC_SHARED_INT_DISABLE, h, 0, 0, FALSE)
 Disables the Shared Interrupts mechanism of WinDriver for all processes.
 
#define WD_PciSriovEnable(h, pPciSRIOV)
 Enables SR-IOV for a supported device.
 
#define WD_PciSriovDisable(h, pPciSRIOV)
 Disables SR-IOV for a supported device and removes all the assigned VFs.
 
#define WD_PciSriovGetNumVFs(h, pPciSRIOV)
 Gets the number of virtual functions assigned to a supported device.
 
#define WD_CardCleanupSetup(h, pCardCleanup)
 Sets a list of transfer cleanup commands to be performed for the specified card on any of the following occasions: The application exits abnormally.
 
#define WD_PciScanCards(h, pPciScan)
 Detects PCI devices installed on the PCI bus, which conform to the input criteria (vendor ID and/or card ID), and returns the number and location (bus, slot and function) of the detected devices.
 
#define WD_PciScanCaps(h, pPciScanCaps)
 Scans the specified PCI capabilities group of the given PCI slot for the specified capability (or for all capabilities).
 
#define WD_PciGetCardInfo(h, pPciCard)
 Retrieves PCI device's resource information (i.e., Memory ranges, I/O ranges, Interrupt lines).
 
#define WD_PciConfigDump(h, pPciConfigDump)
 Reads/writes from/to the PCI configuration space of a selected PCI card or the extended configuration space of a selected PCI Express card.
 
#define WD_Version(h, pVerInfo)    WD_FUNCTION(IOCTL_WD_VERSION, h, pVerInfo, sizeof(WD_VERSION), FALSE)
 Returns the version number of the WinDriver kernel module currently running.
 
#define WD_License(h, pLicense)    WD_FUNCTION(IOCTL_WD_LICENSE, h, pLicense, sizeof(WD_LICENSE), FALSE)
 Transfers the license string to the WinDriver kernel module When using the high-level WDC library APIs, described in the WinDriver PCI Manual, the license registration is done via the WDC_DriverOpen() function, so you do not need to call WD_License() directly.
 
#define WD_KernelPlugInOpen(h, pKernelPlugIn)
 Obtain a valid handle to the Kernel PlugIn.
 
#define WD_KernelPlugInClose(h, pKernelPlugIn)
 Closes the WinDriver Kernel PlugIn handle obtained from WD_KernelPlugInOpen()
 
#define WD_KernelPlugInCall(h, pKernelPlugInCall)
 Calls a routine in the Kernel PlugIn to be executed.
 
#define WD_IntEnable(h, pInterrupt)    WD_FUNCTION(IOCTL_WD_INT_ENABLE, h, pInterrupt, sizeof(WD_INTERRUPT), FALSE)
 Registers an interrupt service routine (ISR) to be called upon interrupt.
 
#define WD_IntDisable(h, pInterrupt)
 Disables interrupt processing.
 
#define WD_IntCount(h, pInterrupt)    WD_FUNCTION(IOCTL_WD_INT_COUNT, h, pInterrupt, sizeof(WD_INTERRUPT), FALSE)
 Retrieves the interrupts count since the call to WD_IntEnable()
 
#define WD_IntWait(h, pInterrupt)    WD_FUNCTION(IOCTL_WD_INT_WAIT, h, pInterrupt, sizeof(WD_INTERRUPT), TRUE)
 Waits for an interrupt.
 
#define WD_Sleep(h, pSleep)    WD_FUNCTION(IOCTL_WD_SLEEP, h, pSleep, sizeof(WD_SLEEP), FALSE)
 Delays execution for a specific duration of time.
 
#define WD_EventRegister(h, pEvent)
 
#define WD_EventUnregister(h, pEvent)
 
#define WD_EventPull(h, pEvent)    WD_FUNCTION(IOCTL_WD_EVENT_PULL, h, pEvent, SIZE_OF_WD_EVENT(pEvent), FALSE)
 
#define WD_EventSend(h, pEvent)    WD_FUNCTION(IOCTL_WD_EVENT_SEND, h, pEvent, SIZE_OF_WD_EVENT(pEvent), FALSE)
 
#define WD_Usage(h, pStop)    WD_FUNCTION(IOCTL_WD_USAGE, h, pStop, sizeof(WD_USAGE), FALSE)
 
#define WD_UGetDeviceData(h, pGetDevData)
 
#define WD_GetDeviceProperty(h, pGetDevProperty)
 
#define WD_USetInterface(h, pSetIfc)
 
#define WD_UResetPipe(h, pResetPipe)
 
#define WD_UTransfer(h, pTrans)    WD_FUNCTION(IOCTL_WDU_TRANSFER, h, pTrans, sizeof(WDU_TRANSFER), TRUE);
 
#define WD_UHaltTransfer(h, pHaltTrans)
 
#define WD_UWakeup(h, pWakeup)    WD_FUNCTION(IOCTL_WDU_WAKEUP, h, pWakeup, sizeof(WDU_WAKEUP), FALSE);
 
#define WD_USelectiveSuspend(h, pSelectiveSuspend)
 
#define WD_UResetDevice(h, pResetDevice)
 
#define WD_UStreamOpen(h, pStream)    WD_FUNCTION(IOCTL_WDU_STREAM_OPEN, h, pStream, sizeof(WDU_STREAM), FALSE);
 
#define WD_UStreamClose(h, pStream)    WD_FUNCTION(IOCTL_WDU_STREAM_CLOSE, h, pStream, sizeof(WDU_STREAM), FALSE);
 
#define WD_UStreamStart(h, pStream)    WD_FUNCTION(IOCTL_WDU_STREAM_START, h, pStream, sizeof(WDU_STREAM), FALSE);
 
#define WD_UStreamStop(h, pStream)    WD_FUNCTION(IOCTL_WDU_STREAM_STOP, h, pStream, sizeof(WDU_STREAM), FALSE);
 
#define WD_UStreamFlush(h, pStream)    WD_FUNCTION(IOCTL_WDU_STREAM_FLUSH, h, pStream, sizeof(WDU_STREAM), FALSE);
 
#define WD_UStreamGetStatus(h, pStreamStatus)
 
#define __ALIGN_DOWN(val, alignment)   ( (val) & ~((alignment) - 1) )
 
#define __ALIGN_UP(val, alignment)    ( ((val) + (alignment) - 1) & ~((alignment) - 1) )
 
#define MIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define MAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define SAFE_STRING(s)   ((s) ? (s) : "")
 
#define UNUSED_VAR(x)   (void)x
 

Typedefs

typedef unsigned __int64 UINT64
 
typedef unsigned char BYTE
 
typedef unsigned short int WORD
 
typedef unsigned int UINT32
 
typedef UINT32 KPTR
 
typedef size_t UPTR
 
typedef UINT64 DMA_ADDR
 
typedef UINT64 PHYS_ADDR
 
typedef struct WD_DMA_PAGE WD_DMA_PAGE_V80
 
typedef void(DLLCALLCONVDMA_TRANSACTION_CALLBACK) (PVOID pData)
 
typedef struct WD_DMA WD_DMA_V80
 
typedef struct WD_KERNEL_BUFFER WD_KERNEL_BUFFER_V121
 
typedef struct WD_TRANSFER WD_TRANSFER_V61
 
typedef struct WD_KERNEL_PLUGIN_CALL WD_KERNEL_PLUGIN_CALL_V40
 
typedef struct WD_INTERRUPT WD_INTERRUPT_V91
 
typedef struct WD_VERSION WD_VERSION_V30
 
typedef struct WD_LICENSE WD_LICENSE_V122
 
typedef DWORD WD_BUS_TYPE
 
typedef struct WD_BUS WD_BUS_V30
 
typedef struct WD_ITEMS WD_ITEMS_V118
 
typedef struct WD_CARD WD_CARD_V118
 
typedef struct WD_CARD_REGISTER WD_CARD_REGISTER_V118
 
typedef struct WD_IPC_PROCESS WD_IPC_PROCESS_V121
 
typedef struct WD_IPC_REGISTER WD_IPC_REGISTER_V121
 
typedef struct WD_IPC_SCAN_PROCS WD_IPC_SCAN_PROCS_V121
 
typedef struct WD_IPC_SEND WD_IPC_SEND_V121
 
typedef struct WD_PCI_SCAN_CARDS WD_PCI_SCAN_CARDS_V124
 
typedef struct WD_PCI_SCAN_CAPS WD_PCI_SCAN_CAPS_V118
 
typedef struct WD_PCI_SRIOV WD_PCI_SRIOV_V122
 
typedef struct WD_PCI_CARD_INFO WD_PCI_CARD_INFO_V118
 
typedef struct WD_PCI_CONFIG_DUMP WD_PCI_CONFIG_DUMP_V30
 
typedef struct WD_SLEEP WD_SLEEP_V40
 
typedef struct WD_DEBUG WD_DEBUG_V40
 
typedef struct WD_DEBUG_DUMP WD_DEBUG_DUMP_V40
 
typedef struct WD_DEBUG_ADD WD_DEBUG_ADD_V503
 
typedef struct WD_KERNEL_PLUGIN WD_KERNEL_PLUGIN_V40
 
typedef DWORD WD_EVENT_TYPE
 
typedef struct WD_EVENT WD_EVENT_V121
 

Enumerations

enum  WD_TRANSFER_CMD {
  CMD_NONE = 0 , CMD_END = 1 , CMD_MASK = 2 , RP_BYTE = 10 ,
  RP_WORD = 11 , RP_DWORD = 12 , WP_BYTE = 13 , WP_WORD = 14 ,
  WP_DWORD = 15 , RP_QWORD = 16 , WP_QWORD = 17 , RP_SBYTE = 20 ,
  RP_SWORD = 21 , RP_SDWORD = 22 , WP_SBYTE = 23 , WP_SWORD = 24 ,
  WP_SDWORD = 25 , RP_SQWORD = 26 , WP_SQWORD = 27 , RM_BYTE = 30 ,
  RM_WORD = 31 , RM_DWORD = 32 , WM_BYTE = 33 , WM_WORD = 34 ,
  WM_DWORD = 35 , RM_QWORD = 36 , WM_QWORD = 37 , RM_SBYTE = 40 ,
  RM_SWORD = 41 , RM_SDWORD = 42 , WM_SBYTE = 43 , WM_SWORD = 44 ,
  WM_SDWORD = 45 , RM_SQWORD = 46 , WM_SQWORD = 47
}
 IN WD_TRANSFER_CMD and WD_Transfer() DWORD stands for 32 bits and QWORD is 64 bit. More...
 
enum  { WD_DMA_PAGES = 256 }
 
enum  WD_DMA_OPTIONS {
  DMA_KERNEL_BUFFER_ALLOC = 0x1 , DMA_KBUF_BELOW_16M = 0x2 , DMA_LARGE_BUFFER = 0x4 , DMA_ALLOW_CACHE = 0x8 ,
  DMA_KERNEL_ONLY_MAP = 0x10 , DMA_FROM_DEVICE = 0x20 , DMA_TO_DEVICE = 0x40 , DMA_TO_FROM_DEVICE = (DMA_FROM_DEVICE | DMA_TO_DEVICE) ,
  DMA_ALLOW_64BIT_ADDRESS = 0x80 , DMA_ALLOW_NO_HCARD = 0x100 , DMA_GET_EXISTING_BUF = 0x200 , DMA_RESERVED_MEM = 0x400 ,
  DMA_KBUF_ALLOC_SPECIFY_ADDRESS_WIDTH = 0x800 , DMA_GET_PREALLOCATED_BUFFERS_ONLY = 0x1000 , DMA_TRANSACTION = 0x2000 , DMA_GPUDIRECT = 0x4000 ,
  DMA_DISABLE_MERGE_ADJACENT_PAGES = 0x8000
}
 
enum  { WD_MATCH_EXCLUDE = 0x1 }
 
enum  WD_KER_BUF_OPTION { KER_BUF_ALLOC_NON_CONTIG = 0x0001 , KER_BUF_ALLOC_CONTIG = 0x0002 , KER_BUF_ALLOC_CACHED = 0x0004 , KER_BUF_GET_EXISTING_BUF = 0x0008 }
 
enum  {
  INTERRUPT_LATCHED = 0x00 , INTERRUPT_LEVEL_SENSITIVE = 0x01 , INTERRUPT_CMD_COPY = 0x02 , INTERRUPT_CE_INT_ID = 0x04 ,
  INTERRUPT_CMD_RETURN_VALUE = 0x08 , INTERRUPT_MESSAGE = 0x10 , INTERRUPT_MESSAGE_X = 0x20 , INTERRUPT_DONT_GET_MSI_MESSAGE = 0x40
}
 
enum  WD_INTERRUPT_WAIT_RESULT { INTERRUPT_RECEIVED = 0 , INTERRUPT_STOPPED , INTERRUPT_INTERRUPTED }
 
enum  {
  WD_BUS_USB = (int)0xfffffffe , WD_BUS_UNKNOWN = 0 , WD_BUS_ISA = 1 , WD_BUS_EISA = 2 ,
  WD_BUS_PCI = 5
}
 
enum  ITEM_TYPE {
  ITEM_NONE = 0 , ITEM_INTERRUPT = 1 , ITEM_MEMORY = 2 , ITEM_IO = 3 ,
  ITEM_BUS = 5
}
 
enum  WD_ITEM_MEM_OPTIONS { WD_ITEM_MEM_DO_NOT_MAP_KERNEL = 0x1 , WD_ITEM_MEM_ALLOW_CACHE = 0x2 , WD_ITEM_MEM_USER_MAP = 0x4 }
 
enum  { WD_CARD_ITEMS = 128 }
 
enum  { WD_IPC_MAX_PROCS = 0x40 }
 
enum  { WD_IPC_UID_UNICAST = 0x1 , WD_IPC_SUBGROUP_MULTICAST = 0x2 , WD_IPC_MULTICAST = 0x4 }
 
enum  { WD_FORCE_CLEANUP = 0x1 }
 
enum  { WD_PCI_CARDS = 256 }
 
enum  WD_PCI_SCAN_OPTIONS { WD_PCI_SCAN_DEFAULT = 0x0 , WD_PCI_SCAN_BY_TOPOLOGY = 0x1 , WD_PCI_SCAN_REGISTERED = 0x2 , WD_PCI_SCAN_INCLUDE_DOMAINS = 0x4 }
 
enum  { WD_PCI_MAX_CAPS = 50 }
 
enum  { WD_PCI_CAP_ID_ALL = 0x0 }
 
enum  WD_PCI_SCAN_CAPS_OPTIONS { WD_PCI_SCAN_CAPS_BASIC = 0x1 , WD_PCI_SCAN_CAPS_EXTENDED = 0x2 }
 
enum  PCI_ACCESS_RESULT { PCI_ACCESS_OK = 0 , PCI_ACCESS_ERROR = 1 , PCI_BAD_BUS = 2 , PCI_BAD_SLOT = 3 }
 
enum  { SLEEP_BUSY = 0 , SLEEP_NON_BUSY = 1 }
 
enum  DEBUG_LEVEL {
  D_OFF = 0 , D_ERROR = 1 , D_WARN = 2 , D_INFO = 3 ,
  D_TRACE = 4
}
 
enum  DEBUG_SECTION {
  S_ALL = (int)0xffffffff , S_IO = 0x00000008 , S_MEM = 0x00000010 , S_INT = 0x00000020 ,
  S_PCI = 0x00000040 , S_DMA = 0x00000080 , S_MISC = 0x00000100 , S_LICENSE = 0x00000200 ,
  S_PNP = 0x00001000 , S_CARD_REG = 0x00002000 , S_KER_DRV = 0x00004000 , S_USB = 0x00008000 ,
  S_KER_PLUG = 0x00010000 , S_EVENT = 0x00020000 , S_IPC = 0x00040000 , S_KER_BUF = 0x00080000
}
 
enum  DEBUG_COMMAND {
  DEBUG_STATUS = 1 , DEBUG_SET_FILTER = 2 , DEBUG_SET_BUFFER = 3 , DEBUG_CLEAR_BUFFER = 4 ,
  DEBUG_DUMP_SEC_ON = 5 , DEBUG_DUMP_SEC_OFF = 6 , KERNEL_DEBUGGER_ON = 7 , KERNEL_DEBUGGER_OFF = 8 ,
  DEBUG_DUMP_CLOCK_ON = 9 , DEBUG_DUMP_CLOCK_OFF = 10 , DEBUG_CLOCK_RESET = 11
}
 
enum  WD_GET_DEVICE_PROPERTY_OPTION { WD_DEVICE_PCI = 0x1 , WD_DEVICE_USB = 0x2 }
 IOCTL Structures. More...
 
enum  WD_ERROR_CODES {
  WD_STATUS_SUCCESS = 0 , WD_STATUS_INVALID_WD_HANDLE = (int)0xffffffff , WD_WINDRIVER_STATUS_ERROR = 0x20000000L , WD_INVALID_HANDLE = 0x20000001L ,
  WD_INVALID_PIPE_NUMBER = 0x20000002L , WD_READ_WRITE_CONFLICT = 0x20000003L , WD_ZERO_PACKET_SIZE = 0x20000004L , WD_INSUFFICIENT_RESOURCES = 0x20000005L ,
  WD_UNKNOWN_PIPE_TYPE = 0x20000006L , WD_SYSTEM_INTERNAL_ERROR = 0x20000007L , WD_DATA_MISMATCH = 0x20000008L , WD_NO_LICENSE = 0x20000009L ,
  WD_NOT_IMPLEMENTED = 0x2000000aL , WD_KERPLUG_FAILURE = 0x2000000bL , WD_FAILED_ENABLING_INTERRUPT = 0x2000000cL , WD_INTERRUPT_NOT_ENABLED = 0x2000000dL ,
  WD_RESOURCE_OVERLAP = 0x2000000eL , WD_DEVICE_NOT_FOUND = 0x2000000fL , WD_WRONG_UNIQUE_ID = 0x20000010L , WD_OPERATION_ALREADY_DONE = 0x20000011L ,
  WD_USB_DESCRIPTOR_ERROR = 0x20000012L , WD_SET_CONFIGURATION_FAILED = 0x20000013L , WD_CANT_OBTAIN_PDO = 0x20000014L , WD_TIME_OUT_EXPIRED = 0x20000015L ,
  WD_IRP_CANCELED = 0x20000016L , WD_FAILED_USER_MAPPING = 0x20000017L , WD_FAILED_KERNEL_MAPPING = 0x20000018L , WD_NO_RESOURCES_ON_DEVICE = 0x20000019L ,
  WD_NO_EVENTS = 0x2000001aL , WD_INVALID_PARAMETER = 0x2000001bL , WD_INCORRECT_VERSION = 0x2000001cL , WD_TRY_AGAIN = 0x2000001dL ,
  WD_WINDRIVER_NOT_FOUND = 0x2000001eL , WD_INVALID_IOCTL = 0x2000001fL , WD_OPERATION_FAILED = 0x20000020L , WD_INVALID_32BIT_APP = 0x20000021L ,
  WD_TOO_MANY_HANDLES = 0x20000022L , WD_NO_DEVICE_OBJECT = 0x20000023L , WD_MORE_PROCESSING_REQUIRED = (int)0xC0000016L , WD_USBD_STATUS_SUCCESS = 0x00000000L ,
  WD_USBD_STATUS_PENDING = 0x40000000L , WD_USBD_STATUS_ERROR = (int)0x80000000L , WD_USBD_STATUS_HALTED = (int)0xC0000000L , WD_USBD_STATUS_CRC = (int)0xC0000001L ,
  WD_USBD_STATUS_BTSTUFF = (int)0xC0000002L , WD_USBD_STATUS_DATA_TOGGLE_MISMATCH = (int)0xC0000003L , WD_USBD_STATUS_STALL_PID = (int)0xC0000004L , WD_USBD_STATUS_DEV_NOT_RESPONDING = (int)0xC0000005L ,
  WD_USBD_STATUS_PID_CHECK_FAILURE = (int)0xC0000006L , WD_USBD_STATUS_UNEXPECTED_PID = (int)0xC0000007L , WD_USBD_STATUS_DATA_OVERRUN = (int)0xC0000008L , WD_USBD_STATUS_DATA_UNDERRUN = (int)0xC0000009L ,
  WD_USBD_STATUS_RESERVED1 = (int)0xC000000AL , WD_USBD_STATUS_RESERVED2 = (int)0xC000000BL , WD_USBD_STATUS_BUFFER_OVERRUN = (int)0xC000000CL , WD_USBD_STATUS_BUFFER_UNDERRUN = (int)0xC000000DL ,
  WD_USBD_STATUS_NOT_ACCESSED = (int)0xC000000FL , WD_USBD_STATUS_FIFO = (int)0xC0000010L , WD_USBD_STATUS_XACT_ERROR = (int)0xC0000011L , WD_USBD_STATUS_BABBLE_DETECTED = (int)0xC0000012L ,
  WD_USBD_STATUS_DATA_BUFFER_ERROR = (int)0xC0000013L , WD_USBD_STATUS_CANCELED = (int)0xC0010000L , WD_USBD_STATUS_ENDPOINT_HALTED = (int)0xC0000030L , WD_USBD_STATUS_NO_MEMORY = (int)0x80000100L ,
  WD_USBD_STATUS_INVALID_URB_FUNCTION = (int)0x80000200L , WD_USBD_STATUS_INVALID_PARAMETER = (int)0x80000300L , WD_USBD_STATUS_ERROR_BUSY = (int)0x80000400L , WD_USBD_STATUS_REQUEST_FAILED = (int)0x80000500L ,
  WD_USBD_STATUS_INVALID_PIPE_HANDLE = (int)0x80000600L , WD_USBD_STATUS_NO_BANDWIDTH = (int)0x80000700L , WD_USBD_STATUS_INTERNAL_HC_ERROR = (int)0x80000800L , WD_USBD_STATUS_ERROR_SHORT_TRANSFER = (int)0x80000900L ,
  WD_USBD_STATUS_BAD_START_FRAME = (int)0xC0000A00L , WD_USBD_STATUS_ISOCH_REQUEST_FAILED = (int)0xC0000B00L , WD_USBD_STATUS_FRAME_CONTROL_OWNED = (int)0xC0000C00L , WD_USBD_STATUS_FRAME_CONTROL_NOT_OWNED = (int)0xC0000D00L ,
  WD_USBD_STATUS_NOT_SUPPORTED = (int)0xC0000E00L , WD_USBD_STATUS_INAVLID_CONFIGURATION_DESCRIPTOR = (int)0xC0000F00L , WD_USBD_STATUS_INSUFFICIENT_RESOURCES = (int)0xC0001000L , WD_USBD_STATUS_SET_CONFIG_FAILED = (int)0xC0002000L ,
  WD_USBD_STATUS_BUFFER_TOO_SMALL = (int)0xC0003000L , WD_USBD_STATUS_INTERFACE_NOT_FOUND = (int)0xC0004000L , WD_USBD_STATUS_INAVLID_PIPE_FLAGS = (int)0xC0005000L , WD_USBD_STATUS_TIMEOUT = (int)0xC0006000L ,
  WD_USBD_STATUS_DEVICE_GONE = (int)0xC0007000L , WD_USBD_STATUS_STATUS_NOT_MAPPED = (int)0xC0008000L , WD_USBD_STATUS_ISO_NOT_ACCESSED_BY_HW = (int)0xC0020000L , WD_USBD_STATUS_ISO_TD_ERROR = (int)0xC0030000L ,
  WD_USBD_STATUS_ISO_NA_LATE_USBPORT = (int)0xC0040000L , WD_USBD_STATUS_ISO_NOT_ACCESSED_LATE = (int)0xC0050000L
}
 
enum  WD_EVENT_ACTION {
  WD_INSERT = 0x1 , WD_REMOVE = 0x2 , WD_OBSOLETE = 0x8 , WD_POWER_CHANGED_D0 = 0x10 ,
  WD_POWER_CHANGED_D1 = 0x20 , WD_POWER_CHANGED_D2 = 0x40 , WD_POWER_CHANGED_D3 = 0x80 , WD_POWER_SYSTEM_WORKING = 0x100 ,
  WD_POWER_SYSTEM_SLEEPING1 = 0x200 , WD_POWER_SYSTEM_SLEEPING2 = 0x400 , WD_POWER_SYSTEM_SLEEPING3 = 0x800 , WD_POWER_SYSTEM_HIBERNATE = 0x1000 ,
  WD_POWER_SYSTEM_SHUTDOWN = 0x2000 , WD_IPC_UNICAST_MSG = 0x4000 , WD_IPC_MULTICAST_MSG = 0x8000
}
 
enum  WD_EVENT_OPTION { WD_ACKNOWLEDGE = 0x1 , WD_ACCEPT_CONTROL = 0x2 }
 
enum  { WD_EVENT_TYPE_UNKNOWN = 0 , WD_EVENT_TYPE_PCI = 1 , WD_EVENT_TYPE_USB = 3 , WD_EVENT_TYPE_IPC = 4 }
 
enum  { WD_USB_HARD_RESET = 1 , WD_USB_CYCLE_PORT = 2 }
 

Functions

const char *DLLCALLCONV WD_DriverName (const char *sName)
 Sets the name of the WinDriver kernel module, which will be used by the calling application.
 
WD_OS_INFO DLLCALLCONV get_os_type (void)
 Retrieves the type of the operating system in section.
 
DWORD DLLCALLCONV check_secureBoot_enabled (void)
 Checks whether the Secure Boot feature is enabled on the system.