EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CBFS Create Storage Problem

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
Posted: 01/04/2013 15:57:31
by Aether Works (Standard support level)
Joined: 06/01/2012
Posts: 11

When running Main.java (in Eclipse as administrator) from the sample code provided in "C:\Program Files (x86)\EldoS\Callback File System\Samples\Java\VDisk\src" the following output occurs:

eldos.cbfs.ECBFSError: The specified terminal connection driver is invalid.

   at eldos.cbfs.CallbackFileSystem.CreateStorage(Native Method)
   at eldos.cbfs.CallbackFileSystem.createStorage(CallbackFileSystem.java:377)
   at Main.main(Main.java:25)
driver version 65536:1 is installed
driver status: 4
Exception in thread "main" eldos.cbfs.ECBFSError: The system cannot find the file specified.

   at eldos.cbfs.CallbackFileSystem.UnmountMedia(Native Method)
   at eldos.cbfs.CallbackFileSystem.unmountMedia(CallbackFileSystem.java:547)
   at Main.main(Main.java:51)

The error occurs during createStorage().

For quick reference, this is the source for Main.java:

import eldos.cbfs.*;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    private static final String DEFAULT_REGISTRATION_KEY = "[our_actual_key_here]";
    private static final String DEFAULT_MOUNT_POINT = "K:";
    private static final String PRODUCT_NAME = "test-name";
    public static void main(String[] args) throws Exception {
        CallbackFileSystem cbfs = null;
        try {

            cbfs = new CallbackFileSystem(new Handler());

            System.out.println("type exit and hit enter key to complete execution");
            BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            while (true) {
                System.out.print("> ");
                try {
                } catch (InterruptedException ignored) {


                String line = input.readLine();
                if (line == null) continue;
                if ("exit".equals(line)) break;

        } catch (Exception ex) {
        } finally {
            if (cbfs != null) {
                while (cbfs.getMountingPointCount() != 0) {

     * You don't have to install it each time you start your application.
     * If the driver is not installed correctly, you will get error 2
     * ("file not found") which means that the driver could not be found or loaded.
     * -------------------------------------------
   public static void install() {
      CallbackFileSystem cbfs = new CallbackFileSystem(new Handler());
      boolean supportPnP = false;
      int modulesToInstall = CallbackFileSystem.CBFS_MODULE_MOUNT_NOTIFIER_DLL | CallbackFileSystem.CBFS_MODULE_NET_REDIRECTOR_DLL;
      boolRef rebootNeeded = new boolRef();
      try {
         String CabFileName = "path to cab file here...";
         cbfs.install(CabFileName, PRODUCT_NAME, "system path...", supportPnP, false, modulesToInstall, rebootNeeded);
      } catch (ECBFSError e) {
   public void uninstall() {
      boolRef rebootNeeded = new boolRef();
      try {
         CallbackFileSystem cbfs = new CallbackFileSystem(new Handler());
         String CabFileName = "path to cab file here...";
         String InstalledPath = "installed path here...";
         cbfs.uninstall(CabFileName, PRODUCT_NAME, InstalledPath, rebootNeeded);
      } catch (ECBFSError e) {

    private static void check() {
        CallbackFileSystem cbfs = new CallbackFileSystem();

        boolRef installed = new boolRef();
        longRef highVersion = new longRef();
        longRef lowVersion = new longRef();
        ServiceStatus status = new ServiceStatus();
        try {
            cbfs.getModuleStatus(PRODUCT_NAME, CallbackFileSystem.CBFS_MODULE_DRIVER, installed, highVersion, lowVersion, status);
            if (!installed.getValue()) {
                System.out.println("driver is not installed");
            } else {
                System.out.println("driver version " + highVersion.getValue() + ":" + lowVersion.getValue() + " is installed");
                System.out.println("driver status: " + status.CurrentState);
        } catch (ECBFSError ecbfsError) {
            System.out.println("failed to check module status");
   private static void process(String line) {
        if ("handles".equals(line)) {
        if ("check".equals(line)) {
        System.out.println("unknown cmd: '" + line + "'");

Please note that we have already run the code to install CBFS (using the same product name as the one found in the above code), and the installation reported as successful. Thanks.
Posted: 01/04/2013 18:01:07
by Vladimir Cherniga (EldoS Corp.)

This error code indicates that specified license key wasn't use with a proper product. For example, cbfs3 and cbfs4 keys are not compatible.
Posted: 01/05/2013 00:49:36
by Eugene Mayevski (EldoS Corp.)

Callback File System 4 has lots of changes comparing to version 3. This is not a direct replacement, and two versions will co-exist on one computer. Please read release notes before doing anything further or asking about other issues - there's a 95-97% chance that the issue is caused by not reading release notes.

Sincerely yours
Eugene Mayevski



Topic viewed 1823 times

Number of guests: 2, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!