libusbK 
3.0
Library Documentation
© 2011-2021 Travis Lee Robinson. All rights reserved.
Hotplug Event Notifier

Module for USB device notification. More...

Data Structures

struct  KHOT_PARAMS
 Hot plug parameter structure. More...
 

Typedefs

typedef VOID KUSB_API KHOT_PLUG_CB (_in KHOT_HANDLE HotHandle, _in KLST_DEVINFO_HANDLE DeviceInfo, _in KLST_SYNC_FLAG PlugType)
 Hot plug event function definition.
 
typedef VOID KUSB_API KHOT_POWER_BROADCAST_CB (_in KHOT_HANDLE HotHandle, _in KLST_DEVINFO_HANDLE DeviceInfo, _in UINT PbtEvent)
 Power broadcast event function definition.
 
typedef KHOT_PARAMSPKHOT_PARAMS
 Pointer to a KHOT_PARAMS structure.
 

Enumerations

enum  KHOT_FLAG {
  KHOT_FLAG_NONE,
  KHOT_FLAG_PLUG_ALL_ON_INIT = 0x0001,
  KHOT_FLAG_PASS_DUPE_INSTANCE = 0x0002,
  KHOT_FLAG_POST_USER_MESSAGE = 0x0004
}
 Hot plug config flags. More...
 

Functions

KUSB_EXP BOOL KUSB_API HotK_Init (_out KHOT_HANDLE *Handle, _ref PKHOT_PARAMS InitParams)
 Creates a new hot-plug handle for USB device arrival/removal event monitoring. More...
 
KUSB_EXP BOOL KUSB_API HotK_Free (_in KHOT_HANDLE Handle)
 Frees the specified hot-plug handle. More...
 
KUSB_EXP VOID KUSB_API HotK_FreeAll (VOID)
 Frees all hot-plug handles initialized with HotK_Init.
 

Detailed Description

Module for USB device notification.

Enumeration Type Documentation

enum KHOT_FLAG

Hot plug config flags.

Enumerator
KHOT_FLAG_NONE 

No flags (or 0)

KHOT_FLAG_PLUG_ALL_ON_INIT 

Notify all devices which match upon a succuessful call to HotK_Init.

KHOT_FLAG_PASS_DUPE_INSTANCE 

Allow other KHOT_HANDLE instances to consume this match.

KHOT_FLAG_POST_USER_MESSAGE 

If a UserHwnd is specified, use PostMessage instead of SendMessage.

Function Documentation

KUSB_EXP BOOL KUSB_API HotK_Init ( _out KHOT_HANDLE Handle,
_ref PKHOT_PARAMS  InitParams 
)

Creates a new hot-plug handle for USB device arrival/removal event monitoring.

Parameters
[out]HandleReference to a handle pointer that will receive the initialized hot-plug handle.
[in,out]InitParamsHot plug handle initialization structure.
Returns
On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information.
Examples:
hot-plug-monitor.c.
KUSB_EXP BOOL KUSB_API HotK_Free ( _in KHOT_HANDLE  Handle)

Frees the specified hot-plug handle.

Parameters
[in]Handlehot-plug handle pointer to free.
Returns
On success, TRUE. Otherwise FALSE. Use GetLastError() to get extended error information.
Examples:
hot-plug-monitor.c.