Delphi App with ActiveX fails under Vista



I have a D5 app which is MDI and consists of about 30 forms.
Three of the forms contain (the same) OCX, the other 27 forms are just
native VCL.

Under Vista RC2 the 27 regular forms work ok, but the 3 forms with
ActiveX controls won't open (Madexcept - app has frozen).

(Bare in mind this app is in use on 1000's of (non-vista) machines
around the world without any problems)

I've done lots of experiments and the problem seems to be to do with
this ActiveX on an MDI child. Put it on a regular form in the same app
and it works OK. The problem also seems to be related to a streaming
timing issue (see madexcept dump below), as using a process viewer I can
see that the ocx (and some dll's) aren't loaded.
Interestingly, if I add a dummy non-mdi form to the project, which loads
the ocx, then the mdi forms work correctly.

Also I have discovered that if I remove the ocx from the MDI form at
design time and create it at run time in the form's oncreate event, then
the form opens and the ocx works correctly. Again this makes me think
it's timing or message related.

This would be acceptable as a solution for me except for one problem.
This ocx has 100's of design time properties which when it is on the
form at design time are saved to the dfm in a binary format to a delphi
property called controldata. e.g
ControlData = {
00000100BF3200002B2A000060000000010001074631426F6F6B31010.....

Is there some way that I can save the info in the dfm to a constant in
the pas file (or a resource or something) and then at run time do
something like

problem_ocx := Tproblem_ocx.create(application);
problem_ocx.controldata := some_constant

Any suggestions will be gratefully received.

Mad except listing
==================
77bee524 ntdll.dll KiFastSystemCallRet
77bedcba ntdll.dll NtWaitForMultipleObjects
77db2156 RPCRT4.dll NdrProxySendReceive
77db3658 RPCRT4.dll NdrClientCall2
7681e836 ole32.dll CoGetClassObject
043e33e3 Eclipse.exe OleCtrls TOleControl.CreateInstance
043e2e41 Eclipse.exe OleCtrls TOleControl.Create
041d3efd Eclipse.exe Classes 4600 CreateComponent
041d4129 Eclipse.exe Classes 4648 TReader.ReadComponent
041d4375 Eclipse.exe Classes 4704 TReader.ReadDataInner
041d42e3 Eclipse.exe Classes 4689 TReader.ReadData
041d9c74 Eclipse.exe Classes 7721 TComponent.ReadState
04221ae5 Eclipse.exe Controls TControl.ReadState
04224a55 Eclipse.exe Controls TWinControl.ReadState
041d4196 Eclipse.exe Classes 4657 TReader.ReadComponent
041d4375 Eclipse.exe Classes 4704 TReader.ReadDataInner
041d42b4 Eclipse.exe Classes 4683 TReader.ReadData
041d9c74 Eclipse.exe Classes 7721 TComponent.ReadState
04221ae5 Eclipse.exe Controls TControl.ReadState
04224a55 Eclipse.exe Controls TWinControl.ReadState
0420d485 Eclipse.exe Forms TCustomForm.ReadState
041d5105 Eclipse.exe Classes 5063 TReader.ReadRootComponent
041d273e Eclipse.exe Classes 3583 TStream.ReadComponent
041cf73f Eclipse.exe Classes 1580 InternalReadComponentRes
041cf8f5 Eclipse.exe Classes 1624 InitComponent
041cf986 Eclipse.exe Classes 1636 InitInheritedComponent
0420ce41 Eclipse.exe Forms TCustomForm.Create
046a7bbc Eclipse.exe MAIN1 3096 Tmaster.Launch_diary

David

David
.



Relevant Pages

  • Re: Delphi App with ActiveX fails under Vista
    ... Under Vista RC2 the 27 regular forms work ok, but the 3 forms with ActiveX controls won't open (Madexcept - app has frozen). ... The problem also seems to be related to a streaming timing issue, as using a process viewer I can see that the ocx aren't loaded. ... Also I have discovered that if I remove the ocx from the MDI form at design time and create it at run time in the form's oncreate event, then the form opens and the ocx works correctly. ...
    (comp.lang.pascal.delphi.misc)
  • Re: Manifests and VB6
    ... com ocx exe .local. ... I have the same file v. 6.0.96.37 in the app folder ... I don't want to install the OCX in the Windows System32 ...
    (microsoft.public.vb.general.discussion)
  • Re: Ghost breakpoints
    ... and some MFC function was throwing a DEBUGCHK because it couldn't find ... still be able to debug your app but MFC won't choke as your app loads. ... the OCX dll you have is a debug version. ... Steve Kelley ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: VB app nolonger works with XP SP2
    ... I used the MSCOMM32.OCX for the first version of the application (power on ... needed to add volume control. ... did not rely on a ocx. ... The thinking at the time was once the app was ...
    (microsoft.public.dotnet.languages.vb)
  • Re: MSI Installer now pops up when running VB app
    ... or OCX registration. ... that registered the offending DLL or OCX is not longer installed properly ... Where are DLL and OCX registrations saved and how can I remove/change ... Neither the app I'm trying to run or the old app that originally registered ...
    (microsoft.public.vb.controls)