I/O ActiveX Control in Delphi

Note: Windows XP Environment.  Apply ActiveX upgrade/fix to Delphi 6.

 
What is needed to use the IO.OCX within a delphi DLL:


**************************
implementation

uses IOLib_TLB, ActiveX, ComObj;    //Prototype for IO.ocx and all the COM/ActiveX functions

Procedure Init();
Begin
    OleCheck(CoInitializeEx(NIL, 2));  //Initialize COM library (Automatically done in an EXE)
    Application.CreateForm(TForm1, Form1);
End;

Procedure Finish();
Begin
    Form1.Free;
    CoUninitialize();
End;
**************************

NOTE: In a multithread app use CoInitialize(NIL, 0) instead of CoInitialize(NIL, 2).  Not doing this will cause a GPF in kernel32.dll
 

Home Page | Site Map | Copyright (c) 2002 by JSPayne of Cortland NY