Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH Odd Behaviour in Debugger
Message
De
07/12/2001 15:56:43
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
À
07/12/2001 15:44:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00591305
Message ID:
00591444
Vues:
38
>No, it's an ongoing problem with the first reference to the property of a COM object that hasn't been pre-registered through a wrapper; the properties of a COM object are only made visible after they've been examined once, at least in some versions. The following might help - rather than indexing explicitly, try a FOR...EACH construct, like:
>
>
lIsMapping = .t.
>oNet = CREATEOBJECT("WScript.Network")
>oNetDrives = oNet.EnumNetworkDrives
>FOR Each ItemValue IN oNetDrives
>   IF lIsMapping
>      ? ItemValue && Displays the drive mapping
>   ELSE
>      ?? ' = ' + ItemValue && Displays the share
>   ENDIF
>   lIsMapping = ! lIsMapping
>ENDFOR
>
>You could use similar techniques to populate a two-dimensional array of drives and mappings

Ed,

That was it! Not sure I understand the nuances of the versions and exactly why the previous code didn't work, but I will soon... Thanks!

Renoir
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform