Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changed syntax?
Message
From
26/06/2008 06:01:13
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01326848
Message ID:
01326856
Views:
16
>>>>In some older threads it was suggested to use the syntax lox=GetObject(,"InternetExplorer.Application") to get an object reference to a running IE. However, with VFP9 and IE7 this line reports an error, OLE error code ox800401e3: Operation unavailable. Can anyone help me?
>>>
>>>TRY
>>>   lox=GetObject(,"InternetExplorer.Application")
>>>   ? [Get]
>>>CATCH
>>>   lox=CreateObject("InternetExplorer.Application")
>>>   ? [Create]
>>>ENDTRY
>>>
>>
>>That was what I wanted to implement, but since the getobject() fails instead of finding the already running IE, I always end up with a new instance.
>
>I'm not sure why, but here on Vista I have only one instance, no matter how many times I call CREATEOBJECT:
>
>CLEAR
>FOR lnFor = 1 TO 20
>    lcClass = [loX]+TRANSFORM(lnFor)
>    TRY
>       &lcClass = GetObject(,"InternetExplorer.Application")
>       ? [Get], lnFor
>    CATCH
>       &lcClass = CreateObject("InternetExplorer.Application")
>       ? [Create], lnFor
>    ENDTRY
>NEXT
>WAIT WINDOW [Check Task Manager to see how many instances you have]
>
Anyway, that's not the point. My point is that the line lox=GetObject(,"InternetExplorer.Application") gives me an error whether I have IE running or not! I want to grab a reference to the running IC.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform