I just found PDR 6739 which describes exactly my problem:
Symptom: | |||
AutomationObject:IsInstall() returns wrong value | |||
Description: | |||
Using Xbase++ 2.0 the class method AutomationObject():isInstalled( cProgId | cClassId ) does not properly detect a COM/AcitveX object when a ProgId was passed as parameter. | |||
Solution: | |||
Append the ProgId with Chr(0) as shown in the code below: ========================== snip =========================== #pragma library( "ascom10.lib" ) PROCEDURE Main() LOCAL cProgId := "Word.Application" #define WORKAROUND_6739 #ifdef WORKAROUND_6739 cProgId += Chr(0) #endif ? AutomationObject():IsInstalled( cProgId ) RETURN ========================== snap =========================== |
-- Met vriendelijke groet, With kind regards, Rens Zwanenburg
Hi Chris,
I tested this on a single machine (Win7 pro), I build two versions of the same application (with both xBase 1.9 and xBase 2.0 environments).
When I start the 1.9 version everything works just fine (return value from :isInstalled() == .T.); but when I start the 2.0 version the return value is always .F. ??
-- Met vriendelijke groet, With kind regards, Rens ZwanenburgOp 9-5-2016 om 23:34 schreef Chris Chambers:On 5/9/2016 7:32 AM, R.M. Meijer wrote:Hi,
Within an XBase 2.0 application I call
AutomationObject():isInstalled(CLSID) and I always get *.F.* as return
value?
_Sample:_
AutomationObject():isInstalled("TIS.TX.TextControl.19")
With XBase 1.9 this method works fine!
--
Met vriendelijke groet,
With kind regards,
Rens Zwanenburg
Hi,
Is the active X control properly registered, if you are using two different machines for 1.9 and 2.0
Regards
Chris