Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call API if need a Structure as Parameter?!
Message
De
14/09/1998 09:36:08
 
 
À
14/09/1998 09:28:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00136123
Message ID:
00136129
Vues:
25
>Structure of NETRESOURCE in VB is...
>
> Type NETRESOURCE
> dwScope As Long
> dwType As Long
> dwDisplayType As Long
> dwUsage As Long
> lpLocalName As String
> lpRemoteName As String
> lpComment As String
> lpProvider As String
> End Type
>
>How to Call Following API on the First parameter?!
>
>Call in VB is:
> Declare Function WNetAddConnection2 Lib "mpr.dll" Alias _
> "WNetAddConnection2A" (lpNetResource As NETRESOURCE, _
> ByVal lpPassword As String, ByVal lpUserName As String, _
> ByVal dwFlags As Long) As Long
>
>THE question is how to translate it to VFP syntax.
>

Either write a C wrapper .DLL to make the call for you after assembling the structure outside of VFP, or use something like Paul Tatavu's POINTERS.VCX class to construct it. You can also use the (now outdated) WNetAddConnection call, which does not use a NETRESOURCE structure, in place of WNetAddConnection2 or WNetAddConnection3 in many cases.
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