Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need a 64 bit version of stdvcl40.dll?

I am going to deploy a 64 bit version of an OCX written in Delphi. The OCX requires stdvcl40.dll to be available and registered in the target system. To my knowledge there is only a 32 bit version present in my Delphi installation, but as the sources are available I should be able to create a 64 bit version by myself.

Is there a need or an advantage doing so or should I stick with the contained version and only deploy that one?

Edit Just to give a little background: StdVCL40.dll mainly contains a type library exposing three interfaces declared in System.Win.StdVCL.pas. Later versions of this dll also implement some property pages handling these interfaces.

The result of removing the dependancy to stdvcl40.dll is that these interfaces (IStrings in my case) are no more available in my type library and any reference is replaced with IDispatch.

stdvcl40.dll is not a design-time package and it had to be deployed together with most of my ActiveX libraries in former Delphi versions. I have to deploy it because otherwise the OCX refuses to register in the first place.

It actually seems to work also with the 64-bit version of my OCX probably because Windows COM is clever enough to figure out that there is no 64 bit version and thus takes the 32 bit version. Although I am not sure if this is the way to go. Thus my question.

like image 790
Uwe Raabe Avatar asked Jun 25 '14 14:06

Uwe Raabe


1 Answers

I guess this DLL is used as storage for type library only (with definition of IStrings etc), at least in your case. And then answer is "NO", you don't need x64 version. When you register this x32 DLL, type library should be available for both x32/x64 apps. Sorry, i can not check it now, so it is just a guess.

UPDATE You can register stdvcl40.tlb (it is just 3kb in size, so it is much easier to deploy), then your OCX will depend on "stdvcl40.tlb" instead of "stdvcl40.dll" (maybe you will have to uncheck DLL and check TLB from tab "Uses" of type library editor, but i am not sure it is neccessary, but in my test project i don't have dependency at DLL anymore).

like image 174
Andrei Galatyn Avatar answered Nov 05 '22 10:11

Andrei Galatyn