ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

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
// Disconnect the network drive "E:"
ResDisconnect is int = NetworkDisconnect("E:")
 
SWITCH ResDisconnection
CASE 16
Error("Wrong value for disconnection")
CASE 17
Error("Connection currently used")
CASE 18
Error("A file is opened, unable to disconnect")
CASE 19
Error("Attempt to disconnect without a connection")
OTHER CASE
Info("Drive successfully disconnected")
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 following format: "<Drive Letter>:".
Remarks

Error codes

The following error codes are returned:
  • 16: Wrong value for disconnection.
  • 17: Connection currently used.
  • 18: A file is opened, unable 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: 09/15/2024

Send a report | Local help