In my local network, it is common an equipment to be turned off and others have mapped folders of it. Windows shows a warning window. It informs that the resource is not available in the moment and that the operator can choose for not more to use the unavailable resource.
Each user when doing logon, it's executed for he a script. This script makes all it adjusts them and necessary updatings in the system. I then opted to not to show any window type and simply to ignore the mistake screens.
There is a service that resides in all the equipments. It verifies periodically for updating files. When an user makes logon, the others are informed of the event (like MSN Messeger). The personal computer seeks for events associated the user and it executes.
The most common events are:
- to map a resource,
- to post a file,
I use applications VB to work the system. Then, I developed a small class to map the resources.
My reports are printed like PDF and published in the browser. Then:
Dim Net As New clsNetworkClient
Dim Ret As Long
Ret = Net.Connect("R:", "\\<a href="file://ESRVD048829A03/REPORT">ESRVD048829A03\REPORT</a>", Net.ComputerName, "")
If Not Ret = 0 Then
Call LogEvent (date, time, WnetError(Ret))
The return code can be tested and show a mensage to user:
Private Const ERROR_SUCCESS As Integer = 0
Private Const WN_Success As Long = &H0
Private Const WN_Not_Supported As Long = &H1
Private Const WN_Net_Error As Long = &H2
Private Const WN_Bad_Pointer As Long = &H4
Private Const WN_Bad_NetName As Long = &H32
Private Const WN_Bad_Password As Long = &H6
Private Const WN_Bad_Localname As Long = &H33
Private Const WN_Access_Denied As Long = &H7
Private Const WN_Out_Of_Memory As Long = &HB
Private Const WN_Already_Connected As Long = &H34
Private Function WnetError(ByVal Errcode As Long) As String
Select Case Errcode
WnetError = "Function is Not supported."
WnetError = "Out of Memory."
WnetError = "An error occurred On the network."
WnetError = "The Pointer was Invalid."
WnetError = "Invalid Network Resource Name."
WnetError = "The Password was Invalid."
WnetError = "The local device name was invalid."
WnetError = "A security violation occurred."
WnetError = "The local device was connected To a remote resource."
WnetError = "Unrecognized Error " + Str(Errcode) + "."
My sincere gratefulness to the friend Wilsimar Araújo, a fantastic Designer.
Phone: +55 (61) 9162-8541