Using Win32 functions in Visual FoxPro Image Gallery
Windows Networking
Code examples:
Connecting a local device to a network resource
..msdn    Add comment     W32 Constants      Translate this page
The WNetAddConnection function enables the calling application to connect a local device to a network resource.
Code examples:
Connecting a local device to a network resource
DWORD WNetAddConnection(
  LPCTSTR lpRemoteName, // network device name
  LPCTSTR lpPassword,   // password
  LPCTSTR lpLocalName   // local device name
FoxPro declaration:
DECLARE INTEGER WNetAddConnection IN mpr;
    STRING lpRemoteName,;
    STRING lpPassword,;
    STRING lpLocalName
[in] Pointer to a constant null-terminated string that specifies the network resource to connect to.

[in] Pointer to a constant null-terminated string that specifies the password to be used to make a connection.

[in] Pointer to a constant null-terminated string that specifies the name of a local device to be redirected, such as "F:" or "LPT1".
Return value:
If the function succeeds, the return value is NO_ERROR.
My comment:
A successful connection is persistent, meaning that the system automatically restores the connection during subsequent logon operations.

This function is provided only for compatibility with 16-bit versions of Windows. Other Windows-based applications should call the WNetAddConnection2 or the WNetAddConnection3 function.


Using the net use command.

Command-line NT: It does exist!.
Word Index links for the WNetAddConnection :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2002-07-16 16:34:00
Modified: 2002-07-16 18:28:46
Visited in last 7 days: 34
User Contributed Notes:
Joe Black | 2007-01-15 12:49:35
Bueno soy programador de Visual Foxpro hace 6 años, además manejo Php, a la pregunta o el comentario de Walter Mezarina Castro, tiene razón a lo que es vulnerable en ese caso, pues mi comentario es lo siguiente: cualquier archivo, documento, aplicación, etc. siempre será vulnerable si tiene acceso personas inescruspulosa (hablando del entorno de la carpeta), pues para solucionar el problema de base de datos con Vfp, creo que su máquina debe dedicarse como servidor (guardado o con acceso restringido a personas, solo el administrador puede entrar fisicamente), otro, que Visual FPro debe conectarse con esa base de datos y desconectarse, para esa tarea puedes usar un servidor de datos, en el mercado existen bastantes y de código abierto, uno de ellos es Mysql, robusto seguro etc. Vfp puede conectarse con el fácilmente, una vez procedido el trabajo con la base de datos puedes desconectarse, todo eso sin compartir capertas del servidor.-
Cualquier duda visitar http:\\

Copyright © 2001-2018 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
2 sec.Example: 'Reading security permissions for NTFS files and folders'
4 sec.Function: 'WSACloseEvent'
7 sec.Function: 'CloseDesktop'
11 sec.Function: 'InitiateShutdown'
14 sec.Function: 'WinHttpQueryDataAvailable'
17 sec.Function: 'WinHttpReadData'
20 sec.
Function group: 'GDI+ ImageAttributes'
22 sec.Function: 'CreateFile'
24 sec.Function: 'UnhookWindowsHookEx'
Advertise here!