USB Monitoring Control - ActiveX Component Library for USB Data Monitoring, API for Software Developers
Download USB Monitoring Control Hide this button

How to Initialize the USBMC Library

This section describes the steps you need to carry in order to successfully initialize the USBMC library.

Native Environment

  1. Include the hhdusbmc.h file in one of your source files:

    #include <hhdusbmc.h>
    
  2. Declare the pointer to the IUsbMonitor interface.

    CComPtr<IUsbMonitor> pUsbMonitor;
    
  3. 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.

  4. Link to hhdusbmc.lib library to eliminate unresolved externals for library GUIDs.

Managed Environment

Use your language-provided tools to add the reference to the USB Monitoring Control library into your project.