Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WNetAddConnection -- Declaration?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00166668
Message ID:
00166814
Vues:
33
>I trully agree about using the WinAPI functions. The other way, I would have be extremely aware of my users' environments. In the meantime, I have be using Paul-Vlad Tatavus's POINTER wrapper FLL. I will try to implement the NETRESOURCE structure for the WNetAddConnection2 function call using POINTER. But to be honest with you, I trully can not see what the advantages are for using WNetAddConnection2 vs WNetAddConnection.

The main worry wih WNetAddConnection() is that it's ben replaced, and is basically present as an aid to porting Win16 apps to the Win32 environment. It works, and in the vast majority of cases, works as well as WNetAddCOnnection2(), and is much easier to access from VFP.

WNetAddConnection3() OTOH offers options as far as interactive dialogs for connecting resources; you have solid control over the scope of network resources and providers which, while not terribly important in small LAN environments, has proved useful in larger environments, particularly WANs.

And since you write the code once and reuse it, it was worth the investment to me at least to write a wrapper on the API calls that use a common piece of code - I wrote it at a time when I knew how to make it work in C, and how to make a C .DLL that VFP could talk to without worrying about how to convert various data types between VFP and C or how to interpret the C prototypes for the API functions.
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