SftMask/OCX 6.5

Upgrading to Version 6.5

Softel vdm, Inc.

Converting an Existing Application

The conversion is not automatic.

Only a minimal conversion is required when upgrading SftMask/OCX 6.5. SftMask/OCX 6.5 is completely source compatible with older releases of SftMask/OCX and SftMask/ATL. Your application(s) must be recompiled to use SftMask/OCX 6.5. SftMask/OCX 6.5 and an older version of SftMask/OCX and SftMask/ATL can coexist on the same system (both can be installed and used at the same time) and they can be used in the same application.

Make sure to back up your current projects, before converting your projects.  Please read the conversion process specific to your language carefully BEFORE converting your project.
After converting, once the control saves updated property settings, you will not be able to return to SftMask/OCX 6.0.

Visual Basic
.NET (Managed Languages)
Visual C++ (Unmanaged C/C++)
Delphi
HTML
Other Development Tools

Visual Basic

After installing SftMask/OCX 6.5, all your projects will continue to use SftMask/OCX 6.0 until you make the following change in each project's main VBP (Visual Basic Project) file. Before opening the project file, make sure to close the project in Visual Basic, then edit the VBP file using a text editor and make the following changes:

Existing Project (VPB File):

Type=Exe
Form=Form1.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#G:\WINNT\System32\stdole2.tlb#OLE Automation
Object={841C47A0-DF2A-4DC5-B839-C4B7084D584C}#6.0#0; SftMask_IX86_U_60.OCX
IconForm="Form1"
Startup="Form1"
ExeName32="yourexe.exe"
Command32=""
Name="yourproject"

The line describing SftMask/OCX 6.0 (above, using a bold font) should be replaced with the following line:

Object={5F2D1CA0-5580-4d70-8B3A-228A2C660BB9}#6.5#0; SftMask_IX86_U_65.OCX

You can copy this line directly from this help file or copy it from the file "Upgrade.txt" which you can find in the SftMask/OCX product directory. The line must be copied as-is, without any modifications.

Existing Forms And Modules (FRM, BAS Files):

All forms and modules must be edited using a text editor. The following changes can easily be accomplished by a global edit and replace operation:

All references to "SftMaskLib60." must be replaced by "SftMaskLib65.". Make sure to include the trailing period in both cases. 

All references to "SftMaskLib." must be replaced by "SftMaskLib65.". Make sure to include the trailing period in both cases. "SftMaskLib." is only used if you are upgrading from a release older than SftMask/OCX 6.0.

Once the VBP and FRM file have been saved, you can open the project in Visual Basic and the project is now using SftMask/OCX 6.5.  The controls will save updated property settings, so you will not be able to return to SftMask/OCX 6.0.

.NET (Managed Languages)

While most other languages offer a fairly easy conversion, .NET and its languages require a bit more effort, but in most cases is limited to the steps documented below.

Existing Forms (FRM Files):

Updating the forms to use SftMask/OCX 6.5 is quite straightforward:

The forms can now be opened and the project uses SftMask/OCX 6.5 exclusively.  You will not be able to return to SftMask/OCX 6.0.

Visual C++ (Unmanaged C/C++)

Resource Script

After installing SftMask/OCX 6.5, all your projects will continue to use SftMask/OCX 6.0 until you make the following change in each dialog resource that defines a SftMask/OCX control. Before opening the resource script (RC file), make sure to close the project in Visual C++, then edit the RC file using a text editor and make the following changes:

IDD_MFC_DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "MFC"
FONT 8, "MS Sans Serif"
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,260,7,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,260,23,50,14
    CONTROL         "",IDC_SFTMASKPHONE,
                    "{841C47A4-DF2A-4dc5-B839-C4B7084D584C}",WS_TABSTOP,7,33,
                    121,12
END

The contents of the line describing SftMask/OCX 6.0 (above, using a bold font) should be replaced with the following line:

    CONTROL         "",IDC_SFTMASKPHONE,
                    "{5F2D1CA4-5580-4d70-8B3A-228A2C660BB9}",WS_TABSTOP,7,33,
                    121,12

Only change the ClassID (i.e., {841C47A4-DF2A-4dc5-B839-C4B7084D584C} to {5F2D1CA4-5580-4d70-8B3A-228A2C660BB9}), do not change the rest of the line.

You can copy this information directly from this help file or copy it from the file "Upgrade.txt" which you can find in the SftMask/OCX product directory. The ClassID must be copied as-is, without any modifications.

Once the RC file has been saved, you can open the project in Visual C++ and the project is now using SftMask/OCX 6.5. The controls will save updated property settings, so you will not be able to return to SftMask/OCX 6.0.

Make sure to change ALL occurrences of SftMask/OCX to version 6.0, otherwise you will not be able to open the resource script (RC file).

#import Statements

Any #import statements that are used in your application must now use the new control:

#import <msdatsrc.tlb> no_namespace

#pragma warning(disable : 4192)   // automatically excluding 'Ixxx' while importing type library 'stdole2.tlb'
// For information about the following construct, please see Microsoft's
// KnowledgeBase entry Q224610
#import <SftMask_IX86_U_60.ocx> rename_namespace("SftMaskNameSpace")
#pragma warning(default : 4192)

using namespace SftMaskNameSpace;

should be replaced with

#import <msdatsrc.tlb> no_namespace

#pragma warning(disable : 4192)   // automatically excluding 'Ixxx' while importing type library 'stdole2.tlb'
// For information about the following construct, please see Microsoft's
// KnowledgeBase entry Q224610
#import <SftMask_IX86_U_65.ocx> rename_namespace("SftMaskNameSpace") rename("LoadImage", "LoadImageSftMask")
#if _MSC_VER >= 1400 // need at least Visual Studio 2005
# pragma comment(lib, "comsuppw.lib") // avoid link error in VS2005
#endif
#pragma warning(default : 4192)

using namespace SftMaskNameSpace;

Delphi

Once SftMask/OCX 6.0 has been installed and added to the Component Palette as described in Using SftMask/OCX with Delphi 7 and Newer or "Using SftMask/OCX with Delphi 2005 And Newer", all projects have access to SftMask/OCX 6.5.

If the same class (TSftMask) was used to add SftMask/OCX 6.5 to the Component Palette, all projects will automatically use the new version. Otherwise, you will have to manually change each project to use the new defined class name instead of TSftMask.

HTML

After installing SftMask/OCX 6.5, all your HTML pages will continue to use SftMask/OCX 6.0 until you make the following change in each page that uses a SftMask/OCX control.

<OBJECT ID="Mask1" WIDTH=708 HEIGHT=203
 CLASSID="CLSID:841C47AE-DF2A-4dc5-B839-C4B7084D584C"
 CODEBASE="SftMask_IX86_I_65.cab#version=6,5,0,0">
    <PARAM NAME="_Version" VALUE="262144">
    <PARAM NAME="_ExtentX" VALUE="14993">

The contents of the line describing SftMask/OCX 6.0 (above, using a bold font) should be replaced with the following:

 CLASSID="CLSID:5F2D1CAE-5580-4d70-8B3A-228A2C660BB9"
 CODEBASE="SftMask_IX86_I_65.cab#version=6,5,0,0">

Only change the ClassID (i.e., "841C47AE-DF2A-4dc5-B839-C4B7084D584C" to "5F2D1CAE-5580-4d70-8B3A-228A2C660BB9"), do not change the rest of the line.

The CODEBASE argument also needs to be updated to reflect the new cabinet name and the current version number.

You can copy this information directly from this help file or copy it from the file "Upgrade.txt" which you can find in the SftMask/OCX product directory. The ClassID must be copied as-is, without any modifications.

Once the page has been saved, you can open the web page using your preferred HTML editor. The controls will save updated property settings, so you will not be able to return to SftMask/OCX 6.0.

Other Development Tools

Most development tools allow access to the ClassID used for controls on a form or dialog. Sometimes this may be accomplished by using a text editor and editing a configuration file, or possibly the development tool allows direct modification of the ClassID.

Generally, the ClassID used for the prior release {841C47A0-DF2A-4DC5-B839-C4B7084D584C} must be replaced with the new ClassID {5F2D1CA0-5580-4d70-8B3A-228A2C660BB9}. Once this step is completed, opening the project is sufficient to allow SftMask/OCX to convert the stored property settings.

For specific instructions or help, please see your development tool's documentation.


Feedback / comments / error reports for this topic
© 2000, 2008 - Softel vdm, Inc. - www.softelvdm.com