Installation

 

Registration with regsvr32

Registration from code

Borlan C++Builder installation

Borland Delphi 7 installation

Code Gear Delphi 2007 installation

Visual Basic 6.0 installation

Visual Basic 2005 .NET installation

Visual C++/ C# 2005 .NET installation

 

 

Copy the file:

 

bundleoptimal1dx.dll

 

in the System (or System32 directory) or in the current directory of your application.

 

//---------------------------------------------------------------------------------------------------------------

Registration with regsvr32

 

Since you are dealing with Automation Component you must register it within your system using the command:

 

regsvr32.exe bundleoptimal1dx.dll

 

A message should appear telling you that the registration has succeeded.

 

Note for Windows Win 64bit users: There are 2 regsvr32 applications. One of them is located in System32 folder and the other one is located in SysWow64. Try with the one located in SysWow64 folder.

 

//---------------------------------------------------------------------------------------------------------------

 

Note for Windows Vista / 7 users: On some builds of Windows Vista the registration fails. Sometimes the message "The module <<bundleoptimal1dx.dll>> was loaded but the the call to DllRegisterServer failed with error code 0x8002801c" is displayed. The reason for this message is that some parts of the registry cannot be accessed.

 

In some other cases the successful registration message is displayed ... but no registration is actually performed.

 

To fix these problems you must run the regsvr32.exe application as an Administrator. You MUST do that even if you are already logged in as Administrator. To do that please follow the steps:

 

- create a desktop shortcut to application cmd.exe (found in the System32 directory).

- right-click the shortcut and choose Run As Administrator.

- change the path to the location where the bundleoptimal1dx.dll is placed.

- write regsvr32 bundleoptimal1dx.dll

 

If you are not able to Run the Cmd As Administrator you may also create a .bat file containing the command "regsvr32 bundleoptimal1dx.dll" and then run that file As Administrator.

 

//-------------------------------------------------------------------------------------------------------------------------------------

Registration from code

 

You may also register the component from code. This is useful when you want to distribute the application to your customers.

 

Here is a C++ code which does the registration from within code:

 

char buffer[4096];
buffer[0] = 0;
GetModuleFileName(NULL, buffer, 4096);

HMODULE hDLL;

 

hDLL = LoadLibrary("bundleoptimal1dx.dll"); // make sure that the path is full !!!
if (hDLL != NULL){
  typedef HRESULT (CALLBACK *HCRET)(void);
  HCRET lpfnDllRegisterServer;
  lpfnDllRegisterServer = (HCRET)GetProcAddress(hDLL, "DllRegisterServer");

  if (lpfnDllRegisterServer == NULL)
    ; // the com sever might be corrupt

  (*lpfnDllRegisterServer)(); // cal the registration function
  FreeLibrary(hDLL);
}
else
 ; // the dll was not found

 

//---------------------------------------------------------------------------------------------------------------

C++Builder 6 installation

 

For using this component within C++Builder environment you must install it first.

 

Choose:

 

Project | Import Type Library

 

From the list box "Import Type Library" choose bundleoptimal1dx library.

You may select the "Palette Page" where this component will be installed. By default is "ActiveX" page.

Press the "Install" button.

 

 

Note:

There are some errors within C++Builder 6 environment which are not corrected by Borland.

Because of that you cannot use the public properties of this object.

You may use instead the methods behind the properties.

See the examples and the help file.

 

//---------------------------------------------------------------------------------------------------------------

 

Delphi 7 installation

 

For using this component within Delphi environment you must install it first.

 

Choose:

 

Project | Import Type Library

 

From the list box "Import Type Library" choose bundleoptimal1dx library.

You may select the "Palette Page" where this component will be installed. By default is "ActiveX" page.

Press the "Install" button.

 

//---------------------------------------------------------------------------------------------------------------

 

Code Gear Delphi 2007 installation

For using the component within Delphi environment you must install them first.

Choose:

Component | Import Component

then

Import Type Library

From the list box "Registered Type Libraries" choose "bundleoptimal1dx" library.

You may select the "Palette Page" where this component will be installed. Use a standard page such as "Additional" since not all pages are displayed in some versions of Delphi.

Next. Finish.

Wait: the component is NOT installed yet in the Component Palette. A unit called bundleoptimal1dx_TLB.pas was created ... please remember its path.

Create a new package from File | New | Others | Package. The package contents will appear in the right part of the screen.

Right click the name of the project (which has bpl extension) and choose Add... and in the "Unit file name" browse to the location of bundleoptimal1dx_TLB.pas (which was previously created). Press OK.

Right click the name of the project (which has bpl extension) and choose Install. A message should confirm the installation.

//---------------------------------------------------------------------------------------------------------------
 

Visual Basic 6.0 installation

 

For using this component within VB 6 environment you must install it first.

 

Choose:

 

Project | References

 

Find and check the bundleoptimal1dx library.

 

//---------------------------------------------------------------------------------------------------------------

 

Visual Basic 2005 .NET installation

 

 

For using this component within VB 2005 environment you must install it first.

 

Choose:

 

Project |  Add References | COM

 

Find and check the bundleoptimal1dx library.

 

Set the Solution platform type to Win32.

 

//---------------------------------------------------------------------------------------------------------------

 

Visual C++ 2005 .NET installation

 

For using this component within VC++ environment you must install it first.

 

Choose:

 

Project | Properties | References | Add New reference | COM

 

Find and check the "bundleoptimal1dx" library.

 

Set the Solution platform type to Win32.

 

//---------------------------------------------------------------------------------------------------------------

 

The same applies to other .NET languages (C#, J#).

 

 

 

Links

        back to index

        www.optimalprograms.com