Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/ActiveX/IDE/Import ActiveX Control/Type Library    [ Add a report in this area ]  
Report #:  43495   Status: Closed
Pointer Error when Loading ActiveX
Project:  Delphi Build #:  10.0.2558.35231
Version:    10.0 Submitted By:   Tho Lag
Report Type:  Crash / Data loss / Total failure Date Reported:  3/30/2007 4:50:03 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   86611
Resolution: Fixed (Resolution Comments) Resolved in Build: : 11.0.2591.4165
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
I'm unable to use an ActiveX component that I have imported with the "Import Component" wizard, using delphi.
I correctly build the package and install it. When I drag the component on a form, I get this error message:
"Invalid Pointer Operation"
(Stack Trace above)

I only get that error when I import/compile/use the component with Delphi. When I do the same thing using BC++ , it works fine. Unfortunatedly I'm not able to use the package compiled with C++ in delphi.

We are planning to move our development from other platforms to delphi 2007, but that one is a key component.

I get the same problem with or without the updates.

Stack Trace:
+ $2[51F2657C]{rtl100.bpl  } System.System.TObject.FreeInstance (Line 8830, "system.pas" + 2) + $2
+ $9[520DD860]{vcl100.bpl  } AxCtrls.AxCtrls.TPictureAdapter.Update (Line 3719, "axctrls.pas" + 5) + $9
+ $4[520DDAE2]{vcl100.bpl  } AxCtrls.AxCtrls.TPictureAdapter.SetOlePicture (Line 3793, "axctrls.pas" + 2) + $4
+ $23[520E14A7]{vcl100.bpl  } OleCtrls.OleCtrls.TOleControl.GetTPictureProp (Line 1312, "OleCtrls.pas" + 7) + $23
+ $0[51F4ABB1]{rtl100.bpl  } TypInfo.TypInfo.GetOrdProp (Line 1252, "TypInfo.pas" + 24) + $0
+ $D[20F1C148]{designide100.bpl} ComponentDesigner.ComponentDesigner.TComponentRoot.UpdateDependencies (Line 3668, "ComponentDesigner.pas" + 5) + $D
+ $25[20F22E33]{designide100.bpl} ComponentDesigner.ComponentDesigner.TComponentDesigner.UpdateRootDependents (Line 6163, "ComponentDesigner.pas" + 2) + $25
+ $8[20F20065]{designide100.bpl} ComponentDesigner.ComponentDesigner.TComponentRoot.ValidateRename (Line 5131, "ComponentDesigner.pas" + 43) + $8
+ $D[533DB679]{vcldesigner100.bpl} VCLSurface.VCLSurface.TVclDesignSurface.ValidateRename (Line 3514, "vclsurface.pas" + 2) + $D
+ $10[52070D80]{vcl100.bpl  } Forms.Forms.TCustomForm.ValidateRename (Line 3143, "Forms.pas" + 3) + $10
+ $A[51F5F792]{rtl100.bpl  } Classes.Classes.TComponent.SetName (Line 10639, "classes.pas" + 6) + $A
+ $4[520E204B]{vcl100.bpl  } OleCtrls.OleCtrls.TOleControl.SetName (Line 1882, "OleCtrls.pas" + 2) + $4
+ $40[20F18C69]{designide100.bpl} ComponentDesigner.ComponentDesigner.TComponentRoot.DoCreateComponent (Line 2350, "ComponentDesigner.pas" + 77) + $40
+ $32[20F1DDE2]{designide100.bpl} ComponentDesigner.ComponentDesigner.TComponentRoot.CreateCurrentComponent (Line 4333, "ComponentDesigner.pas" + 2) + $32
+ $11[20F2DE46]{designide100.bpl} Surface.Surface.TDesignSurface.CreateItem (Line 187, "Surface.pas" + 1) + $11
+ $F[20F03C76]{designide100.bpl} Designer.Designer.TDesigner.DoDragCreate (Line 764, "Designer.pas" + 1) + $F
+ $3[20F043F8]{designide100.bpl} Designer.Designer.TDesigner.DragEnd (Line 929, "Designer.pas" + 19) + $3
+ $2[20F06798]{designide100.bpl} Designer.Designer.TDesigner.MouseUp (Line 1680, "Designer.pas" + 1) + $2
+ $6[533DA77A]{vcldesigner100.bpl} VCLSurface.VCLSurface.TVclDesignSurface.IsDesignMsg (Line 3050, "vclsurface.pas" + 34) + $6
+ $21[520587C3]{vcl100.bpl  } Controls.Controls.TControl.WndProc (Line 5064, "Controls.pas" + 4) + $21
+ $6[5205CA19]{vcl100.bpl  } Controls.Controls.TWinControl.WndProc (Line 7246, "Controls.pas" + 105) + $6
+ $5[5207124D]{vcl100.bpl  } Forms.Forms.TCustomForm.WndProc (Line 3284, "Forms.pas" + 125) + $5
+ $C[22193DF7]{delphivclide100.bpl} VCLFormContainer.VCLFormContainer.TControlSizer.ControlWndProc (Line 305, "VCLFormContainer.pas" + 33) + $C
+ $6[5205C1A4]{vcl100.bpl  } Controls.Controls.TWinControl.MainWndProc (Line 7021, "Controls.pas" + 3) + $6
+ $0[51F60BC0]{rtl100.bpl  } Classes.Classes.StdWndProc (Line 11572, "classes.pas" + 8) + $0
+ $6F[77D18706]{USER32.dll  } GetDC + $6F
+ $14F[77D187E6]{USER32.dll  } GetDC + $14F
+ $122[77D189A0]{USER32.dll  } GetWindowLongW + $122
+ $A[77D1BCC7]{USER32.dll  } DispatchMessageA + $A
Steps to Reproduce:
- Download and install "DataDynamics ActiveBar 3.0" component (anyversion)
you can get a demo from www.datadynamics.com
- Import the component using Delphi for Win32 and install the package.
- Try to insert the  "ActiveBar3" component in any VCL forms project (win32).
You will get that error.

Note that the other components in the OCX will work without problems.

The component is not ufficially supported in Delphi, but I think the problem is in the Delphi RTL.
Workarounds
I couln't find any workaround by modifying any of the TLBIMP options (in the Option dialog).

The only way to make it work is to use C++ instead of delphi.
Attachment
None
Comments

Craig Farrell at 3/30/2007 12:03:37 PM -
There is a problem with the Object Inspector and published TPicture properties. So the workaround is to change the problem property from published to public. After this change, you can still set the property in the designer via the property editor for the control (double-click on the control to invoke the controls properrty editor)
workaround:
Open ActiveBar3Library_TLB.pas and go to line 3284
Change this:
    property picture: TPicture index -523 read GetTPictureProp write SetTPictureProp stored False;
To This:
public
    property picture: TPicture index -523 read GetTPictureProp write SetTPictureProp stored False;
published

Tho Lag at 4/2/2007 1:06:15 AM -
Thank you, it worked! Now I can use that component in Delphi!

Server Response from: ETNACODE01