vtdapi.h
来自「用于查询PC机上的USB端口是否有设备挂接上」· C头文件 代码 · 共 163 行
H
163 行
/*****************************************************************************
//;
// VTDAPI.INC
//;
// VTDAPI service equates and structures
//;
*****************************************************************************/
#define MULTIMEDIA_OEM_ID 0x0440 // MS Reserved OEM # 34
#define VTDAPI_DEVICE_ID MULTIMEDIA_OEM_ID + 2 // VTD API Device
/* VTDAPI_Get_Version
//;
// ENTRY:
// AX = 0
// ES:BX = pointer to VTDAPI_Get_Version_Parameters structure
//
// RETURNS:
// SUCCESS: AX == TRUE
// ERROR: AX == FALSE
*/
#define VTDAPI_Get_Version 0
/* VTDAPI_Begin_Min_Int_Period
//;
// ENTRY:
// AX = 1
// CX = interrupt period in ms
//
// RETURNS:
// SUCCESS: AX != 0
// ERROR: AX == 0
*/
#define VTDAPI_Begin_Min_Int_Period 1
/* VTDAPI_End_Min_Int_Period
//;
// ENTRY:
// AX = 2
// ES:BX = pointer to word interrupt period in ms
//;
// RETURNS:
// SUCCESS: AX == TIMERR_NOERROR
// ERROR: AX == TIMERR_NOCANDO
*/
#define VTDAPI_End_Min_Int_Period 2
/* VTDAPI_Get_Int_Period
//;
// ENTRY:
// AX = 3
//;
// RETURNS:
// DX:AX = current period (resolution) in ms
*/
#define VTDAPI_Get_Int_Period 3
/* VTDAPI_Get_Sys_Time
//;
// ENTRY:
// AX = 4
//;
// RETURNS:
// DX:AX = current time in ms
*/
#define VTDAPI_Get_Sys_Time 4
/* VTDAPI_Timer_Start
//;
// ENTRY:
// AX = 5
// ES:BX = pointer to VTDAPI_Timer_Parameters structure
//;
// RETURNS:
// SUCCESS: AX != 0, 16 bit timer handle
// ERROR: AX == 0
*/
#define VTDAPI_Timer_Start 5
/* VTDAPI_Timer_Stop
//;
// ENTRY:
// AX = 6
// CX = 16 bit timer handle from VTDAPI_Timer_Start
//;
// RETURNS:
// SUCCESS: AX == TIMERR_NOERROR
// ERROR: AX == TIMERR_NOCANDO, invalid timer handle
*/
#define VTDAPI_Timer_Stop 6
/* VTDAPI_Start_User_Timer
//;
// ENTRY:
// AX = 7
// ES:BX = pointer to VTDAPI_Timer_Parameters structure
//;
// RETURNS:
// SUCCESS: EAX != 0, 32 bit timer handle
// ERROR: EAX == 0
*/
#define VTDAPI_Start_User_Timer 7
/* VTDAPI_Stop_User_Timer
//;
// ENTRY:
// AX = 8
// ES:BX = pointer to 32 bit timer handle from VTDAPI_Start_User_Timer
//;
// RETURNS:
// SUCCESS: AX == 0
// ERROR: AX != 0
*/
#define VTDAPI_Stop_User_Timer 8
/* VTDAPI_Get_System_Time_Selector
//;
// ENTRY:
// AX = 9
//;
// RETURNS:
// SUCCESS: AX = R/O selector to a dword of running ms
// ERROR: AX == 0
*/
#define VTDAPI_Get_System_Time_Selector 9
/* VTDAPI_Cleanup_Timers
//;
// ENTRY:
// AX = 10
// CX = CS selector
//;
// RETURNS:
// NONE
*/
#define VTDAPI_Cleanup_Timers 10
typedef struct VTDAPI_Get_Version_Parameters {
DWORD VTDAPI_Version;
DWORD VTDAPI_Min_Period;
DWORD VTDAPI_Max_Period;
} VTDAPI_Get_Version_Parameters;
typedef struct VTDAPI_Timer_Parameters {
WORD VTDAPI_Timer_Period;
WORD VTDAPI_Timer_Resolution;
DWORD VTDAPI_Timer_IPCS;
DWORD VTDAPI_Timer_Inst;
WORD VTDAPI_Timer_Flags;
} VTDAPI_Timer_Parameters;
#ifndef TIME_ONESHOT
#define TIME_ONESHOT 0x0000 // program timer for single event
#define TIME_PERIODIC 0x0001 // program for continuous periodic event
#endif
#ifndef TIMERR_BASE
#define TIMERR_BASE 96
#define TIMERR_NOERROR 0 // no error
#define TIMERR_NOCANDO (TIMERR_BASE+1) // the operation wasn't executed
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?