Download Winsoft Native HID for FireMonkey v1.6 Full Source for Delphi/C++ Builder XE2 - 11

Winsoft Native HID for FireMonkey v1.6 Full Source for Delphi/C++ Builder XE2 - 11

Winsoft Native HID for FireMonkey v1.6 Full Source for Delphi/C++ Builder XE2 - 11
Winsoft Native HID for FireMonkey v1.6 Full Source for Delphi/C++ Builder XE2 - 11


Delphi and C++ Builder library for communicating with Human Interface Devices.

Features

Uses Windows HID API
Supports Windows 32 and Windows 64
Available for Delphi/C++ Builder XE2 - 11
Source code included in registered version
Royalty free distribution in applications

type
EFHidError = class(Exception);

TFHidDataReceivedEvent = procedure(Sender: TObject; const dаta: TByteDynArray) of object;

TFHidDeviceArrivalEvent = procedure(Sender: TObject; const DeviceName: string) of object;
TFHidDeviceRemovedEvent = procedure(Sender: TObject; const DeviceName: string) of object;

TFHidDevice = class
constructor Create;

function Enumerate: TStringDynArray;
procedure Open(const DeviceName: string; Read, Write: Boolean);
procedure Close;
procedure FlushInputQueue;

// Size has to be InputReportLength; Timeout in milliseconds
procedure Read(dаta: PByte; Size: Integer; Timeout: Integer = 0);
function Read(Timeout: Integer = 0): TByteDynArray;

// Size has to be InputReportLength; Timeout in milliseconds; returns False/nil on timeout
function TryRead(dаta: PByte; Size: Integer; Timeout: Integer = 0): Boolean;
function TryRead(Timeout: Integer = 0): TByteDynArray;

// First byte is report ID; Size has to be OutputReportLength; Timeout in milliseconds
procedure Write(dаta: PByte; Size: Integer; Timeout: Integer = 0);
procedure Write(ReportID: Byte; dаta: TByteDynArray; Timeout: Integer = 0);

// First byte is report ID; Size has to be OutputReportLength; Timeout in milliseconds; returns False on timeout
function TryWrite(dаta: PByte; Size: Integer; Timeout: Integer = 0): Boolean;
function TryWrite(ReportID: Byte; dаta: TByteDynArray; Timeout: Integer = 0): Boolean;

// First byte is report ID; Size has to be InputReportLength
procedure GetInputReport(dаta: PByte; Size: Integer);
function GetInputReport(ReportID: Byte): TByteDynArray;

// First byte is report ID; Size has to be OutputReportLength
procedure SetOutputReport(dаta: PByte; Size: Integer);
procedure SetOutputReport(ReportID: Byte; dаta: TByteDynArray);

// First byte is report ID; Size has to be FeatureReportLength
procedure GetFeatureReport(dаta: PByte; Size: Integer);
function GetFeatureReport(ReportID: Byte): TByteDynArray;

// First byte is report ID; Size has to be FeatureReportLength
procedure SetFeatureReport(dаta: PByte; Size: Integer);
procedure SetFeatureReport(ReportID: Byte; dаta: TByteDynArray);

procedure GetPhysicalDescriptor(dаta: PByte; Size: Integer);

property Active: Boolean read;
property DeviceName: string read;
property FeatureReportLength: Word read;
property FeatureReportSupported: Boolean read;
property Handle: THandle read;
property InputBufferCount: Integer read write;
property InputReportLength: Word read;
property InputReportSupported: Boolean read;
property Manufacturer: string read;
property OutputReportLength: Word read;
property OutputReportSupported: Boolean read;
property PollingInterval: Integer read write default 100; // in milliseconds
property Product: string read;
property ProductID: Word read;
property ReadSupported: Boolean read;
property SerialNumber: string read;
property Strings[Index: Integer]: string read;
property HasString[Index: Integer]: Boolean read;
property Usage: Word read;
property UsagePage: Word read;
property VendorID: Word read;
property VersionNumber: Word read;
property WriteSupported: Boolean read;
property OnDataReceived: TFHidDataReceivedEvent read write;
property OnDeviceArrival: TFHidDeviceArrivalEvent read write;
property OnDeviceRemoved: TFHidDeviceRemovedEvent read write;
end;


What's new

Version 1.6
added Delphi/C++ Builder 11 files


Only for V.I.P
Warning! You are not allowed to view this text.
  • 29