Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Installation

Installing the new SRP OLE ActiveX Controls .

Files

The entire SRP OLE Control suite consists of several OCX files and one DLL file:

Image Removed
You may have more or less OCX files than is shown here. It depends on which controls your application is using. All controls are maintained within their own OCX file except for the following:

Image Removed
These controls are bundled into the SRPCore.ocx file since they are sold together.

Installing

In many cases, the SRP OLE Controls are installed automatically when you install any of the SRP Utilities available on our website. However, you'll need to be familiar with how the controls are installed, especially when you ship them with your own application.

is a two step process. It's important to know these steps as you will have to repeat (or automate) them when you distribute your application.

  1. Copy SRPControls.ocx onto your local machine
  2. Register it.

Copying

The first step is to copy the OCX files SRPControls.ocx onto the target machine. You can place these files it anywhere you wish, but the wisest location would be your application folder. As an alternative, you can place them in the Windows System32 folder, if you want them located in a place that's accessible by any user. The choice is yours.we recommend placing it in a dedicated folder (such as "SRP") or in Revelation's client folder (typically C:\Revsoft\OIClient). It's okay to place it inside the OI root folder only if the application is not used by more than one user at a time. Avoid placing the OCX into a shared folder as doing so makes it difficult to update due to shared locking. Since you have to register the OCX on individual machines anyway, you might as well copy it locally. This will increase performance and decrease locking issues.

Registration

In order for your application to utilize the OCX files during runtimeour controls, Windows needs to know where to find the OCX filesSRPControls.ocx. This is done throught through registration. When you register an OCX file, entries are placed in the registry detailing the OCX file's location, the types of controls within the OCX, and more. This information allows your application, as well as any other applications, to quickly gain access to the SRP OLE ActiveX Controls.

To register an OCX file, simply run the following command from a DOS prompt or from the Run window:

...

The regsvr32 command is built into Windows. It's sole purpose is to register and unregister self-registering DLLs. OCX files are considered self-registering DLLs, even though their extensions are different. Here's an example on how to register the SRP Core Controls form an OpenInsight directoryTo register:

Code Block
regsvr32 "C:\Revsoft\OinsightOICLient\SRPCoreSRPControls.ocx

If you have more than one OCX file, you must call regsvr32 for each one.

The Shared DLL

Along with your OCX files, there is one DLL file called SRPShared.dll. This DLL file contains the program logic that is common, or shared, between all OCX files. This helps reduce the overall size of all the SRP OLE Controls by eliminate redundant code. This also has the advantage of modularizing future updates.

In order for the OCX files to register, unregister, and execute, they must be able to see the DLL file. With OCX files, Windows used the registry. But the SRPShared.dll is not a self registering file. So, Windows must use a different technique to find it. Windows finds DLLs by looking in the following locations in the following top-down order:

  • The directory from which the application loaded
  • The current directory
  • The Windows System32 directory
  • The Windows System directory
  • The Windows directory
  • The directories that are listed in the PATH environment variable

So when it comes to installing the SRP OLE Controls, your safest bet is to place all the OCX files and the DLL file into either the application folder or the System32 directory. If you place them anywhere else, then you need to add that path to your machine's PATH environment variable.

"

64-Bit

Registering the 64-bit version of our controls uses the same command line. RegSvr32 is clever enough to register either 32-bit or 64-bit. Since our 64-bit version has a different file name (SRPControls64.ocx), you can register both to the same machine without conflict.64-BitThe same goes for running regsvr32. If you try to run regsvr32 from a directory other than the one containing your OCX and DLL files, then it will return with an error.

Updating

We update our controls on a frequent basis to ensure you always have the most complete and robust controls available. To update your OCX filescontrols, simply replace them SRPControls.ocx with the new OCX files. Then, register the new OCX files as if they were newly installedfile and register it. In many cases, failing to re-register the new OCX files may not cause you any harm. But if the new OCX file has new properties, methods, or events, you may find that those new elements are inaccessible. To be safe, always register a new OCX files. You do not need to un-register unregister the old OCX files before registering the new onesone.

Uninstalling

To uninstall the SRP OLE ActiveX Controls, you first need to unregister each OCX fileSRPControls.ocx. You can use the regsvr32 command. The syntax for unregistering your files is:

Code Block
regsvr32 -u <ocxfile>

Upgrading from SRP.OCX

Upgrading from SRP.OCX to the new SRP OLE Controls.

If you've been using the SRP.OCX (SRP OLE Controls version 1.9.2 or earlier), and are thinking about upgrading to the 2.0 version of one or more controls, there are some things you need to know.

Breaking Change

Due to the way the controls are now structured, there is one breaking change you must be prepared to fix in your application. This change is in the usage of option buttons. The SRP Button Control's AddOptionButton and RemoveOptionButton methods no longer work.

In the SRP.OCX, you were able to add option buttons by using either the SRP Button Control or the SRP Subclass Control. Since they were in the same OCX file, they could work together without problem. Once the SRP Subclass Control was moved into it's own OCX file, a dangerous possibility emerged. If the SRP Subclass Control tried to subclass an EDITLINE already subclassed by the SRP Button Control, a fatal exception could occur, crashing the application. So, the decision was made to end support for the SRP Button Control's AddOptionButton and RemoveOptionButton methods.

So, if you plan to use the SRPCore.ocx, and you currently use the aforementioned methods, you need to update your application to use the SRP Subclass Control instead. Please see the help documents for the SRP Subclass Control for details on how to implement option buttons.

Using Only 2.0 Controls

If you plan to upgrade entirely to the new SRP OLE Controls, then upgrading is fairly simple. First, unregister the current SRP.OCX file using the following command:

Code Block
regsvr32 -u <path>\SRP.OCX

...

"C:\Revsoft\OICLient\SRPControls.ocx"

SRPUtil.ocx

Some of our tools, such as the SRP Editor, use the SRP ActiveX Controls. In order to avoid clobbering your version of SRPControls.ocx, out tools use SRPUtil.ocx. Normally, you will never have to deal with this file as the SRP Editor installer (and any other installer using SRPUtil) will copy and register this OCX for you. However, it's useful to know what this file is and why it exists

Code Block
regsvr32 <path>\SRPEditTable.ocx

See the Installation guide above for more details on registering OCX files.

Using Both SRP.OCX and 2.0 Controls

If you are upgrading only a subset of your controls to the new SRP OLE Controls, then you'll need to keep both the SRP.OCX registered as well as the new controls. There is no problem with this as long as you take the following precaution:

Always make sure SRP.OCX is registered before any of the new SRP OLE Controls are registered. For example, let's say you are upgrading only the SRP ReportTable Control. When registering your OCX files, do this:

Code Block
regsvr32 <path>\SRP.OCX 
regsvr32 <path>\SRPReportTable.ocx

The reason order is so important is quite simple when you consider that the SRP.OCX contains the same controls (albeit older versions) as the new OCX files. When you register the SRP.OCX file, it's like telling Windows that the SRP Button Control, SRP EditTable Control, SRP ReportTable Control, etc. are all located in SRP.OCX. When you register the SRPReportTable.ocx file, it's like telling Windows that the SRP ReportTable Control is location in SRPReportTable.ocx. So, if you register the SRP.OCX after registering the SRPReportTable.ocx, then the older version of the SRPReportTable.ocx is the one registered in the system.