Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changed syntax?
Message
De
26/06/2008 06:01:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01326848
Message ID:
01326856
Vues:
17
>>>>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform