PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Error codes
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Disconnects a network drive.
Example
// Disconnect the network drive "E:"
ResDisconnect = 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 (with quotes)
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 message corresponding to the error code is returned by ErrorInfo associated with the errMessage constant.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230std.dll
Minimum required version
  • 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
Sep. 20 2016