MBBSEmu.wbtrv32 1.0.5

dotnet add package MBBSEmu.wbtrv32 --version 1.0.5
                    
NuGet\Install-Package MBBSEmu.wbtrv32 -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MBBSEmu.wbtrv32" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MBBSEmu.wbtrv32" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="MBBSEmu.wbtrv32" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MBBSEmu.wbtrv32 --version 1.0.5
                    
#r "nuget: MBBSEmu.wbtrv32, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MBBSEmu.wbtrv32@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MBBSEmu.wbtrv32&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=MBBSEmu.wbtrv32&version=1.0.5
                    
Install as a Cake Tool

WBTRV32.DLL: A Drop-in Replacement for Pervasive Btrieve Using SQLite

Table of Contents

Introduction

WBTRV32.DLL is an open-source, drop-in replacement for the Pervasive Btrieve WBTRV32.DLL library, providing a modern solution for legacy applications that rely on antiquated versions of Btrieve (versions 5 and 6). By emulating the exact DLL signature of the original Btrieve library, this replacement allows existing applications to operate without modification.

Instead of interfacing directly with Btrieve .DAT files, this replacement DLL converts the data to a SQLite backend. This approach offers several advantages:

  • Cross-Platform Compatibility: Run your applications on Windows, Linux, macOS, and other platforms supported by SQLite.
  • Modern Database Support: Benefit from the reliability, performance, and ongoing support of SQLite.
  • Seamless Integration: Replace the original DLL without altering your application's codebase.

Originally developed as part of The Major BBS Emulation Project, this library is now available for any software confined to outdated Btrieve versions, extending the lifespan and usability of legacy applications.

Features

  • Drop-in Replacement: Mimics the original WBTRV32.DLL interface, requiring no changes to application code.
  • Built with Modern C++: Developed entirely in modern C++, leveraging the latest language features for efficiency and maintainability.
  • SQLite Backend: Converts Btrieve .DAT files to a SQLite database, leveraging a modern and widely supported database engine.
  • Comprehensive Unit Tests: Includes unit tests covering many Btrieve data scenarios to ensure reliability and correctness.
  • Cross-Platform Support: Enables applications to run on multiple operating systems including Windows, Linux, and macOS.
  • Supports Btrieve Versions 5 and 6: Ensures compatibility with applications using these legacy versions.
  • Open Source: Encourages community contributions and transparency.
  • Automated Data Conversion: Handles the migration of data from Btrieve to SQLite seamlessly.
  • Logging and Diagnostics: Provides detailed logs to assist with troubleshooting and monitoring.

Getting Started

Prerequisites

  • Operating System:
    • Windows: Windows 7 or later.
    • Linux: Any modern distribution.
    • macOS: Versions supporting your application and SQLite.
  • Development Tools (if building from source):
    • Bazel (via Bazelisk is recommended) drives the build on all platforms.
    • A C++20-capable compiler. Bazel will fetch hermetic toolchains for cross-compilation automatically (see below); a native compiler (GCC/Clang on Linux/macOS, or Visual Studio's MSVC on Windows) is only needed to build for your host platform.
    • Windows builds can alternatively be produced with Visual Studio 2022 or newer via vstudio/vstudio.sln.

Installation

  1. Backup Original DLL:
    • Locate the original WBTRV32.DLL in your application's directory.
    • Create a backup copy to prevent data loss.
  2. Download Replacement DLL:
    • Obtain the pre-built WBTRV32.DLL package (which includes SQLite) from the Releases section.
    • Alternatively, clone the repository and build from source.
  3. Replace DLL:
    • Copy the new WBTRV32.DLL along with with supporting files into your application's directory, replacing the original.
  4. Run Application:
    • Launch your application as usual.
    • The DLL will handle data conversion and operations transparently.

Usage

  • First Run Data Conversion:
    • The DLL automatically converts existing Btrieve .DAT files to a SQLite database on first access.
    • This process is fast and completely transparent.
    • Your original .DAT files are left in place and unmodified.
  • Application Operation:
    • The application should function normally, with database operations redirected to SQLite.
    • No code changes are required in the application.
  • Database Management:
    • Use standard SQLite tools for database maintenance and inspection.
    • Backup the SQLite database regularly to prevent data loss.

Development and Testing

Building from Source

The project is built with Bazel and developed entirely in modern C++ (C++20). SQLite is vendored directly in the sqlite/ directory, so no external SQLite installation is required.

Prerequisites
  • Bazel: Install via Bazelisk, which reads the project's pinned Bazel version automatically.
  • A native C++ compiler is only needed when building for your host platform; cross-compilation targets use Bazel-managed hermetic toolchains (gcc_toolchain for Linux arm32/arm64, hermetic_cc_toolchain (zig-cc) for Windows and macOS) that Bazel downloads on demand.
Build Steps
  1. Clone the Repository:
git clone https://github.com/mbbsemu/wbtrv32.git
cd wbtrv32
  1. Build for your host platform:
bazel build //vstudio/wbtrv32:wbtrv32
The resulting shared library (`wbtrv32.dll`, `wbtrv32.dylib`, or `wbtrv32.so` depending on platform) is written under `bazel-bin/vstudio/wbtrv32/`.
  1. Cross-compile for another platform using one of the configs defined in .bazelrc:
bazel build --config=linux_arm64   //vstudio/wbtrv32:wbtrv32
bazel build --config=linux_arm32   //vstudio/wbtrv32:wbtrv32
bazel build --config=windows_amd64 //vstudio/wbtrv32:wbtrv32
bazel build --config=windows_x86   //vstudio/wbtrv32:wbtrv32
bazel build --config=windows_arm64 //vstudio/wbtrv32:wbtrv32
bazel build --config=macos_amd64   //vstudio/wbtrv32:wbtrv32
bazel build --config=macos_arm64   //vstudio/wbtrv32:wbtrv32
This makes it possible to produce the Windows `WBTRV32.DLL` (and macOS/Linux equivalents) from a single Linux or macOS host without any additional toolchain installation.
  1. Build the NuGet package (bundles every supported runtime into a single package):
bazel build //nuget:package
The `.nupkg` is written to `bazel-bin/nuget/package/`.
  1. Windows via Visual Studio (alternative to Bazel on Windows):
    • Open vstudio/vstudio.sln in Visual Studio 2022 or newer and build the wbtrv32 project. This is the same solution used by the project's CI.

Unit Tests

Comprehensive unit tests are included to verify functionality across various Btrieve data scenarios.

Running Tests

Run the full test suite with Bazel:

bazel test //...

Or target a specific test suite, e.g.:

bazel test //vstudio/wbtrv32:tests
bazel test //btrieve:tests

Test data files (sample .DAT/.DB Btrieve databases) are provided in assets/ and are pulled in automatically as test data by Bazel.

Continuous Integration: GitHub Actions builds and runs the test suite on Windows via MSBuild/vstudio.sln on every push and pull request to main (see .github/workflows/msbuild.yml).

Supported Versions

  • Btrieve Version 5: Full support for data files and operations.
  • Btrieve Version 6: Full support for data files and operations.

Compatibility

  • API Coverage:
    • Implements core Btrieve API functions used by most applications.
    • Aims for behavioral parity with the original DLL.

Contributing

We welcome contributions to enhance this project:

  • Reporting Issues:
    • Use the Issues tab to report bugs or request features.
    • Provide detailed descriptions and steps to reproduce issues.
  • Submitting Pull Requests:
    • Fork the repository.
    • Create a feature branch (git checkout -b feature/YourFeature).
    • Commit your changes with clear messages.
    • Ensure that all unit tests pass and include new tests if applicable.
    • Push to your fork and submit a pull request.
  • Community Engagement:
    • Join the discussion on our Discord!
    • Share insights and usage experiences.

License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software under the terms of the license.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 0 10/9/2026
1.0.4 133 9/15/2026
1.0.3 128 9/8/2026
1.0.2 116 9/7/2026
1.0.1 208 8/22/2026
1.0.0 116 8/22/2026