Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can anybody teach me ... Please !!!
Message
De
03/05/1999 08:06:10
 
 
À
03/05/1999 00:41:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00214266
Message ID:
00214507
Vues:
20
>>Ed, I'd be interested in whether or not you tried my code sample?
>
>Nancy, I was really surprised to read that AMEMBERS would grab the information in a COM object before the methods and or properties had been used in VFP, because I didn't think that VFP would read the type library until a request was made to access members. So I tried you code, and my results were as I expected: AMEMBERS didn't work at all.
>
>I wonder what could be different about our environments?
>
>I am using NT4, SP 4, IE5, VFP 5 (and VFP 6 SP2, I tried both).
>
>
>Ed, any insight into this? What do you get?
>

As you can see, there's been a lot of discussion. My results on Win98 and various flavors of NT with both VFP 5.0a and 6 match yours without running under the debugger. There's definitely something happening within the debugger when I single step through Nancy's code; AMEMBERS() populates with the methods automagically when I step through under the debugger, but not the properties. Outside of single stepping through code, though, the only PEMs that appear through AMEMBERS() are PEMs that I've explicitly referenced.

George has noted similar behavior, except that with his Win95 box, even single-stepping through the code doesn't populate AMEMBERS() with the methods from Shell.Application without explicit reference.

I could easily accept that running under the debugger, something probed the automation provider to extract the ODL information embedded in it. If that were the case, then why are only the methods picked up? It's easy enough to write a piece of code that probes an automation object using IDispatchEx (in fact, IDispatchEx specifically includes the capability to get at the list of an object's properties and enumerate the member elements of an object.) There's no reason that I can see for VFP not to extract all of the description if it extracts some of it prior to the first reference to a PEM.

I don't have a good enough understanding of what VFP is doing internally when it instantiates an ActiveX object, and even less understanding of what happens internally in the debugger. There's nothing obvious about configuration - the difference in behavior between my system and George's in the debugger might point at the shell object's implementation (I'm running a later version of the shell components on all my systems here than George is.) And the difference in the behavior on Nancy's system and everyone else's is even more of a mystery.

Any other ideas?

>
>>>Nancy, AFAIK, VFP's AMEMBERS() won't pull out the information on the Shell.Application object
>>
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform