ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Network functions
  • Error codes
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Disconnects a network drive.
Example
// Déconnexion de la lettre réseau "E:"
ResDéconnexion is int = NetworkDisconnect("E:")

SWITCH ResDéconnexion
	CASE 16
		Error("Mauvaise valeur pour la déconnexion")
	CASE 17
		Error("Connexion en cours d'utilisation")
	CASE 18
		Error("Un fichier est ouvert, impossible de se déconnecter")
	CASE 19
		Error("Tentative de déconnexion sans connexion")
	OTHER CASE
		Info("Lecteur déconnecté avec succès")
END
Syntax
<Result> = NetworkDisconnect(<Drive letter>)
<Result>: Integer
  • 0 if the disconnection was performed,
  • an error code (value greater than 0) otherwise.
<Drive letter>: Character string
Network drive to disconnect in the format "<Drive letter>:".
Remarks

Error codes

The following error codes are returned:
  • 16: Wrong value for switch-off.
  • 17: Connection in use.
  • 18: A file is open, impossible to disconnect.
  • 19: Attempt to disconnect without connection.
The error code message can be retrieved using the ErrorInfo function with the rrMessage constant.
Component: wd300std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
//Mapear , conectar e desconectar rede
//Mapear , conectar e desconectar rede

ResConnection is int= NetworkConnect("M:", "\\Marciano\d")
SWITCH ResConnection
CASE 1 : Error("A conexão não é suportada")
CASE 2 : Error("Memória insuficiente.")
CASE 3 : Error("ponteiro errado.")
CASE 4 : Error("tipo errado de dispositivo")
CASE 5 : Error("perfil de usuário errado.")
CASE 7 : Error("Uma entrada já é encontrada para este dispositivo no perfil do usuário (já conectado)")
CASE 8 : Error("Invalid network or wrong path.")
CASE 9 : Error("Sem rede.")
CASE 10 : Error("Erro de rede.")
CASE 11 : Error("Nome de rede errado.")
CASE 12 : Error("A letra da unidade é inválido.")
CASE 13 : Error("Senha incorreta.")
CASE 14 : Error("Acesso negado.")
OTHER CASE
Info("Conduzir criado com sucesso")
END

//Desconectar
nResDisconnect is int= NetworkDisconnect("M:")
SWITCH nResDisconnect
CASE 16
Error("valor errado para a desconexão")
CASE 17
Error("Conexão usada atualmente")
CASE 18
Error("Um arquivo é aberto, incapaz de desconectar")
CASE 19
Error("Tente desligar sem uma conexão")
OTHER CASE
Info("desconectado com sucesso")
END

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/09/curso-windev-funcoes-windows-013.html
https://www.youtube.com/watch?v=De3VzI4l480
De matos
20 Sep. 2016

Last update: 03/27/2025

Send a report | Local help