Skip to main content

Examples

Runnable code examples for using RIK across all supported languages.

By Topic

PageDescription
Basic UsageConnect, read metadata, beep, close (C++, C#, Python)
Configuration & FeaturesBeeper, LED, LUID, keystroking, transparent mode, card types, BLE, reset
Credential CallbacksEvent-driven card detection: single, multiple, multi-reader, dynamic subscribe/unsubscribe
Multi-ReaderManaging multiple readers simultaneously
Discovering USB PathsFind topological USB paths for port-specific connections
C APIC-compatible interface with RikResult error handling

Common Pattern

All languages follow the same lifecycle:

  1. Define Reader -- Specify VID/PID or serial port
  2. Create Instance -- Get application handle
  3. Initialize -- Connect to reader
  4. Use API -- Perform operations
  5. Clean Up -- Close and destroy

Quick Comparison

FeatureC++C APIC#Python
Instance CreationCreateReaderInstance()RikReader_Open()new Reader()Reader()
CleanupDestroyInstance()Rik_Close()Dispose() / usingdel / with
Error HandlingExceptionsRikResult structExceptionsExceptions
Thread SafetyAutomaticAutomaticAutomaticAutomatic