This section describes the steps you need to carry in order to successfully initialize the USBMC library.
Include the hhdusbmc.h
file in one of your source files:
#include <hhdusbmc.h>
Declare the pointer to the IUsbMonitor interface.
CComPtr<IUsbMonitor> pUsbMonitor;
Create the instance of the UsbMonitor object.
pUsbMonitor.CoCreateInstance(__uuidof(UsbMonitor));
Remember that you cannot create more than one UsbMonitor object in single process. Although, you can have as many Monitor objects as you need.
Link to hhdusbmc.lib
library to eliminate unresolved externals for library GUIDs.
Use your language-provided tools to add the reference to the USB Monitoring Control library into your project.