ActiveX control bitness in Script Extension called from 64-bit TestComplete
Hi,
I've got a question that hopefully someone knows the answer to... ( HKosova, tristaanogre, ...?)
Given that:
a) I need to call some ActiveX control from my Script Extension code (JScript if it matters);
b) Result returned by ActiveX control is local within Script Extension's code;
c) There is no ScriptExtension subfolder for the x64 folders hierarchy in TestComplete's installation folder;
d) This Script Extension can be called from TC 64-bit
Will such design work?
I.e. will it be possible for TC 64-bit to call Script Extension that will call 32-bit ActiveX ?
Or the bitness of ActiveX control must match the bitness of TestComplete?
Hi Alex,
The behavior is the same as when using COM/ActiveX objects directly in TestComplete - it depends on whether the ActiveX object is in-process (runs in the process that consumes it - in this case TestComplete) or out-of-process (runs in its own separate process).
- In-process: Object bitness must be the same as TestComplete bitness. This is a technical limitation of the ActiveX/COM technology.
- Out-of-process: Bitness does not matter.
In general, ActiveX objects inside DLL and OCX files are in-process, and objects inside EXE files are out-of-process. You can use
aqUtils.GetCOMServerPath("Foo.Bar", is64bit=true/false)
to learn the file type that a specific ActiveX object lives in.
For example, WScript.Shell (lives in wshom.ocx) is in-process, and Word.Application (lives in winword.exe) is out-of-process.