Creating Delphi ActiveX Controls / DLL's

I am new to delphi programming, and am desperatly struggling to create
either an ActiveX or DLL for use in a Visual basic project. Please send
e-mail to SFGi...@iafrica.com or reply to this mail. Thank-you.

I need to use VB to access paradox files, and have found that the options
available to me in Visual Basic result in very slow file access. I decided
to write a DLL or a non-visual (ie: Visual at design time only) activeX
control in Delphi to handle the paradox file access for me using VB, since
delphi and paradox work together like lightening.

I have tried various methods, and cannot get any of them to work:

1. Creating a DLL.

This is the code I have successfully compiled, however when I try to
register it I get the error: "PLib1.dll was loaded, but the
DllRegisterServer entry point was not found. DllRegisterServer may not be
exported, or a corrupt version of PLib1.DLL may be in memory...". It is not
in memory - I checked, and I fear there may be something missing from my
code that is causing the problem. I cannot add the reference to my VB
project:

library PLib1;

uses
  Sharemem,
  SysUtils,
  Classes, DBTables;

type
  TPDXTbl = class(TTable)
  public
    function  PX_OpenTable(Path : String; FileName1 : String) : boolean;
stdcall;
    procedure PX_CloseTable; stdcall;
    procedure PX_MoveFirst; stdcall;
    procedure PX_MoveNext; stdcall;
    procedure PX_MovePrev; stdcall;
    procedure PX_MoveLast; stdcall;
    function  PX_Field(FldName: String):String; stdcall;
  end;

function TPDXTbl.PX_OpenTable(Path : String; FileName1 : String) : boolean;
stdcall;
begin
  try
    DatabaseName := Path;
    tablename :=   FileName1;
    Active := true;
    result := true;
  except
    result := false;
  end;

end;

procedure TPDXTbl.PX_CloseTable; stdcall;
begin
  Active := false;
end;

procedure TPDXTbl.PX_MoveFirst; stdcall;
begin
  First;
end;

procedure TPDXTbl.PX_MoveNext; stdcall;
begin
  Next;
end;

procedure TPDXTbl.PX_MovePrev; stdcall;
begin
  Prior;
end;

procedure TPDXTbl.PX_MoveLast; stdcall;
begin
  Last;
end;

function TPDXTbl.PX_Field(FldName: String):String; stdcall;
begin
  Result := fields[1].AsString;
end;

end.

2. Creating an ActiveX.

I compiled the component below, and added it to a package, tested it in a
little delphi app and all was well. When I tried to create an activeX
control using this component, the VCL Class Name did not list my new
component, and from what I understand it is because TTable is a non-visual
component. How can I get the code below into an activeX control?

unit PDXConnect;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
  Dialogs, DBTables, DB;

type
  TPDXTbl = class(TTable)
  public
    function OpenTable(Path : String; FileName1 : String) : boolean;
    procedure CloseTable;
    procedure MoveFirst;
    procedure MoveNext;
    procedure MovePrev;
    procedure MoveLast;
    function Field(FldName: String):String;
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TPDXTbl]);
end;

function TPDXTbl.OpenTable(Path : String; FileName1 : String) : boolean;
begin
  try
    DatabaseName := Path;
    tablename :=   FileName1;
    Active := true;
    result := true;
  except
    result := false;
  end;

end;

procedure TPDXTbl.CloseTable;
begin
  Active := false;
end;

procedure TPDXTbl.MoveFirst;
begin
  First;
end;

procedure TPDXTbl.MoveNext;
begin
  Next;
end;

procedure TPDXTbl.MovePrev;
begin
  Prior;
end;

procedure TPDXTbl.MoveLast;
begin
  Last;
end;

function TPDXTbl.Field(FldName: String):String;
begin
  Result := fields[1].AsString;
end;

end.

Any suggestions would be greatly appreciated.

Regards,

Felicity