Jump to content
Software FX Community

Deployment Problem, BCB 6


User (Legacy)
 Share

Recommended Posts

Version:

Chart FX client server, Cfx4032.ocx, V5.0.5.0

Symptom:

Using above from BCB 6, works OK on development system .

When deployed on other machines, (XP and Win95), it gives a "Library not

registered." message the first time the program tries to set a property in

the ChartFX object.

Info:

In BCB 6, Imported the chartFX ActiveX control, dropped on form. Not

dynamically created.

Deployed using InstallShield Express, full version.

All files necessary for deployment, according to manual, are in the

common/Software FX Shared/ directory.

Dependencies also determined dynamically with the InstallShield wizard.

Tried registering dll's and ocx with regsvr32, no difference.

I though it might be a problem with the IClassFactory2 licensing, which

should be handled by the

BCB TOleControl class, I think, but the error message doesn't seem right for

that, and it seems like that would happen when the form is constructed.

Has anyone else run into this? Any suggestions?

Thanks

Link to comment
Share on other sites

I successfully registered both cfx4032.ocx and sfxbar.dll.

The install also successfully registered them, I believe.

I worked through the program with WinDbg on the target while using the IDE

debugger on the development system at the same time so I could get the

locations and symbols, (since borland doesn't produce a dbg type file for

use with Windbg) and discovered the following:

The following routine in the OleCtrls.pas is executed when the class is

constructed:

procedure TOleControl.CreateInstance;

var

ClassFactory2: IClassFactory2;

LicKeyStr: WideString;

procedure LicenseCheck(Status: HResult; const Ident: string);

begin

if Status = CLASS_E_NOTLICENSED then

raise EOleError.CreateFmt(Ident, [ClassName]);

OleCheck(Status);

end;

begin

if not (csDesigning in ComponentState) and

(FControlData^.LicenseKey <> nil) then

begin

OleCheck(CoGetClassObject(FControlData^.ClassID, CLSCTX_INPROC_SERVER or

CLSCTX_LOCAL_SERVER, nil, IClassFactory2, ClassFactory2));

LicKeyStr := PWideChar(FControlData^.LicenseKey);

LicenseCheck(ClassFactory2.CreateInstanceLic(nil, nil, IOleObject,

LicKeyStr, FOleObject), SInvalidLicense);

end else

LicenseCheck(CoCreateInstance(FControlData^.ClassID, nil,

CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IOleObject,

FOleObject), SNotLicensed);

end;

The program takes the first branch and calls CreateInstanceLic() and the

License check and OleCheckStatus() are OK.

This leads me to believe there is not a licensing problem, although I am

puzzled that the TChartFX::wLicenseKey produced when the control is imported

into the ide is not the same string that I get from running Cfx98Info.exe.

I discovered that the deployed program is failing when the following code is

executed:

variableType = eFlow;

TWaitCursor twait;

FlowChartFX->Width = 617;

FlowChartFX->TypeMask = (FlowChartFX->TypeMask | SCATTER);

The width statement executes OK, but the TypeMask statement causes the

error. The error is coming when this routine in OleCtrls is executed while

executing the TypeMask statement.

procedure TOleControl.GetProperty(Index: Integer; var Value: TVarData);

var

Status: HResult;

ExcepInfo: TExcepInfo;

begin

CreateControl;

Value.VType := varEmpty;

Status := FControlDispatch.Invoke(Index, GUID_NULL, 0,

DISPATCH_PROPERTYGET, DispParams, @Value, @ExcepInfo, nil);

if Status <> 0 then DispatchInvokeError(Status, ExcepInfo);

end;

Status returned was 8002801d, a non-zero value which caused

DispatchInvokeError(Status, ExcepInfo) to be called.

This doesn't happen on the design system.

What is different between the code running on the design platform vs the

deployed system that would cause this to cause an error on the deployed

system?

Tnx,

Geary

"SoftwareFX Support" <support@softwarefx.com> wrote in message

news:OWyft$0XCHA.976@webserver1.softwarefx.com...

> Did regsvr32 succeeded ? Was SFXBAR.DLL copied and registered ?

>

> --

> FP

> Software FX, Inc.

>

>

Link to comment
Share on other sites

Additional Info:

I removed the offending TypeMask statement and the error then occured when I

tried to set a property:

FlowChartFX->LegStyle=CL_NOTCLIPPED;

The failure was again a non-zero return (8002801d) in the SetProperty

routine:

procedure TOleControl.SetProperty(Index: Integer; const Value: TVarData);

const

DispIDArgs: Longint = DISPID_PROPERTYPUT;

var

Status, InvKind: Integer;

DispParams: TDispParams;

ExcepInfo: TExcepInfo;

begin

CreateControl;

DispParams.rgvarg := @Value;

DispParams.rgdispidNamedArgs := @DispIDArgs;

DispParams.cArgs := 1;

DispParams.cNamedArgs := 1;

if Value.VType <> varDispatch then

InvKind := DISPATCH_PROPERTYPUT else

InvKind := DISPATCH_PROPERTYPUTREF;

Status := FControlDispatch.Invoke(Index, GUID_NULL, 0,

InvKind, DispParams, nil, @ExcepInfo, nil);

if Status <> 0 then DispatchInvokeError(Status, ExcepInfo);

end;

"gvoots" <gvoots@aol.com> wrote in message

news:k#nGRDBYCHA.3136@webserver1.softwarefx.com...

> I successfully registered both cfx4032.ocx and sfxbar.dll.

> The install also successfully registered them, I believe.

>

> I worked through the program with WinDbg on the target while using the

IDE

> debugger on the development system at the same time so I could get the

> locations and symbols, (since borland doesn't produce a dbg type file for

> use with Windbg) and discovered the following:

>

> The following routine in the OleCtrls.pas is executed when the class is

> constructed:

>

> procedure TOleControl.CreateInstance;

> var

> ClassFactory2: IClassFactory2;

> LicKeyStr: WideString;

>

> procedure LicenseCheck(Status: HResult; const Ident: string);

> begin

> if Status = CLASS_E_NOTLICENSED then

> raise EOleError.CreateFmt(Ident, [ClassName]);

> OleCheck(Status);

> end;

>

> begin

> if not (csDesigning in ComponentState) and

> (FControlData^.LicenseKey <> nil) then

> begin

> OleCheck(CoGetClassObject(FControlData^.ClassID, CLSCTX_INPROC_SERVER

or

> CLSCTX_LOCAL_SERVER, nil, IClassFactory2, ClassFactory2));

> LicKeyStr := PWideChar(FControlData^.LicenseKey);

> LicenseCheck(ClassFactory2.CreateInstanceLic(nil, nil, IOleObject,

> LicKeyStr, FOleObject), SInvalidLicense);

> end else

> LicenseCheck(CoCreateInstance(FControlData^.ClassID, nil,

> CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IOleObject,

> FOleObject), SNotLicensed);

> end;

>

> The program takes the first branch and calls CreateInstanceLic() and the

> License check and OleCheckStatus() are OK.

> This leads me to believe there is not a licensing problem, although I am

> puzzled that the TChartFX::wLicenseKey produced when the control is

imported

> into the ide is not the same string that I get from running Cfx98Info.exe.

>

> I discovered that the deployed program is failing when the following code

is

> executed:

>

> variableType = eFlow;

> TWaitCursor twait;

> FlowChartFX->Width = 617;

> FlowChartFX->TypeMask = (FlowChartFX->TypeMask | SCATTER);

>

> The width statement executes OK, but the TypeMask statement causes the

> error. The error is coming when this routine in OleCtrls is executed

while

> executing the TypeMask statement.

>

> procedure TOleControl.GetProperty(Index: Integer; var Value: TVarData);

> var

> Status: HResult;

> ExcepInfo: TExcepInfo;

> begin

> CreateControl;

> Value.VType := varEmpty;

> Status := FControlDispatch.Invoke(Index, GUID_NULL, 0,

> DISPATCH_PROPERTYGET, DispParams, @Value, @ExcepInfo, nil);

> if Status <> 0 then DispatchInvokeError(Status, ExcepInfo);

> end;

>

> Status returned was 8002801d, a non-zero value which caused

> DispatchInvokeError(Status, ExcepInfo) to be called.

> This doesn't happen on the design system.

>

> What is different between the code running on the design platform vs the

> deployed system that would cause this to cause an error on the deployed

> system?

>

> Tnx,

> Geary

>

>

> "SoftwareFX Support" <support@softwarefx.com> wrote in message

> news:OWyft$0XCHA.976@webserver1.softwarefx.com...

> > Did regsvr32 succeeded ? Was SFXBAR.DLL copied and registered ?

> >

> > --

> > FP

> > Software FX, Inc.

> >

> >

>

>

Link to comment
Share on other sites

I believe this is in fact a license problem, basically the object was not

created only the wrapper was, that's why Width and Height work, because

these are properties on the container.

I suspect the license information stored in your EXE is incorrect maybe

because it is the license information corresponding to another version of

Chart FX. Please try the following:

1) Create a simple EXE program that just displays a chart, compile it and

run it in a computer where Chart FX is not installed (but it is registered)

2) Please e-mail us the license string being passed to CreateInstanceLic

3) Make sure you don't have any remaining files for an older version of

Chart FX, remove the component from the gallery, then remove all files and

then re-import it. Then repeat steps 1) and 2)

--

FP

Software FX, Inc.

Link to comment
Share on other sites

I seem to have found a solution.

I was able to get everything working by going to the underlying interfaces.

The following examples illustrate what I mean.

Instead of ChartFX->Scrollable or ChartFx->Title I had to go to:

TCOMIChartFX IControl;

IControl = ChartFX->ControlInterface;

IControl.set_Scrollable(false);

IControl.set_Title( CHART_TOPTIT, L"FLOW" );

As another illustration, to set Axis properties I had to go to:

ICfxAxis * pXAxis;

pXAxis = FlowChartFX->Axis->get_Item(AXIS_X);

pXAxis->Min = 0;

pXAxis->Max =24;

pXAxis->LabelValue = 1;

Offhand it looks like Borland has a problem in their import of the Active-X

control.

Geary

"gvoots" <gvoots@aol.com> wrote in message

news:1Trvy6BYCHA.3760@webserver1.softwarefx.com...

> Additional Info:

>

> I removed the offending TypeMask statement and the error then occured when

I

> tried to set a property:

>

> FlowChartFX->LegStyle=CL_NOTCLIPPED;

>

> The failure was again a non-zero return (8002801d) in the SetProperty

> routine:

>

> procedure TOleControl.SetProperty(Index: Integer; const Value: TVarData);

> const

> DispIDArgs: Longint = DISPID_PROPERTYPUT;

> var

> Status, InvKind: Integer;

> DispParams: TDispParams;

> ExcepInfo: TExcepInfo;

> begin

> CreateControl;

> DispParams.rgvarg := @Value;

> DispParams.rgdispidNamedArgs := @DispIDArgs;

> DispParams.cArgs := 1;

> DispParams.cNamedArgs := 1;

> if Value.VType <> varDispatch then

> InvKind := DISPATCH_PROPERTYPUT else

> InvKind := DISPATCH_PROPERTYPUTREF;

> Status := FControlDispatch.Invoke(Index, GUID_NULL, 0,

> InvKind, DispParams, nil, @ExcepInfo, nil);

> if Status <> 0 then DispatchInvokeError(Status, ExcepInfo);

> end;

>

>

>

>

>

>

>

> "gvoots" <gvoots@aol.com> wrote in message

> news:k#nGRDBYCHA.3136@webserver1.softwarefx.com...

> > I successfully registered both cfx4032.ocx and sfxbar.dll.

> > The install also successfully registered them, I believe.

> >

> > I worked through the program with WinDbg on the target while using the

> IDE

> > debugger on the development system at the same time so I could get the

> > locations and symbols, (since borland doesn't produce a dbg type file

for

> > use with Windbg) and discovered the following:

> >

> > The following routine in the OleCtrls.pas is executed when the class

is

> > constructed:

> >

> > procedure TOleControl.CreateInstance;

> > var

> > ClassFactory2: IClassFactory2;

> > LicKeyStr: WideString;

> >

> > procedure LicenseCheck(Status: HResult; const Ident: string);

> > begin

> > if Status = CLASS_E_NOTLICENSED then

> > raise EOleError.CreateFmt(Ident, [ClassName]);

> > OleCheck(Status);

> > end;

> >

> > begin

> > if not (csDesigning in ComponentState) and

> > (FControlData^.LicenseKey <> nil) then

> > begin

> > OleCheck(CoGetClassObject(FControlData^.ClassID,

CLSCTX_INPROC_SERVER

> or

> > CLSCTX_LOCAL_SERVER, nil, IClassFactory2, ClassFactory2));

> > LicKeyStr := PWideChar(FControlData^.LicenseKey);

> > LicenseCheck(ClassFactory2.CreateInstanceLic(nil, nil, IOleObject,

> > LicKeyStr, FOleObject), SInvalidLicense);

> > end else

> > LicenseCheck(CoCreateInstance(FControlData^.ClassID, nil,

> > CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IOleObject,

> > FOleObject), SNotLicensed);

> > end;

> >

> > The program takes the first branch and calls CreateInstanceLic() and the

> > License check and OleCheckStatus() are OK.

> > This leads me to believe there is not a licensing problem, although I am

> > puzzled that the TChartFX::wLicenseKey produced when the control is

> imported

> > into the ide is not the same string that I get from running

Cfx98Info.exe.

> >

> > I discovered that the deployed program is failing when the following

code

> is

> > executed:

> >

> > variableType = eFlow;

> > TWaitCursor twait;

> > FlowChartFX->Width = 617;

> > FlowChartFX->TypeMask = (FlowChartFX->TypeMask | SCATTER);

> >

> > The width statement executes OK, but the TypeMask statement causes the

> > error. The error is coming when this routine in OleCtrls is executed

> while

> > executing the TypeMask statement.

> >

> > procedure TOleControl.GetProperty(Index: Integer; var Value: TVarData);

> > var

> > Status: HResult;

> > ExcepInfo: TExcepInfo;

> > begin

> > CreateControl;

> > Value.VType := varEmpty;

> > Status := FControlDispatch.Invoke(Index, GUID_NULL, 0,

> > DISPATCH_PROPERTYGET, DispParams, @Value, @ExcepInfo, nil);

> > if Status <> 0 then DispatchInvokeError(Status, ExcepInfo);

> > end;

> >

> > Status returned was 8002801d, a non-zero value which caused

> > DispatchInvokeError(Status, ExcepInfo) to be called.

> > This doesn't happen on the design system.

> >

> > What is different between the code running on the design platform vs the

> > deployed system that would cause this to cause an error on the deployed

> > system?

> >

> > Tnx,

> > Geary

> >

> >

> > "SoftwareFX Support" <support@softwarefx.com> wrote in message

> > news:OWyft$0XCHA.976@webserver1.softwarefx.com...

> > > Did regsvr32 succeeded ? Was SFXBAR.DLL copied and registered ?

> > >

> > > --

> > > FP

> > > Software FX, Inc.

> > >

> > >

> >

> >

>

>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...